[Release] Shelly as a Switch


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

To use create a virtual device that will act as a on/off switch....

Credits to the original developer -- his code is mostly gone now though.

Update: Version 2.0.5 changes

  • Code added for JSON debug switch
  • New attributes that can be used in RM
  • 1 call for API status now
  • Supports all relay channels 0-3
  • Supports username/password
  • Added the ability to reboot device
  • Driver renamed to "Shelly Switch Relay
  • Full support for 1, 1PM, 2, 2.5 and 4Pro
    • Power levels correspond for each relay
    • Overpower for each meter

New code removes the deviceMeters switch because of the new way I parse the JSON tree. Before I had to parse different url's to get the info such as /settings and /status. Now its all parse from /status and makes life so much easier.

There shouldn't be any more updates unless you guys see info that should be pulled.

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

[RELEASE] Shelly Bulb DH

There are new Shellys - 1PM (new Shelly 1) and Shelly 2.5 (new Shelly 2).
Will these drivers work with them?


I have no idea since don't have them but I don't see why not.


If I have time this week I'll try them both and I'll keep you updated.


thanks !


Thanks for your work on this port!
I am working on my smart home on a budget.
I tried using Sonoffs (5 dollars) for my switches, through IFTTT but I have been spoiled with Hubitat's local control. I was also looking at the Shelly switches ($11.50 but still way cheaper than the major brands). PLUS I can still use the the old wall switch also.
So Easy a Newbie can do it


Thanks !


Shelly as Switch
Version 2.0 released

Changes are: Removed more ST code and added auto refresh option and debugging info switches.


Thanks for the update.
Just letting everyone know I connected Shelly 1PM and Shelly 2.5 to HE using the driver.
With Shelly 2.5 I created two virtual devices one for channel 0 the other for channel 1.
Now the question: Would you please make it possible for refresh time to be in seconds?
Now the minimum is 5 minutes but in order to use these switches in HE to trigger some action we need to know a current state within 1 second. E.g. if I want to turn off some other switch along with Shelly Hubitat needs to know quickly if I turned it off with a wall switch paddle.


And "Enable auto refresh every XX Minutes " set to NO Selection.

You can make a RM that will POLL the device every second.


Working like a charm :slight_smile:
Thanks a lot.

How about energy metering ? Any chances you'd dive in?


Shelly doesn't have energy meter.


Shelly 1PM, Shelly 2 and Shelly 2.5 do have this capability.
Here's some info API Reference


I'm suppose to be getting the entire line of Shelly products to develop all the Shelly drivers and ST DH in a few weeks.


That's great news!
Let us know if you need any testers :slight_smile:


Ok there is new release out for Shelly As A Switch 2.0.1

Main feature now allows you to install the Shelly As A Switch more then once for each relay channel.

Unfortunately this means you have to decide to deleted the devices using the driver OR simply go to the device details and edit the DNI to something unique.


Is the driver working with native Shelly or with "tamotaed" ones ?


Not a clue as I never switched the sw. No harm in trying right ?


Frankly I do'nt know. I have to get one of those devices...


Ok. I just got my Shelly 2.5 devices. I'll try them asap!
btw: I would like to use one unit to drive 1 momentary switch (a ligth connected to a relay) and 1 toggle switch, using the 2 channels available.
Does the driver require to create 2 devices , is'nt it? How do I declare (if Ihave to do) the different switch types?