Having trouble getting started
Re: Having trouble getting started
Thank you. I got most but not all of these steps already. I believe this filled in the blanks. I need the weekend to get to testing however. I will report back. Really appreciate the plugin. Right now I set the other Shelly plugin up to at least turn the lights on and off - I copied the Shelly One device I had and changed its IP. to teh Shelly Plus One devices. But it can't even sense if lights are on or off. Rudimentary on/off only, like the old X-10 days.
Re: Having trouble getting started
I have one device up and running. One thing I noticed is that when I first created it, I got three devices as I was supposed to. I created device "Front Wall Light 2 MQTT" and got the three devices I was supposed to. But the other two devices were called New Device 1 and New Device 2. When I changed the names of the new devices to match teh primary device, the log still referred to them as "new device":
I will work with it more to set up my other devices this weekend (I have six outside lights using Shelly Plus One and a bunch of older Shelly devices I will move to MQTT as well.
Code: Select all
Jul 1, 2022 at 9:57:41 AM
Trigger MQTT Connector Event
ShellyNGMQTT received "new device 1" off
Jul 1, 2022 at 9:58:30 AM
ShellyNGMQTT sent "new device 1" on
Trigger MQTT Connector Event
Trigger MQTT Connector Event
Trigger MQTT Connector Event
Jul 1, 2022 at 9:59:33 AM
ShellyNGMQTT sent "new device 1" off
Trigger MQTT Connector Event
Trigger MQTT Connector Event
Trigger MQTT Connector EventRe: Having trouble getting started
Updating again. I have all my devices active and working. However, some show up in the log with their correct names, whiles other show up as new device. I cannot determine the rhyme or reason to the pattern,
Six devices below, 3 come up as new device, 3 are names properly
Six devices below, 3 come up as new device, 3 are names properly
Code: Select all
Jul 2, 2022 at 8:56:58 AM
ShellyNGMQTT sent "Back Wall Lighjts 1 MQTT 1" off
Trigger MQTT Connector Event
Trigger MQTT Connector Event
ShellyNGMQTT sent "new device 1" off
Trigger MQTT Connector Event
ShellyNGMQTT sent "new device 1" off
Trigger MQTT Connector Event
ShellyNGMQTT sent "Front Wall Lights 1 MQTT 1" off
Trigger MQTT Connector Event
ShellyNGMQTT sent "Front Wall Lights 2 MQTT 1" off
Trigger MQTT Connector Event
Trigger MQTT Connector Event
Jul 2, 2022 at 8:57:40 AM
ShellyNGMQTT sent "new device 1" off
Trigger MQTT Connector EventRe: Having trouble getting started
I am sorry to keep posting. I have the names showing properly in Indigo now, but I realized teh devices are not actually going off and on like it says they re. My Shelly App still controls teh devices and the ShellyDirect plugin in Indigo works with a few bugs but turns the lights n and off eventually. But the MQTT is not actually turning power on or off. Not sure why. It is tracking the MQTT devices as on or off, but not actually changing their state.
- Attachments
-
- Screen Shot 2022-07-02 at 9.17.54 AM.jpg (235.33 KiB) Viewed 3756 times
-
- Screen Shot 2022-07-02 at 9.17.38 AM.jpg (150.76 KiB) Viewed 3756 times
-
- Screen Shot 2022-07-02 at 9.18.19 AM.png (66.85 KiB) Viewed 3756 times
Re: Having trouble getting started
Sorry to keep posting nut I am trying to get to the bottom of this issue and provide as much information so other can help me diagnose.
I am using MQTT Explorer in conjunction with Indigo and the Shelly app.
When I turn on Shelly Plus One device using the app or the ShellyDirect plugin, MQTT Explorer sees the following:
{"src":"shellyplus1-a8032aba4f74","dst":" shellies-ng/ShellyPlus1-A8032ABA4F74/events","method":"NotifyStatus","params":{"ts":1656774055.79,"switch:0":{"id":0,"output":true,"source":"HTTP"}}}
When I use the ShellyMQTT beta plugin to turn on, I get this on explorer:
{"src": "shellies-ng/ShellyPlus1-A8032ABA4F74", "params": {"on": true, "id": 0}, "id": "66abc716eb0a47a4af6997d9655c837a", "method": "Switch.Set"}
The former turns the lights on. The latter does not.
What am I missing?
I am using MQTT Explorer in conjunction with Indigo and the Shelly app.
When I turn on Shelly Plus One device using the app or the ShellyDirect plugin, MQTT Explorer sees the following:
{"src":"shellyplus1-a8032aba4f74","dst":" shellies-ng/ShellyPlus1-A8032ABA4F74/events","method":"NotifyStatus","params":{"ts":1656774055.79,"switch:0":{"id":0,"output":true,"source":"HTTP"}}}
When I use the ShellyMQTT beta plugin to turn on, I get this on explorer:
{"src": "shellies-ng/ShellyPlus1-A8032ABA4F74", "params": {"on": true, "id": 0}, "id": "66abc716eb0a47a4af6997d9655c837a", "method": "Switch.Set"}
The former turns the lights on. The latter does not.
What am I missing?
Re: Having trouble getting started
Compared the webpages with my device info entered in Indigo. Needed to clean up a leading space and a few other mistypes. All working now!!! Thank you.
Re: Having trouble getting started
What Shelly app are you referring too?pgershon wrote:Sorry to keep posting nut I am trying to get to the bottom of this issue and provide as much information so other can help me diagnose.
I am using MQTT Explorer in conjunction with Indigo and the Shelly app.
What am I missing?
I see your message type is: shellies-ng\ ? the "\" is not in Aaron's instructions. Is that a mis-type possibly?
Indigo 2024.1, Monterey v12.7.6, Dedicated late 2014 Mac Mini, PowerLinc 2413U, Shelly/ShellyNG, Lutron Caséta Smart Bridge PRO (L-BDGPRO2-WH).
Re: Having trouble getting started
It does not matter if you write shellies or something else as long as you are consistent and have a trigger. Many of us use shellies-ng for ShellyMqtt NG to differentiate from ShellyMqtt.cuhouse wrote:What Shelly app are you referring too?pgershon wrote:Sorry to keep posting nut I am trying to get to the bottom of this issue and provide as much information so other can help me diagnose.
I am using MQTT Explorer in conjunction with Indigo and the Shelly app.
What am I missing?
I see your message type is: shellies-ng\ ? the "\" is not in Aaron's instructions. Is that a mis-type possibly?
Sent from my iPad with Tapatalk
Re: Having trouble getting started
Consistency was sort of my point
. If he was following the set of instructions Aaron posted last, then I was just pointing out that I saw this difference.
Looks like he got it working so all good.
Looks like he got it working so all good.
Indigo 2024.1, Monterey v12.7.6, Dedicated late 2014 Mac Mini, PowerLinc 2413U, Shelly/ShellyNG, Lutron Caséta Smart Bridge PRO (L-BDGPRO2-WH).
Re: Having trouble getting started
I now have all the Shelly Plus One devices working. I realized I have one Shelly One (old style) too. I cannot get the device to work with the old plugin.
It seems that ignorer to get the old Shelly One to broadcast MQTT, I must turn off cloud connection. This disables my ability too use the Shelly app on my iPhone. I did not have this issue with the Shelly Plus One devices. Is this by design or am I missing something? My steps are below... (and thanks to everyone making suggestions)
I have the ShellyMQTT and ShellyNGNQTT enabled. Same MQTT Broker for both: Two different triggers - one for each type (with or without NG): Set device webpage to enable MQTT
:
It seems that ignorer to get the old Shelly One to broadcast MQTT, I must turn off cloud connection. This disables my ability too use the Shelly app on my iPhone. I did not have this issue with the Shelly Plus One devices. Is this by design or am I missing something? My steps are below... (and thanks to everyone making suggestions)
I have the ShellyMQTT and ShellyNGNQTT enabled. Same MQTT Broker for both: Two different triggers - one for each type (with or without NG): Set device webpage to enable MQTT
:
-
aaronlionsheep
- Posts: 263
- Joined: Sun Feb 24, 2019 7:09 pm
Re: Having trouble getting started
I'm glad to see you were able to get that sorted out!
. If you change the name of the device, then you have to restart the device comms before the logger will log with the new name. This occurs when you uncheck and check the "Enable Communication" checkbox in the device list, when you restart the plugin (causes all device comms to be restarted), or make a device configuration change that restarts the comms. This will eventually be corrected along with some other small, but annoying, behavior.
Since you have done some deep digging while debugging this, you might be interested to know how it all works under the hood. Karl's Shelly Direct plugin is making HTTP requests to the device, and that is why you specify the IP address of the Shelly for that plugin. ShellyNGMQTT is sending commands over MQTT. You will notice that you can see ALL traffic between ShellyNGMQTT and the device, but only status updates after commands from Shelly Direct.
This message is what you saw appear after controlling the device with Shelly Direct. It is actually the Shelly broadcasting that its state just changed. You can see the Method was "NotifyStatus", and there is a section of "switch:0" having a payload of '{"id":0,"output":true,"source":"HTTP"}'. This is notify everyone about a change on Switch #0 of the device turning on, and the origin of the command came from HTTP.
Ah, well there is a pattern here that I haven't bothered to fix yetpgershon wrote:Updating again. I have all my devices active and working. However, some show up in the log with their correct names, whiles other show up as new device. I cannot determine the rhyme or reason to the pattern,
Six devices below, 3 come up as new device, 3 are names properly
Code: Select all
Jul 2, 2022 at 8:56:58 AM ShellyNGMQTT sent "Back Wall Lighjts 1 MQTT 1" off Trigger MQTT Connector Event Trigger MQTT Connector Event ShellyNGMQTT sent "new device 1" off Trigger MQTT Connector Event ShellyNGMQTT sent "new device 1" off Trigger MQTT Connector Event ShellyNGMQTT sent "Front Wall Lights 1 MQTT 1" off Trigger MQTT Connector Event ShellyNGMQTT sent "Front Wall Lights 2 MQTT 1" off Trigger MQTT Connector Event Trigger MQTT Connector Event Jul 2, 2022 at 8:57:40 AM ShellyNGMQTT sent "new device 1" off Trigger MQTT Connector Event
Since you have done some deep digging while debugging this, you might be interested to know how it all works under the hood. Karl's Shelly Direct plugin is making HTTP requests to the device, and that is why you specify the IP address of the Shelly for that plugin. ShellyNGMQTT is sending commands over MQTT. You will notice that you can see ALL traffic between ShellyNGMQTT and the device, but only status updates after commands from Shelly Direct.
This message is what you saw appear after controlling the device with Shelly Direct. It is actually the Shelly broadcasting that its state just changed. You can see the Method was "NotifyStatus", and there is a section of "switch:0" having a payload of '{"id":0,"output":true,"source":"HTTP"}'. This is notify everyone about a change on Switch #0 of the device turning on, and the origin of the command came from HTTP.
Code: Select all
{"src":"shellyplus1-a8032aba4f74","dst":" shellies-ng/ShellyPlus1-A8032ABA4F74/events","method":"NotifyStatus","params":{"ts":1656774055.79,"switch:0":{"id":0,"output":true,"source":"HTTP"}}}-
aaronlionsheep
- Posts: 263
- Joined: Sun Feb 24, 2019 7:09 pm
Re: Having trouble getting started
The older shelly devices use the ESP8266 SoC, so they are generally inferior to these new devices (they have an ESP32). They have less memory, onboard storage, processing power, and less efficiency. So yes, it is by design (of Shelly) that you get to use MQTT or Cloud, but not both at the same time. There is also a note in the web UI that confirms this, "WARNING: If you enable MQTT - actions via Cloud connection will be disabled!".pgershon wrote:I now have all the Shelly Plus One devices working. I realized I have one Shelly One (old style) too. I cannot get the device to work with the old plugin.
It seems that ignorer to get the old Shelly One to broadcast MQTT, I must turn off cloud connection. This disables my ability too use the Shelly app on my iPhone. I did not have this issue with the Shelly Plus One devices. Is this by design or am I missing something? My steps are below... (and thanks to everyone making suggestions)
I have the ShellyMQTT and ShellyNGNQTT enabled. Same MQTT Broker for both: Two different triggers - one for each type (with or without NG): Set device webpage to enable MQTT
:
Can you confirm that your Topic Component Match has the broker selected? The screenshot you provided has this empty. Please also show the screenshot of the device configuration in Indigo. I'd like to confirm the address matches what you have specified.
Re: Having trouble getting started
Thanks. After playing with both of your plugins, I think I will make it my go to method (Karl's plugin does not do the Shelly One Plus well at this point at least).
But I ended up deactivating cloud access to my old Shelly One unit ignorer to get MQTT running. Is there a way around this? By deactivating the cloud, the my iPhone's Shelly app, your plug in, and Karl's plugin go out of sync. I turn the device on/off from your Indigo app/MQTT and the device is turned on/off properly, and Karl's device's status is sync'ed, but the iPhone app is not (it stays status on or off while teh lights go back and forth). Conversely, I can use the iPhone app to turn the lights on or off and the status of Karl's plugin reflect this, but there is no MQTT message being sent so the status of the MQTT device remains unchanged in Indigo.
Hopefully that made sense.
But I ended up deactivating cloud access to my old Shelly One unit ignorer to get MQTT running. Is there a way around this? By deactivating the cloud, the my iPhone's Shelly app, your plug in, and Karl's plugin go out of sync. I turn the device on/off from your Indigo app/MQTT and the device is turned on/off properly, and Karl's device's status is sync'ed, but the iPhone app is not (it stays status on or off while teh lights go back and forth). Conversely, I can use the iPhone app to turn the lights on or off and the status of Karl's plugin reflect this, but there is no MQTT message being sent so the status of the MQTT device remains unchanged in Indigo.
Hopefully that made sense.
-
aaronlionsheep
- Posts: 263
- Joined: Sun Feb 24, 2019 7:09 pm
Re: Having trouble getting started
Ah I think I see the problem. Please try unchecking the "Use custom MQTT prefix" in the Web UI. The old devices don't need that set and default to broadcast on shellies/<device_id>. Then, in your Indigo device config, update your address to be "shellies/shelly1-xxxxx" (filling in the x's).pgershon wrote:Thanks. After playing with both of your plugins, I think I will make it my go to method (Karl's plugin does not do the Shelly One Plus well at this point at least).
But I ended up deactivating cloud access to my old Shelly One unit ignorer to get MQTT running. Is there a way around this? By deactivating the cloud, the my iPhone's Shelly app, your plug in, and Karl's plugin go out of sync. I turn the device on/off from your Indigo app/MQTT and the device is turned on/off properly, and Karl's device's status is sync'ed, but the iPhone app is not (it stays status on or off while teh lights go back and forth). Conversely, I can use the iPhone app to turn the lights on or off and the status of Karl's plugin reflect this, but there is no MQTT message being sent so the status of the MQTT device remains unchanged in Indigo.
Hopefully that made sense.
I don't think there is a way around using MQTT and the Cloud connection at the same time on the old devices. The old generation of devices don't seem to have enough processing power to keep an MQTT connection and Cloud connection established at the same time.
Re: Having trouble getting started
Thanks. I turned off custom and was able to get rid of the extra "shellies/" in device name. It certainly works. One thing I notice is that when I turn device on/off from web page (using its static IP address), MQTT does not see the status change. And the "send status request option" does not correct. the problem.
Looking at MQTT Explorer, there is a MQTT message sent when the light is turned on. And The Shelly Direct plugin is updating status. But the ShellyMQTT is not upating. And the send status request is sending something over MQTT as I can see in MQTT Explorer, but it is saying the lights are off, when in reality the web interface sys they are on.
Of course its possible that the web interface is wrong about the true status of the lights/ Its pouring out now so I cant go out to check.
Looking at MQTT Explorer, there is a MQTT message sent when the light is turned on. And The Shelly Direct plugin is updating status. But the ShellyMQTT is not upating. And the send status request is sending something over MQTT as I can see in MQTT Explorer, but it is saying the lights are off, when in reality the web interface sys they are on.
Of course its possible that the web interface is wrong about the true status of the lights/ Its pouring out now so I cant go out to check.