monitor
monitor copied to clipboard
Monitor as service eventually stops (working?) sending MQTT messages
I have noticed via MQTT messages that monitor will stop sending any messages to MQTT after a while. I have node-red that sends arrive/depart/echo/rssi every 15 seconds. The only message that survives is the echo which responds with ok without fail.
The only reliable way for me to run it is on command line with -V option.
Hi, I don't know if this is the same thing, but i noticed that the topics created by monitor on my mqtt broker will disappear over time. i noticed this after i had left mqtt-explorer connected to my broker for some time then if i disconnected mqtt-explorer then reconnected it again the monitor topics where no longer there. I thought my monitor nodes where crashing or failing or something else was wrong, however if i was just patient i found the mqtt topics would reappear once the monitor ble phones would have a status change.
@nickh66 this is not the same thing - what you're describing is the normal behavior of MQTT messages.
By default, MQTT messages are delivered to all clients connected at the time of message send and then disappear. To make the messages stick around for clients that connect after they are sent (such as your stated case), you can set the 'retain' flag.
To enable message retaining in monitor
messages, you can either:
a) start monitor
with the -x
flag
b) set PREF_SHOULD_RETAIN=true
in the behavior_preferences
file
I am running monitor.sh on a rasp0w, and the btle_text_listener process disappears (presumably dies or is killed) after a few hours of running and the rest of the processes are still present, and then no more mqtt reports. The rasp0w is connected the network via a wired connection via a usb dongle.