Hubitat and Shelly1 Switches

Hello my firends, i just bought 10 pcs of Shelly1 Switches and i am using the Hubitat as the main CPU for my house, so far i have everything working fine, i can control the Shellys with my Hubitat´s App but i need to know if i can use the Shellys to trigger my Hubitat lighting scenes, i have been looking at the Hubitat logs and it takes about 4 munites once i trigger the Shelly switch to report it back to Hubitat, how can i accelerate this action?, is there a better way to do it?

Platform 2.2.0 will contain built in drivers for the switches and dimmers, these drivers provide immediate updates to hubitat.
We do not have a release date for 2.2.0 bit it shouldn't be too much longer...

7 Likes

Funny you should ask - I just got my Shelly switches updating in real time last week.

On the Shelly App, go to one of your switches. Open the Actions tab.

  1. Click on "OUTPUT SWITCHED ON URL"
  2. Check Enable
  3. (If you forget to check Enable - Your URL will disappear when you press SAVE)
  4. Enter your Maker API refresh command
  5. Click Save
  6. Repeat these steps for "OUTPUT SWITCHED OFF URL". Use the same Maker API refresh command

The refresh command is:
http://192.168.XXX.XX/apps/api/[app ID]/devices/[device ID]/refresh?access_token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX

MAKER API
Install the Built-in App, Maker API, if you haven't already.

Some notes:
Maker API is not a Parent / Child app - It is a place to save settings and shows some examples
You run a command from your browser and your Hub returns an unformatted JSON response. There are many formatter apps,
I like http://jsonviewer.stack.hu/

The Maker API app some good hints and hard to find parameters in the examples:
Click on the Get All Devices link, format it, and save. Shows device ID's
Your app ID is shown here /apps/api/XXXX/devices/
Your access_token is the last argument

Hollar if you have any questions...

1 Little Bug:
The Dashboard tile does not update right a way with this refresh command.
If you look at the History - It is updated.
If you click on the green, refresh, check mark - It will update.

Hopefully, the Developers will see this and check on it for the long awaited 2.2.0 release.

1 Like

Thanks a lot Don, i really appreciate!.

i was under the impression that with 2.2.3 which i am on i should not need maker api with the built in drivers.. but the device page is never updating for on/off and there are no events in the logs or event list .although i can hear the relay switching on/off please advise

Maybe this can help Problems with Shelly 2.5 switch stock driver

ya its definately broken with the built in driver and i cannot get firmware to downgrade.. is this on the list of stuff to fix for 2.2.5.. their driver (shelly) at least updates status when turning on/off relay in hubitat.. still not if doing it outside hubitat. but the built in driver does not update status at all ever and url does not work to update as well.

Actually, you can fill in the URL's by hand @dongood described how

I find it more easy to rollback the Shelly firmware (15 sec), do the configuration in Hubitat, make it work, afterward you can update the shelly again.
I guess this is a temporary workaround until there is a fix in the Hubitat firmware

nope doesnt work with latest firmware . even with url filled in never updates status. and rollback fails.. i have tried multiple times and even reset the device and readded to wifi.. firmware will not rollback. no error just no rollback using the url from 1.9.4

1 Like

if you notice the data returned from the update link always shows 1.9.4 no matter what firmware file you pass in.

s_update":false,"new_version":"20210115-102904/v1.9.4@e2732e05","old_version":"20210115-102904/v1.9.4@e2732e05","beta_version":"20210112-125127/v1.9.4-rc1@9bee2b20"}

i wish they would add a way to put a firmware file selection from your local machine

actually finally got the firmware to update by putting the firmware file on my local machine/web site and changing the url to that.. interesting.. it did not working even though i had web open and could hit the link directly in the browser and download the file.

What device are you trying to update?
Can you paste screenshot of the screen you get? (of the shelly update page)
For me it works (downgrade to 1.7.0)

before:

after