Minor oints I think:
1) When Indigo starts up after rebooting my system, my device MQTT Broker Connector comes up red. I find that be reloading the MQTT Connector plugin, this fixes itself. Not sure why I need to do this but its been repeated 5 or 6 times now.
2) At random other time, it seems like the MQTT connections to the broker are not going through, even though the MQTT broker plugin says its running. Reloading the MQTT broker plugin fixes this issue. There is nothing in the logs to indicate there was a problem, but my lights simply did not turn on or off when the system command was issued and log says relay went on or off. Looking at MQTT explorer I see broker not functioning properly, and as I said, reloading broker plugin is a fix. I am not sure what initiates this issue when it occurs.
Issues with ShellyNGMQTT after two weeks of use
-
- Posts: 260
- Joined: Sun Feb 24, 2019 7:09 pm
- Location: Virginia, USA
Re: Issues with ShellyNGMQTT after two weeks of use
1) I have also seen some cases where the broker device does not correctly reconnect to my broker. Mine is independent from Indigo and runs on a separate system. I think this affects you much more because your Broker is being supplied by the IndigoMqttBroker plugin. Upon startup, your Broker device is attempting to connect to the Broker, which most likely hasn't fully started up. I took a glance at the MQTTConnector code and I didn't see any automatic reconnect system (this might be in the Python MQTT client library).pgershon wrote:Minor oints I think:
1) When Indigo starts up after rebooting my system, my device MQTT Broker Connector comes up red. I find that be reloading the MQTT Connector plugin, this fixes itself. Not sure why I need to do this but its been repeated 5 or 6 times now.
2) At random other time, it seems like the MQTT connections to the broker are not going through, even though the MQTT broker plugin says its running. Reloading the MQTT broker plugin fixes this issue. There is nothing in the logs to indicate there was a problem, but my lights simply did not turn on or off when the system command was issued and log says relay went on or off. Looking at MQTT explorer I see broker not functioning properly, and as I said, reloading broker plugin is a fix. I am not sure what initiates this issue when it occurs.
You might need to take this to FlyingDiver for a closer look (these are his awesome plugins): viewforum.php?f=316
A temporary solution would be to create a trigger on Server Startup with a delayed (60 seconds?) Server Action of Restart Plugin. You could automate the restart required for the Connector plugin a minute or so after the server starts to give the MQTT plugin time to start.
2) Again, I use an external broker and this appears to be an issue with the broker itself since you say "Looking at MQTT explorer I see broker not functioning properly". I am pretty sure FlyingDiver is exposing an existing Python implementation of the broker protocol, so I'm guessing the issue could lie there somewhere. Are you ever seeing any "ServerCommunicationError" messages in the indigo logs? Unfortunately it sounds like this isn't something you can easily reproduce.
Re: Issues with ShellyNGMQTT after two weeks of use
Thanks very much. Unfortunately you are correct that reproducibility is difficult. And the logs do not reveal "ServerCommunicationError" or any other error message for that matter. Looking at the logs, you would think the relay had turned on.
What I do see periodically in the log is " MQTT Connector Warning Queue for message type 'shellies-ng' has 31 messages pending" where 31 could be any number from 1-60. These messages do not seem to correlate with functionality though. I turn off six MQTTNG devices and one MQTT device at 1 AM daily. They turn on an hour before sunset. The pending messages vary from day to day - sometimes many, sometimes none.
The start up problem is reproducible. I like the trigger idea..
What I do see periodically in the log is " MQTT Connector Warning Queue for message type 'shellies-ng' has 31 messages pending" where 31 could be any number from 1-60. These messages do not seem to correlate with functionality though. I turn off six MQTTNG devices and one MQTT device at 1 AM daily. They turn on an hour before sunset. The pending messages vary from day to day - sometimes many, sometimes none.
The start up problem is reproducible. I like the trigger idea..
- FlyingDiver
- Posts: 7313
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Issues with ShellyNGMQTT after two weeks of use
That means the MQTT connector plugin is receiving MQTT messages, and queueing them, faster that the Shellies plugin is processing them. Unless the number just keeps going up, it's benign. Just means the incoming messages are very bursty. You can suppress the messages by increasing the warning limit in the Connector Plugin config dialog.pgershon wrote:What I do see periodically in the log is " MQTT Connector Warning Queue for message type 'shellies-ng' has 31 messages pending" where 31 could be any number from 1-60. These messages do not seem to correlate with functionality though. I turn off six MQTTNG devices and one MQTT device at 1 AM daily. They turn on an hour before sunset. The pending messages vary from day to day - sometimes many, sometimes none.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Issues with ShellyNGMQTT after two weeks of use
Thanks to all. The trigger at start-up worked. I restart MQTT connector after 60 seconds and the device goes from red to green.
I have changed the warning threshold to 50.
I have changed the warning threshold to 50.