Page 1 of 1

Shelly Detached Switch

PostPosted: Sun Apr 19, 2020 4:21 pm
by Colly
Hi Aaron (and Joe - didn't want to post in 2 places but I'm sure you'll have the answer too),
Looking for some guidance on how I can setup up a device to capture the status of a detached switch. The Shelly 1 (in this case) SW can be used in detached mode and I can see it in MQTT Explorer. Whats the most efficient way to create a device to mirror the detached switch state?
Colly

Re: Shelly Detached Switch

PostPosted: Sun Apr 19, 2020 6:09 pm
by aaronlionsheep
I'm not sure I fully understand what you are trying to do, but you can put the Shelly 1 switch in "Detached" mode. This would disable the switch from front rolling the relay in the device.

Also, the Shelly 1 device in Indigo (with my plugin) has a state of "sw-input" which reports a true or false value to indicate the state of the switch.

Are you looking to create a separate device that simply indicates if this switch is opened or closed (reflecting the state value of sw-input)?

Re: Shelly Detached Switch

PostPosted: Sun Apr 19, 2020 6:20 pm
by FlyingDiver
Colly wrote:
Hi Aaron (and Joe - didn't want to post in 2 places but I'm sure you'll have the answer too),
Looking for some guidance on how I can setup up a device to capture the status of a detached switch. The Shelly 1 (in this case) SW can be used in detached mode and I can see it in MQTT Explorer. Whats the most efficient way to create a device to mirror the detached switch state?
Colly


Show the Explorer report on the message it's sending, and describe exactly what behavior you're looking to model.

Re: Shelly Detached Switch

PostPosted: Tue Apr 21, 2020 2:57 pm
by Colly
aaronlionsheep wrote:
Also, the Shelly 1 device in Indigo (with my plugin) has a state of "sw-input" which reports a true or false value to indicate the state of the switch.

I somehow missed this the other night... I must've stupidly looked at the Broker device instead of your plugin device.
aaronlionsheep wrote:
Are you looking to create a separate device that simply indicates if this switch is opened or closed (reflecting the state value of sw-input)?

Yes that's what I'm doing and can easily sort it now.
FlyingDiver wrote:
Show the Explorer report on the message it's sending, and describe exactly what behavior you're looking to model.

As above, sorted now and caused by my own confusion.
Thanks to both for reaching out.

Re: Shelly Detached Switch

PostPosted: Tue Apr 21, 2020 3:12 pm
by aaronlionsheep
Colly wrote:
aaronlionsheep wrote:
Are you looking to create a separate device that simply indicates if this switch is opened or closed (reflecting the state value of sw-input)?

Yes that's what I'm doing and can easily sort it now.


I think Masquerade can be used to create a device based on the state value. I hadn't thought about this case where the switch is in a detached mode. It appears that a lot of the Shelly devices support a detached switch (where the internal relay does not follow the switch).

I could make another device in the plugin, maybe called "Detached Switch", that is simply an on/off sensor. You would configure the main device in Indigo normally, and then you could create a "Detached Switch" device that you simply configure as linked to a master device. The config ui simply gives you a list of the other devices you have already created and you select the "master" device. This is the same methodology used for the temperature and humidity add-on devices.

Re: Shelly Detached Switch

PostPosted: Tue Apr 21, 2020 3:24 pm
by Colly
I'm happy enough to work around and wouldn't expect you to go making changes. BTW the plugin is working great and more devices on the way.. One thing to note when using the switch in detached mode is it've very sensitive, as in a few volts will activate it, nothing near the line voltage, which in my case is 230 V. I also got an explanation from Shelly on why I was seeing voltage on the SW contact even though nothing was connected to it. See link for more info - https://www.facebook.com/notes/shelly-s ... 509330303/

Re: Shelly Detached Switch

PostPosted: Tue Apr 21, 2020 3:38 pm
by aaronlionsheep
Colly wrote:
I'm happy enough to work around and wouldn't expect you to go making changes. BTW the plugin is working great and more devices on the way.. One thing to note when using the switch in detached mode is it've very sensitive, as in a few volts will activate it, nothing near the line voltage, which in my case is 230 V. I also got an explanation from Shelly on why I was seeing voltage on the SW contact even though nothing was connected to it. See link for more info - https://www.facebook.com/notes/shelly-s ... 509330303/


Thanks for the link to that information - this has been a a talking point in the household...

I will make note of this new type of device. I won't rush to get it added, but I will add it to my list of ideas. I've seen some "teaser" links on a Shelly EU forum that looks like they are adding a few more lightbulbs (white and RGB), a Shelly I3 (3-input device?), a battery-powered button, and a Dimmer (not sure if this is new or not). If the API is consistent, then these devices should be easily added to the plugin 8)

Re: Shelly Detached Switch

PostPosted: Tue Apr 21, 2020 3:41 pm
by Colly
aaronlionsheep wrote:
If the API is consistent, then these devices should be easily added to the plugin 8)
Sounds good.

Re: Shelly Detached Switch

PostPosted: Wed May 20, 2020 5:06 pm
by aaronlionsheep
aaronlionsheep wrote:
Colly wrote:
aaronlionsheep wrote:
Are you looking to create a separate device that simply indicates if this switch is opened or closed (reflecting the state value of sw-input)?

Yes that's what I'm doing and can easily sort it now.


I think Masquerade can be used to create a device based on the state value. I hadn't thought about this case where the switch is in a detached mode. It appears that a lot of the Shelly devices support a detached switch (where the internal relay does not follow the switch).

I could make another device in the plugin, maybe called "Detached Switch", that is simply an on/off sensor. You would configure the main device in Indigo normally, and then you could create a "Detached Switch" device that you simply configure as linked to a master device. The config ui simply gives you a list of the other devices you have already created and you select the "master" device. This is the same methodology used for the temperature and humidity add-on devices.


In the latest release, 0.1.0, there is now a "Shelly Detached Switch" device which adds this exact functionality within the plugin. This can be linked with a Shelly 1, Shelly 1PM, Shelly 2.5, Shelly 4Pro, or Shelly Dimmer.