Shelly-1 Reed Switch

Plugin to control first generation Shelly devices over the MQTT protocol.
User avatar
roquej
Posts: 618
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Shelly-1 Reed Switch

Post 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
aaronlionsheep
Posts: 260
Joined: Sun Feb 24, 2019 7:09 pm
Location: Virginia, USA

Re: Shelly-1 Reed Switch

Post 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.
agame
Posts: 514
Joined: Thu Jul 13, 2017 10:29 pm
Location: Melbourne, Australia

Re: Shelly-1 Reed Switch

Post 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.
User avatar
roquej
Posts: 618
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Shelly-1 Reed Switch

Post 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
User avatar
roquej
Posts: 618
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Shelly-1 Reed Switch

Post by roquej »

I use the Shelly-1 with homebridge and the reed switch output works. So, I think it's configured properly.

JP
aaronlionsheep
Posts: 260
Joined: Sun Feb 24, 2019 7:09 pm
Location: Virginia, USA

Re: Shelly-1 Reed Switch

Post 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.
User avatar
roquej
Posts: 618
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Shelly-1 Reed Switch

Post 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:
Attachments
Screen Shot 2022-09-03 at 12.07.29 PM.png
Screen Shot 2022-09-03 at 12.07.29 PM.png (111.17 KiB) Viewed 1976 times
aaronlionsheep
Posts: 260
Joined: Sun Feb 24, 2019 7:09 pm
Location: Virginia, USA

Re: Shelly-1 Reed Switch

Post 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.
User avatar
roquej
Posts: 618
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Shelly-1 Reed Switch

Post by roquej »

That did it! Such a simple fix.

Thank you!

JP
Post Reply

Return to “ShellyMQTT”