Using Shelly devices with the MQTT plugin

User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

The HTTP API and the MQTT API are very different, and data from one doesn't help with the other. The HTTP one is useful for changing the device settings, which you can't do with MQTT.

So the only outstanding issue is that you can't set the device brightness, correct? That's going to take some work, because it doesn't use the same topic/payload as turning it on/off.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
CliveS
Posts: 864
Joined: Sun Jan 10, 2016 5:31 am
Location: Medomsley, County Durham, UK

Re: Using Shelly devices with the MQTT plugin

Post by CliveS »

FlyingDiver wrote:The HTTP API and the MQTT API are very different, and data from one doesn't help with the other. The HTTP one is useful for changing the device settings, which you can't do with MQTT.

So the only outstanding issue is that you can't set the device brightness, correct? That's going to take some work, because it doesn't use the same topic/payload as turning it on/off.
Yes, that is the only issue.
CliveS

Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

CliveS wrote:
FlyingDiver wrote:The HTTP API and the MQTT API are very different, and data from one doesn't help with the other. The HTTP one is useful for changing the device settings, which you can't do with MQTT.

So the only outstanding issue is that you can't set the device brightness, correct? That's going to take some work, because it doesn't use the same topic/payload as turning it on/off.
Yes, that is the only issue.
Pre-release here to address this issue: https://github.com/FlyingDiver/Indigo-S ... /tag/0.2.1

Edit the Dimmer device. The action section has been expanded, and for a Shelly Dimmer, I think it should look like this. Not tested, since I don't have a Shelly Dimmer.
Attachments
Screen Shot 2020-02-16 at 5.46.35 PM.png
Screen Shot 2020-02-16 at 5.46.35 PM.png (108.05 KiB) Viewed 3582 times
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
CliveS
Posts: 864
Joined: Sun Jan 10, 2016 5:31 am
Location: Medomsley, County Durham, UK

Re: Using Shelly devices with the MQTT plugin

Post by CliveS »

I have installed 0.2.1 but I still cannot get the dimmer to work, possibly due to not knowing what to put in the Payload Key and Value Key.
CliveS

Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

CliveS wrote:I have installed 0.2.1 but I still cannot get the dimmer to work, possibly due to not knowing what to put in the Payload Key and Value Key.
You can’t command it? But status updates work?

The templates I posted above should work to command it. Post what you currently have.


Sent from my iPhone using Tapatalk
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
CliveS
Posts: 864
Joined: Sun Jan 10, 2016 5:31 am
Location: Medomsley, County Durham, UK

Re: Using Shelly devices with the MQTT plugin

Post by CliveS »

When I use the IOS app to change the dimmer value it changes in all the right places. When I change the slider on the UI I then get the Set = line appear at what ever i click, I know it does not work but just trying to give an idea of what happens.
Dimmer.jpg
Dimmer.jpg (73.28 KiB) Viewed 3529 times
CliveS

Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

CliveS wrote:When I change the slider on the UI I then get the Set = line appear at what ever i click, I know it does not work but just trying to give an idea of what happens.
Not sure I understand this sentence. That "set" topic only appears when you use the Indigo UI control to set the brightness level, correct? According to the Shelly docs, that topic/payload should work:

https://shelly-api-docs.shelly.cloud/#s ... er-sl-mqtt

Without hardware to test with, I'm not sure I can do anything else here.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
CliveS
Posts: 864
Joined: Sun Jan 10, 2016 5:31 am
Location: Medomsley, County Durham, UK

Re: Using Shelly devices with the MQTT plugin

Post by CliveS »

Using the Indigo UI pressing on and off works, the slider does not change the brightness.
It does update the set = line in the MQTT Explorer window.
CliveS

Indigo 2024.2.1 : macOS Sequoia 15.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

Just for grins, change the "Dimmer Action Payload" template to use double-quotes instead of single quotes.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
roquej
Posts: 628
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by roquej »

I am having a bit of a problem getting a ShellyGas device working with the MQTT Shims plugin.

The trigger definition, I believe, is correct, for all topics for the ShellyGas device. However, I am struggling with how to define the Shims device, as this is not a standard device.

Could anyone point me in the right direction?

Thank you!

JP
Attachments
Device definition, which I think is my problem as this is not a standard device
Device definition, which I think is my problem as this is not a standard device
device definition.jpg (102.39 KiB) Viewed 3016 times
Trigger Definition for all topics for ShellyGas
Trigger Definition for all topics for ShellyGas
trigger definition.jpg (87.48 KiB) Viewed 3016 times
ShellyGas MQTT Explorer info
ShellyGas MQTT Explorer info
explorer.jpg (79.74 KiB) Viewed 3016 times
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

First question - does Aaron already have this one in his plugin? If so, use it. ;)

Second question - what are you actually trying to make the device do? Just show the concentration as sensor value? Be an on/off (alarm) sensor "gas" != "none"?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

Also, your "Unique ID" is always the string with the device serial number in it, which is the "shellygas-1052..." string.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
roquej
Posts: 628
Joined: Sun Jan 04, 2015 4:56 pm
Location: South Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by roquej »

** Sorry, if I responded multiple times. My browse acted up when responding.

Sadly, it does not yet.

I am trying to determine when field "gas" (#1 in structure) is != "none", which should mean the status of "on" (none should then be "off").

Makes sense?
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Shelly devices with the MQTT plugin

Post by kw123 »

I have the gas sensor working w the Shelly-direct

The sensor only triggers- sounds alarm with a relative high gas concentration= The smell is so strong you will want to leave the room
I had to leave the gas burner in for 3 minutes and have the Shelly device next to it. Only the it triggered


Sent from my iPhone using Tapatalk
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Using Shelly devices with the MQTT plugin

Post by FlyingDiver »

roquej wrote:** Sorry, if I responded multiple times. My browse acted up when responding.

Sadly, it does not yet.

I am trying to determine when field "gas" (#1 in structure) is != "none", which should mean the status of "on" (none should then be "off").

Makes sense?
You can't do that with the Generic JSON device, it doesn't have an on/off status. You need to use the On/Off Sensor Device, and for that to work you need to know what the "on" value is going to be. There's (currently) no way to test for not equal to a value. Or you can go ahead and use the Generic JSON device, then use a Masquerade device to turn that into a Sensor.

Or you might want to use the "concentration" value, and then it would be On if it's not zero (I think).
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Post Reply

Return to “MQTT”