Shelly Button1

Posted on
Thu Oct 21, 2021 3:32 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Shelly Button1

I having a little trouble getting a Button1 to work. I have a number of Shelly devices (relays, door, dimmer etc) and they all work fine. However the Button1, while it shows up fine in the MQTT Explorer it appears that this info is not getting from Explorer into Indigo.
Running v0.7.1
I wonder if anyone has any suggestions, do I need to use a different format than other devices?

Posted on
Fri Oct 22, 2021 6:25 am
tazswe offline
Posts: 163
Joined: Mar 13, 2017
Location: Sweden

Re: Shelly Button1

Doesn’t it show up as a device?


Shelly Button1: MQTT
Shelly Button1 publishes on the following MQTT topics:

shellies/shellybutton1-<deviceid>/sensor/battery: battery level in %
shellies/shellybutton1-<deviceid>/input_event/0: reports input event and event counter, e.g. {"event":"S","event_cnt":2} see /input/0 for details

I don’t have any Shelly button but it is similar to the I3 that can detect different button presses and you need to set up a trigger for each button press.


Sent from my iPad with Tapatalk

Posted on
Fri Oct 22, 2021 6:54 am
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

Thank you for the reply.

The issue is not as regards the 'nature' of the incoming information (different button presses, battery level etc), it is that I have no information coming in from MQTT Explorer.

If I monitor the MQTT Explorer, I can see in real time the different events being listed depending on the button press combination. However in Indigo, even though I have set this up in the exact same way I did with other Shelly devices, I don't even get the battery level being reported, yet I do for same the Door sensor.
This is why I suspect that I have some setting slightly out of place, as such I attach my settings for the 'Topic Component' within Triggers and then the Device settings themselves for the ShellyButton1.
Attachments
Button_Device_Settings.png
Button_Device_Settings.png (95.17 KiB) Viewed 907 times
Button_Trigger_Settings.png
Button_Trigger_Settings.png (61.88 KiB) Viewed 907 times

Posted on
Fri Oct 22, 2021 11:17 am
tazswe offline
Posts: 163
Joined: Mar 13, 2017
Location: Sweden

Re: Shelly Button1

The mqtt topic root doesn’t seem to be correct or at least not according to the Shelly api page.

Are you sure that it isn’t shellies/shellybutton1-<device if>?


Sent from my iPad with Tapatalk

Posted on
Sat Oct 23, 2021 10:05 am
aaronlionsheep offline
Posts: 144
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Shelly Button1

raoul wrote:
Thank you for the reply.

The issue is not as regards the 'nature' of the incoming information (different button presses, battery level etc), it is that I have no information coming in from MQTT Explorer.

If I monitor the MQTT Explorer, I can see in real time the different events being listed depending on the button press combination. However in Indigo, even though I have set this up in the exact same way I did with other Shelly devices, I don't even get the battery level being reported, yet I do for same the Door sensor.
This is why I suspect that I have some setting slightly out of place, as such I attach my settings for the 'Topic Component' within Triggers and then the Device settings themselves for the ShellyButton1.


Hi raoul,

tazswe is correct in that your topic component match trigger and MQTT topic root look incorrect. If you post a screenshot from MQTT Explorer showing the data coming in, then we can clear this up.

The topics that your Button1 publishes to will look like "shellies/shellybutton1-[CHARACTERS]" where characters is probably 6 or more characters identifying the device. You will want to have your trigger match on that topic prefix of "shellies" followed by "shellybutton1-[CHARACTERS]", and finally ANY. Then you will want to ensure your MQTT topic root in the device is set to match.

Posted on
Sat Oct 23, 2021 2:18 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

Thank you both for the suggestions, I actually use a Custom MQTT name for each of my devices. That said I have tried going back to the default and adjusting the relevant settings within Indigo. Unfortunately with no luck.

To help explain, please see below a screenshot of from MQTT Explorer, As you'll note both names are present (Default and custom) as I have been testing it. I have reverted back to the custom (Shelly_Button) and re adjusted the trigger and device settings accordingly.

Thank you in advance.
Attachments
MQTT ScreenShot.png
MQTT ScreenShot.png (38.22 KiB) Viewed 801 times

Posted on
Sat Oct 23, 2021 2:43 pm
aaronlionsheep offline
Posts: 144
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Shelly Button1

raoul wrote:
Thank you both for the suggestions, I actually use a Custom MQTT name for each of my devices. That said I have tried going back to the default and adjusting the relevant settings within Indigo. Unfortunately with no luck.

To help explain, please see below a screenshot of from MQTT Explorer, As you'll note both names are present (Default and custom) as I have been testing it. I have reverted back to the custom (Shelly_Button) and re adjusted the trigger and device settings accordingly.

Thank you in advance.


Ah that makes sense as most of use the default names. Can you show a screenshot of the topic subscriptions in the MQTT Connector device? You could also print these to your indigo log through the MQTT Connector plugin menu.

Posted on
Sat Oct 23, 2021 2:51 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

From Log;
MQTT Connector MQTT Broker - Server: Current topic subscriptions:
MQTT Connector MQTT Broker - Server: shellies/Studio_Door/sensor/# (0)
MQTT Connector MQTT Broker - Server: shellies/Studio_Door/# (0)
MQTT Connector MQTT Broker - Server: shellies/Relay/# (0)
MQTT Connector MQTT Broker - Server: shellies/Relay/ (0)
MQTT Connector MQTT Broker - Server: shellies/Shelly RGB/# (0)

I notice that there are a couple of devices not shown, however they are all working save the Button1.

Posted on
Sat Oct 23, 2021 2:54 pm
aaronlionsheep offline
Posts: 144
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Shelly Button1

raoul wrote:
From Log;
MQTT Connector MQTT Broker - Server: Current topic subscriptions:
MQTT Connector MQTT Broker - Server: shellies/Studio_Door/sensor/# (0)
MQTT Connector MQTT Broker - Server: shellies/Studio_Door/# (0)
MQTT Connector MQTT Broker - Server: shellies/Relay/# (0)
MQTT Connector MQTT Broker - Server: shellies/Relay/ (0)
MQTT Connector MQTT Broker - Server: shellies/Shelly RGB/# (0)

I notice that there are a couple of devices not shown, however they are all working save the Button1.


I have no idea how other devices could possibly work (for inbound communication to Indigo), but I would recommend removing all these entries from the Connector device and manually subscribe to "shellies/#". This will automatically pick up any future shelly devices you add and you will only need to create triggers for each device. Most of us use a single trigger that captures all shelly devices into a single message type, but there is nothing wrong with creating a trigger for each device.

This is a list of all MQTT topics that Indigo will listen on to receive data from MQTT. This explains why you are not getting any of the Button1 messages into Indigo (and why the trigger isn't even triggering).

Posted on
Sat Oct 23, 2021 2:58 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

Thanks. I have looked at the shellies/# option, albeit I still have the other receipt triggers in place and I was still unable to get any in info in from the Button1.

Posted on
Sat Oct 23, 2021 3:06 pm
aaronlionsheep offline
Posts: 144
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Shelly Button1

raoul wrote:
Thanks. I have looked at the shellies/# option, albeit I still have the other receipt triggers in place and I was still unable to get any in info in from the Button1.


If your Shelly Button1 device is set to the custom device name of "Shelly_Button", then you need the appropriate entry in the MQTT Connector topic subscriptions. This is either "shellies/#" to capture any inbound shelly traffic, or "shellies/Shelly_Button/#" to specifically target any inbound traffic from the button.

Once you have that, disable the "Hide trigger executions from log" checkbox in your trigger to ensure that the button1 messages are being picked up by the trigger you have in place.

Posted on
Sat Oct 23, 2021 3:27 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

Thanks. Just doesn't seem to be coming into Indigo or routed correctly. Even if I run 'Debug' I don't see any information for the Button1 even with a button press, yet I can see MQTT Explorer log the input.

Posted on
Sat Oct 23, 2021 3:28 pm
aaronlionsheep offline
Posts: 144
Joined: Feb 24, 2019
Location: Virginia, USA

Re: Shelly Button1

raoul wrote:
Thanks. Just doesn't seem to be coming into Indigo or routed correctly. Even if I run 'Debug' I don't see any information for the Button1 even with a button press, yet I can see MQTT Explorer log the input.


Try restarting the MQTT Connector plugin and see if that starts bringing in the messages.

Posted on
Sat Oct 23, 2021 4:16 pm
raoul offline
Posts: 41
Joined: Jun 11, 2019

Re: Shelly Button1

Sadly, no. I’ve tried a number of reboot / restart options, all with the same result.

Posted on
Sat Oct 23, 2021 4:52 pm
FlyingDiver offline
User avatar
Posts: 5599
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Shelly Button1

Next thing I would do is turn on debug level logging on the MQTT connector so you can see which messages it's actually receiving, and what it's doing with them. Depending on MQTT Explorer is problematic, because it does some weird formatting that can obscure the actual topics and payloads that the MQTT client (the MQTT Connector plugin) is getting.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 1 guest