I'm glad to see you were able to get that sorted out!
pgershon 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
Ah, well there is a pattern here that I haven't bothered to fix yet
. 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.
- 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"}}}