Using Shelly devices with the MQTT plugin

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 »

Screenshot 2020-02-12 at 21.37.01.png
Screenshot 2020-02-12 at 21.37.01.png (80.81 KiB) Viewed 4091 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 »

Oh, wait. You have the "Unique ID Location" set to Payload. It should be Topic. I need to make that error message more clear.
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:Oh, wait. You have the "Unique ID Location" set to Payload. It should be Topic. I need to make that error message more clear.
Yes, that was it :oops: , I thought I had copied the Shelly1PM and just changed the "relay" to "light", getting too old for this...Thanks and sorry to waste your time.
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
MarcoGT
Posts: 1148
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Using Shelly devices with the MQTT plugin

Post by MarcoGT »

Yesterday I installed a Shelly Dimmer, totally unsatisfied with it; dimmering is basically not working (no difference between 50% and 100%); response when using the switch is very slow.
I think the best are still the Fibaro (or Qubino)
siclark
Posts: 2356
Joined: Tue Jun 13, 2017 5:08 am
Location: UK

Re: Using Shelly devices with the MQTT plugin

Post by siclark »

MarcoGT wrote:Yesterday I installed a Shelly Dimmer, totally unsatisfied with it; dimmering is basically not working (no difference between 50% and 100%); response when using the switch is very slow.
I think the best are still the Fibaro (or Qubino)
That's a shame I was hoping for some cheaper alternatives.
Has anyone else has better success with dimmers?
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 »

siclark wrote:
MarcoGT wrote:Yesterday I installed a Shelly Dimmer, totally unsatisfied with it; dimmering is basically not working (no difference between 50% and 100%); response when using the switch is very slow.
I think the best are still the Fibaro (or Qubino)
That's a shame I was hoping for some cheaper alternatives.
Has anyone else has better success with dimmers?
I have the Shelly Dimmer and I have had no problems, I can see a difference between 50% and 100% and it is almost instant from the iPhone app, can't say about speed from the Shims as I cannot get the on/off or dim to work so can anyone with the the dimmer let me know what the device settings you are using please.

I also can't get the Shelly1PM to turn on/off from the shims and for some reason I get a battery indicator for energy and on/off but not for power or tempC so device settings for that also would be appreciated.

MarcoGT have you done a calibration and set to trailing edge (if you have LED's)
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
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 »

CliveS wrote:I have the Shelly Dimmer and I have had no problems, I can see a difference between 50% and 100% and it is almost instant from the iPhone app, can't say about speed from the Shims as I cannot get the on/off or dim to work so can anyone with the the dimmer let me know what the device settings you are using please.

I also can't get the Shelly1PM to turn on/off from the shims and for some reason I get a battery indicator for energy and on/off but not for power or tempC so device settings for that also would be appreciated.
To answer my own question above, I re-read the messages and saw a screenshot from Jody showing "shellies/{{uniqueID}}/" and I had not changed it from the default "cmnd/{{uniqueID}}/" so thanks Jody!

What I cannot get to work is the dimmer, I suspect it is because brightness is nested off of Status.
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: What I cannot get to work is the dimmer, I suspect it is because brightness is nested off of Status.
Does the Shim device show the current brightness level when you control the light directly? If so, then you have that part set up correctly.

The commands to change the brightness are totally separate from the payload.

Get the first part (correct status) working first, then worry about commanding the device.
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:
CliveS wrote: What I cannot get to work is the dimmer, I suspect it is because brightness is nested off of Status.
Does the Shim device show the current brightness level when you control the light directly? If so, then you have that part set up correctly.

The commands to change the brightness are totally separate from the payload.

Get the first part (correct status) working first, then worry about commanding the device.
If I turn on the dimmer it shows 100, turn it off it shows 0, click anywhere on the dimmer bar and it gives the value in the UI but the slider flicks back to full on and the bulb does not register any change.
If I change from the IOS app then the bulb changes but the UI does not.
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: If I turn on the dimmer it shows 100, turn it off it shows 0, click anywhere on the dimmer bar and it gives the value in the UI but the slider flicks back to full on and the bulb does not register any change.
If I change from the IOS app then the bulb changes but the UI does not.
OK, show a screen grab of your connector trigger and your shim device configuration. And an MQTT Explorer screenshot of the message sent by the iOS app if possible.
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 »

Screenshot 2020-02-15 at 14.56.39.png
Screenshot 2020-02-15 at 14.56.39.png (88.94 KiB) Viewed 3979 times
Screenshot 2020-02-15 at 14.51.38.png
Screenshot 2020-02-15 at 14.51.38.png (92.6 KiB) Viewed 3979 times
Screenshot 2020-02-15 at 14.44.39.png
Screenshot 2020-02-15 at 14.44.39.png (156.28 KiB) Viewed 3979 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 »

First, your trigger is wrong. You're trying to trigger on the command sent to the device. You need to trigger on the status update from the device, which is what you show in the MQTT Explorer image:

Code: Select all

Match: shellies
Any:
Match: light
Match: 0
Match: status
End:
Second, your payload type is wrong. As you can see in the Explorer output, that payload is JSON. With a key of "brightness".

Your action template looks correct for turning the device on and off. I need to check the code to see how you would set the brightness. If you can at all right now. I don't remember.
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:First, your trigger is wrong. You're trying to trigger on the command sent to the device. You need to trigger on the status update from the device, which is what you show in the MQTT Explorer image:

Code: Select all

Match: shellies
Any:
Match: light
Match: 0
Match: status
End:
Second, your payload type is wrong. As you can see in the Explorer output, that payload is JSON. With a key of "brightness".

Your action template looks correct for turning the device on and off. I need to check the code to see how you would set the brightness. If you can at all right now. I don't remember.
Turning on and off works but with a delay sometimes of 15 seconds where as the Shelly1PM relay reports on/off in 1 or 2 seconds.

The dimmer value in the UI is updating from the iPhone instantly but the bulb does not change.

You did mention you were working on a JSON aggregator for the Shellies, not sure how that is going but if that makes it easier then I can wait for that to arrive, just pleased with what you have done so far, it is impressive.
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:
Turning on and off works but with a delay sometimes of 15 seconds where as the Shelly1PM relay reports on/off in 1 or 2 seconds.

The dimmer value in the UI is updating from the iPhone instantly but the bulb does not change.

You did mention you were working on a JSON aggregator for the Shellies, not sure how that is going but if that makes it easier then I can wait for that to arrive, just pleased with what you have done so far, it is impressive.
Did you make the change I described?

Turning on and off how? The Shelly app? Via MQTT message? Does the Shelly app show the change immediately, but not the plugin? What messages are you seeing from the device between the command to turn on/off and the device update?

What does "updating from the iPhone" mean? The dimmer bar in the Indigo UI will change if you tell Indigo to change the brightness, but right now I don't think that actually gets sent to the device. I need to check.

The aggregator is really for sensor devices. I don't think it's going to make much difference with dimmers and relays.
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 »

Yes my message did not make much sense re-reading it, I think the delay of the iPhone showing on/off is due to the shelly app and not shims as that is reacting immediately.
I did make the changes and the log reflects it is

Code: Select all

 MQTT Shims Debug                shellydimmer-F3A8BA On-Off: state = 38
   MQTT Shims Debug                shellydimmer-F3A8BA On-Off: shimDimmer, state_key = brightness, value_key = brightness, data = {u'brightness': 38, u'mode': u'white', u'ison': False}, state = 38, value = 38
   MQTT Shims Debug                shellydimmer-F3A8BA On-Off: Updating brightnessLevel to 38

"updating from the iPhone" means I move the shelly app dimmer bar left and right and that is reflected in the UI immediately but as you say does not get sent to the device.

I did manage to get all the date imported into GhostXML as JSON by using http://xx.xx.xx.xx/status, not sure if that is helpful or not.
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
Post Reply

Return to “MQTT”