Announcement
Collapse
No announcement yet.
Any possibilty to detect this state to trigger event?
Collapse
X
-
When the user selects the internal MQTT broker, then mcsMQTT sends a heartbeat message and expects it to be returned from the broker. If it does not receive it, then something is wrong with the broker so mcsMQTT tries to restart the internal broker with a graceful stop and restart. Apparently, this stop/restart is not accomplishing its objective otherwise you would not be posting the question.
I know there are issues with the library I am using for the internal broker and that is one of the reasons I included the heartbeat monitoring. It is unfortunate that mcsMQTT was able to detect the failure mode, but not able to restart the internal broker with success. Since I have never experienced a failure of the internal broker it is hard to debug.
There currently is no additional notification provided that could easily be used as a trigger. The message you see on the console also goes to the mcsMQTT deubg log so if you want to ready the file and look for the message then you could use that for a trigger.
At the same time, if the graceful restart of the broker is not working then either of two approaches are available. One is to change the graceful recovery to a more dramatic one of restarting the plugin. In essence this is your objective. The other is to try to diagnose why the graceful recovery is not successful.
We already know there is an issue with the library being used for the internal broker that shows up for some but not all users. It has not had any updates for multiple years so is in essence an unsupported library. Mosquitto is an actively supported MQTT Broker and works quite well with a small resource footprint. Installing it rather than using the internal broker is the path that I would recommend.
-
When I have time, i will invest it in rollout of Mosquiitto. Beginners question: is it possible to install it on the same machine as HomeSeer? Because I don't plan to have another device running 24/7.
As for the error message: not happening anymore. I think it started when installing the latest update (which disables the hartbeat showing in the plugin window). At the same time I added some devices, so i was not sure which of both might have been the problem. When searching on the forum, i found that with the new update, the heartbeat display was enabled with the debugging. I did that to be able to see when it stopped easely, and since then no issues.
Difficult to tell if there is a link, but so for so good.
Comment
-
Things were getting more and more unstable, so I finally forced myself to install Mosquitto. For the moment I installed an older version, since in version 2 I was only able to get the localhost (127.0.0.1) working, not the ip adress of the interface which was necessary for the config of mcsMQTT to bypass the intenal broke. Played around with listeners and bindings, but nothing was working. But the older version is working perfectly, so far so good.
Comment
-
My mosquitto.conf file for the version 2 Mosquitto is
Code:# Place your local configuration in /etc/mosquitto/conf.d/ # # A full description of the configuration file is at # /usr/share/doc/mosquitto/examples/mosquitto.conf.example pid_file /run/mosquitto/mosquitto.pid persistence true persistence_location /var/lib/mosquitto/ log_dest file /var/log/mosquitto/mosquitto.log listener 1883 allow_anonymous true include_dir /etc/mosquitto/conf.d
Comment
Comment