Page 1 of 1

Shelly-1 Reed Switch

PostPosted: Tue Aug 30, 2022 8:54 am
by roquej
The Shelly-1 has a reed switch. It's represented by the status property sw-input, I believe. When I look at the MQTT message, the status of the "input" is shown with the closing and opening of a door. However, the status doesn't change within the plugin.

Any suggestions?

JP

Re: Shelly-1 Reed Switch

PostPosted: Tue Aug 30, 2022 3:28 pm
by aaronlionsheep
The device state should be changing to follow what is shown by the MQTT messages.

Are the other states for the device being updated? I'd just like to verify that MQTT messages are being correctly processed by checking that the IP address and MAC address are set.

Re: Shelly-1 Reed Switch

PostPosted: Wed Aug 31, 2022 2:34 am
by agame
i have exactly this setup (a gate rather than garage door but essentially same) and no issues with the plugin.

You definitely have set the switch in detached mode? I guess you must if you're getting the MQTT message generated.

Re: Shelly-1 Reed Switch

PostPosted: Wed Aug 31, 2022 5:49 am
by roquej
aaronlionsheep wrote:
The device state should be changing to follow what is shown by the MQTT messages.

Are the other states for the device being updated? I'd just like to verify that MQTT messages are being correctly processed by checking that the IP address and MAC address are set.


Yes, every other message is being updated, and I can use the relay to trigger an action. It's just the reed switch (sw_input) not updating.

JP

Re: Shelly-1 Reed Switch

PostPosted: Wed Aug 31, 2022 5:54 am
by roquej
I use the Shelly-1 with homebridge and the reed switch output works. So, I think it's configured properly.

JP

Re: Shelly-1 Reed Switch

PostPosted: Sat Sep 03, 2022 6:34 am
by aaronlionsheep
roquej wrote:
I use the Shelly-1 with homebridge and the reed switch output works. So, I think it's configured properly.

JP


Do you mind confirming the value coming from the Shelly 1 over MQTT? Specifically, is the value from the topic

Code: Select all
shellies/<your_device>/input/0
a "0" or a "1" when the switch input changes? I'm wondering if a recent Shelly firmware update changed the value they are sending.

Re: Shelly-1 Reed Switch

PostPosted: Sat Sep 03, 2022 10:10 am
by roquej
aaronlionsheep wrote:
roquej wrote:
I use the Shelly-1 with homebridge and the reed switch output works. So, I think it's configured properly.

JP


Do you mind confirming the value coming from the Shelly 1 over MQTT? Specifically, is the value from the topic

Code: Select all
shellies/<your_device>/input/0
a "0" or a "1" when the switch input changes? I'm wondering if a recent Shelly firmware update changed the value they are sending.


Via MQTT Explorer, shellies/shelly1-98F4ABF2A1ED/input

The relay works from Indigo and all states changes are seen in MQTT Explorer. However, if you look at the relay states:

Side Gate relay (Shelly-1) states firmware-version
Side Gate relay (Shelly-1) states has-firmware-update False
Side Gate relay (Shelly-1) states ip-address
Side Gate relay (Shelly-1) states longpush False
Side Gate relay (Shelly-1) states mac-address
Side Gate relay (Shelly-1) states onOffState False
Side Gate relay (Shelly-1) states online True
Side Gate relay (Shelly-1) states sw-input False

None seem to change when you trigger the relay, which again, works to trigger the Side Gate.

Very confused right now.

This is the MQTT Trigger definition:

Re: Shelly-1 Reed Switch

PostPosted: Sat Sep 03, 2022 11:30 am
by aaronlionsheep
roquej wrote:
aaronlionsheep wrote:
roquej wrote:
I use the Shelly-1 with homebridge and the reed switch output works. So, I think it's configured properly.

JP


Do you mind confirming the value coming from the Shelly 1 over MQTT? Specifically, is the value from the topic

Code: Select all
shellies/<your_device>/input/0
a "0" or a "1" when the switch input changes? I'm wondering if a recent Shelly firmware update changed the value they are sending.


Via MQTT Explorer, shellies/shelly1-98F4ABF2A1ED/input

The relay works from Indigo and all states changes are seen in MQTT Explorer. However, if you look at the relay states:

Side Gate relay (Shelly-1) states firmware-version
Side Gate relay (Shelly-1) states has-firmware-update False
Side Gate relay (Shelly-1) states ip-address
Side Gate relay (Shelly-1) states longpush False
Side Gate relay (Shelly-1) states mac-address
Side Gate relay (Shelly-1) states onOffState False
Side Gate relay (Shelly-1) states online True
Side Gate relay (Shelly-1) states sw-input False

None seem to change when you trigger the relay, which again, works to trigger the Side Gate.

Very confused right now.

This is the MQTT Trigger definition:


Ah, try deleting that “End” entry. I believe that is only matching on a topic 1 level deep rather than the full topic.

Re: Shelly-1 Reed Switch

PostPosted: Sat Sep 03, 2022 6:34 pm
by roquej
That did it! Such a simple fix.

Thank you!

JP