Hi,
I am running Node-RED on a RPI, I have noticed that sensors I have around my house sometimes do not work.
On looking at the Terminal screen after i restarted Node-RED ... I see this
Welcome to Node-RED
===================
8 Nov 08:17:36 - [info] Node-RED version: v2.1.6
8 Nov 08:17:36 - [info] Node.js version: v12.22.12
8 Nov 08:17:36 - [info] Linux 5.15.56-v7+ arm LE
8 Nov 08:17:39 - [info] Loading palette nodes
8 Nov 08:17:45 - [info] Dashboard version 3.1.7 started at /ui
8 Nov 08:17:47 - [warn] Missing node modules:
8 Nov 08:17:47 - [warn] - node-red-contrib-aedes (0.6.0): aedes broker
8 Nov 08:17:47 - [warn] - node-red-contrib-mqtt-broker (0.2.9): mosca in
8 Nov 08:17:47 - [info] Removing modules from config
8 Nov 08:17:47 - [info] Settings file : /home/pi/.node-red/settings.js
8 Nov 08:17:47 - [info] Context store : 'default' [module=memory]
8 Nov 08:17:48 - [info] User directory : /home/pi/.node-red
8 Nov 08:17:48 - [warn] Projects disabled : editorTheme.projects.enabled=false
8 Nov 08:17:48 - [info] Flows file : /home/pi/.node-red/flows.json
8 Nov 08:17:48 - [info] Server now running at http://127.0.0.1:1880/
8 Nov 08:17:48 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
8 Nov 08:17:49 - [info] Starting flows
8 Nov 08:17:50 - [info] Started flows
8 Nov 08:17:51 - [info] [sqlitedb:71cf7c5fab68a227] opened /media/pi/Storage/RPI/Database/RPI - Home/Home - V2.00.db ok
8 Nov 08:17:51 - [info] [sqlitedb:61693413682a0187] opened /media/pi/Storage/RPI/Database/TEST/Test - V2.00.db ok
8 Nov 08:17:51 - [info] [mqtt-broker:52789754.032f7] Connected to broker: mqtt://192.168.1.65:1883
8 Nov 08:18:29 - [info] [mqtt-broker:52789754.032f7] Disconnected from broker: mqtt://192.168.1.65:1883
8 Nov 08:18:32 - [info] [alexa-remote-account:45cd036d.732c4c] intialising with the PROXY method and saved data...
8 Nov 08:18:44 - [info] [mqtt-broker:52789754.032f7] Connected to broker: mqtt://192.168.1.65:1883
8 Nov 08:58:29 - [info] [mqtt-broker:52789754.032f7] Disconnected from broker: mqtt://192.168.1.65:1883
8 Nov 08:58:44 - [info] [mqtt-broker:52789754.032f7] Connected to broker: mqtt://192.168.1.65:1883
8 Nov 09:58:29 - [info] [mqtt-broker:52789754.032f7] Disconnected from broker: mqtt://192.168.1.65:1883
8 Nov 09:58:45 - [info] [mqtt-broker:52789754.032f7] Connected to broker: mqtt://192.168.1.65:1883
There seems to be a pattern ?
I then looked at the mosquitto log and found this
pi@raspberrypi:~ $ sudo tail -n20 -f /var/log/mosquitto/mosquitto.log
1667914641: New client connected from 192.168.1.91:22920 as MQTT Module 91 (p2, c1, k15).
1667914670: Client MQTT Module 91 has exceeded timeout, disconnecting.
1667914693: New connection from 192.168.1.90:4918 on port 1883.
1667914693: New client connected from 192.168.1.90:4918 as MQTT Module 90 (p2, c1, k15).
1667914718: Client MQTT Module 90 has exceeded timeout, disconnecting.
1667914790: New connection from 192.168.1.91:5796 on port 1883.
1667914790: New client connected from 192.168.1.91:5796 as MQTT Module 91 (p2, c1, k15).
1667914814: Client MQTT Module 91 has exceeded timeout, disconnecting.
1667914868: New connection from 192.168.1.92:19537 on port 1883.
1667914868: New client connected from 192.168.1.92:19537 as MQTT Module 92 (p2, c1, k15).
1667914892: Client MQTT Module 92 has exceeded timeout, disconnecting.
1667914937: New connection from 192.168.1.91:27126 on port 1883.
1667914937: New client connected from 192.168.1.91:27126 as MQTT Module 91 (p2, c1, k15).
1667914964: Client MQTT Module 91 has exceeded timeout, disconnecting.
1667915085: New connection from 192.168.1.91:26629 on port 1883.
1667915085: New client connected from 192.168.1.91:26629 as MQTT Module 91 (p2, c1, k15).
1667915108: Client MQTT Module 91 has exceeded timeout, disconnecting.
1667915159: New connection from 192.168.1.92:16366 on port 1883.
1667915159: New client connected from 192.168.1.92:16366 as MQTT Module 92 (p2, c1, k15).
1667915186: Client MQTT Module 92 has exceeded timeout, disconnecting.
1667915232: New connection from 192.168.1.91:7078 on port 1883.
1667915232: New client connected from 192.168.1.91:7078 as MQTT Module 91 (p2, c1, k15).
1667915258: Client MQTT Module 91 has exceeded timeout, disconnecting.
1667915270: New connection from 192.168.1.90:1412 on port 1883.
1667915270: New client connected from 192.168.1.90:1412 as MQTT Module 90 (p2, c1, k15).
1667915294: Client MQTT Module 90 has exceeded timeout, disconnecting.
1667915380: New connection from 192.168.1.91:17561 on port 1883.
1667915380: New client connected from 192.168.1.91:17561 as MQTT Module 91 (p2, c1, k15).
1667915408: Client MQTT Module 91 has exceeded timeout, disconnecting.
I do have battery operated modules ( Module 90 ... 91 ... 92 ) that send data every 10 minutes and between that time they sleep. These are in the list above. Client MQTT Module 90 has exceeded timeout, disconnecting. etc
Is this the problem ?
Do i need to change the Keep alive time for the Broker, if so what time too ?
Thanks
Gaz