I’m using PiCore Player and Logitech Media Server to control music. Is there a way to make a button hyperlinked, but not actually open the link? I want to have a button for each of these:
@sharptools501, you can use the REST API syntax described in the post below in the Hyperlink tile to send the GET request to your PiCore server without opening the link.
For example: (please note that the URL is wrapped within the double quote", not the “ and ” that the community s/w decides to display.)
–EDIT–
This wouldn’t work in this specific scenario because it REST API syntax requires HTTPS since most browsers will throw mixed-content warning if sending request to an insecure endpoint.
VM117:1 Mixed Content: The page at 'https://sharptools.io/dashboard/view/...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://172.16.0.241:9000/status.html?p0=play'. This request has been blocked; the content must be served over HTTPS.
Which smart home platform are you using? You may be able to use a Virtual HTTP Switch or something similar. These can make the HTTP request from the hub on your LAN, so they’ll work with the existing HTTP that your PiCore device offers.
But the description for the configuration for that property says ‘include the forward slash’:
input("DevicePathOn", "string", title:"URL Path", description: "Rest of the URL, include forward slash.", displayDuringSetup: true)
From a quick review of the SmartThings developer docs for HubAction, it looks like the leading slash is needed for the path, so I assume that’s what the developer of this device handler meant.
Parameter
Description
path
Allowed values are any string of the form /somepath. Default value is /.
If the device was manually created in the IDE, did you make sure to assign it to your Location/Hub?
Is there any logging or diagnostic tools available on the PiCorePlayer (PCP)? Would be helpful to see if the command if coming through and PCP just doesn’t like something about the request. For example, I noted that the code always seems to add a Content-Type header of "application/x-www-form-urlencoded". Some web servers can be really particular about the requests they receive… and it’s pretty uncommon to include a content-type with a GET request.
Since this device implements both the Switch capability and the Momentary capability…
While you are editing your dashboard, you can tap the ... in the top-right corner of the tile and select Change Layout and choose the Momentary layout.
That way it will act more like a normal push button (stateless) rather than a switch.
I wonder if this DTH would work? It’s one of the only discussions I saw around PiCore Player when I searched the SmartThings community and if I’m reading correctly, the device author seems to have tested it with PiCore Player.