Is there any way to open web page in a user's default browser using a custom command (or anything else)? I'd like my driver to have a control on the main page where clicking the control will open up a web page having the user manual for the device.
I suspect you already know about the “Link” template. I suppose you could use it to point to a custom HTTP that would open in the Dashboard frame or app.
Not sure though if it could be made to open a page in the device’s default browser...
If the suggestion above doesn't work you can maybe try an html driver (a search should find it on this forum) and put that in a dashboard tile. I've used that to display websites before. It may be necessary for you to host the file locally on your LAN somewhere (or on the hub itself in the /local files area) because some websites don't allow encapsulation.
If all else fails there is a capability in the HE community driver for the Fully Kiosk Browser app (tho' note this app is Android​ only) that allows a webpage to be opened from Rule Machine. Its a proverbial sledgehammer to crack your nut but it does work I'm setting it up to display a webcam feed over my main dashboard when a motion sensor alerts. You can then also programmatically revert back to the dashboard again afterwards.
Sure thing! It is an option when creating or editing a tile. Just need to chose the “Link” template (no need to pick a device) and enter the URL you want to reach.
But it doesn't solve my problem. Here's what I'm trying to do . . .
I've developed a new driver (on HPM, and my github page https://github.com/jvmahon/HubitatCustom) which can self-configure for most dimmer / switch devices (as well as others!). It does this by querying the opensmarthouse.org database to figure out the device's configuration parameters and then generating parameter input controls based on the database query. I'd like the driver to also fill in a device-specific link to the opensmarthouse.org web page which the user can click on to get to the device manual. Thus, what I'm looking to do is to have a control, command, whatever, appear on the Hubitat device web page for the device which can then open a web page on opensmarthouse.org. Thus, what I was looking for was either a way to have a custom command run a method that opened the web page, or if one of the input preferences could do something like this. Or I'm wondering if a url could be encoded into a string stored in a state variable which would then act as a link (I'm currently playing around with this last idea.
One approach is to encode the link into a state variable. So, for example, I stored the following in state:
state.link = "<p> This is my paragraph with a link <a href=\"https://www.w3schools.com/\">Visit W3Schools.com!</a> </p>"
The end-user can then scroll down to the "state" section and click on the link. I'd rather there be an explicit control button to click on, but this is at least workable for me.
You might look into using a manager app to get the level of control you are looking for here. Many more options are available there for the user experience.