[Release] Shelly as a Switch


I don't think you have the latest version...



I have the 2.0.4 version of Shelly Relay Switch. It should be the latest (the info in the logs semms to state it also).
Thank you for adding the "non verbose" mode :slight_smile:


are the debuging switches off ?

split this topic #89

3 posts were split to a new topic: From Ported Shelly DH


yes the debug switches are off


I'll have a look and see what I missed


Ahh I already added the debuging switch to it. As soon as I am done with working on it I'll upload the new version tonight.


Great! Thank you


Just got an error on the shelly as switch driver, looked and the details indicated firmware update required
should this happen? Been great up till this

[RELEASE] Shelly Bulb DH

If the shelly device has a FW update it will let you know. As for that json error what version of the driver are you using ? I just looked at mine and I dont see that in the logs.


Hi Scott, Thanks for the reply. I was in a hurry before when I posted. The version is 2.0.4. I have the github link in the driver so it should auto update. Shelly1 was flawless until I noticed hubitat slow last night, then I looked at the logs and saw the error. I updated the firmware tonight, but the error persists and it somehow occurs near the firmware check, every 14-15 minutes. Is that coded in the driver, the firmware check?


Enable all logging and then past only that devices logs from a fresh refresh... highlight that device then clear logs then push the refresh tile. Past or screenshot that whole output here.


I'm doing that now. However I think I got it fixed. Something about the Github URL that was causing the error. I removed the line of code in the driver pointing to github source and the error seems to have gone away. I'm going to add the URL back into your driver and see if I can reproduce the error


URL should be

	importUrl: "https://raw.githubusercontent.com/sgrayban/Hubitat-Ports/master/Drivers/Shelly/Shelly-as-a-Switch.groovy"

Whole section

definition (
name: "Shelly Relay Switch",
namespace: "sgrayban",
author: "Scott Grayban",
importUrl: "https://raw.githubusercontent.com/sgrayban/Hubitat-Ports/master/Drivers/Shelly/Shelly-as-a-Switch.groovy"


Just as a side note I am recoding this driver because I have to take into account small differences between the 1PM 2 2.5 and the 4Pro relays and its JSON tree.


Let me backup...
Thank you for porting this driver.
After I resaved the driver without the url, the error went away. I then added back the driver from github with the url intact, saved and the error has not shown up over the last hour, following your logging instructions. So all is well now.
Ghost in the machine?
I don't know, but as I said, it was perfect untill the "firmware update needed" showed up, and maybe that's a coincidence, again I don't know.
Thank you for your help


If it happens again let me know but in my testing I never saw this particular error.

Maybe your browser pasted so sort of hidden character and got save. Opening it and re-saving fixed it... the only thing I can think of.


I have a DEV driver to test if you are up for it ?

PM if interested


Donate !! https://paypal.me/sgrayban

Updated to 2.0.5 - please read changes above.