Domoticz not accessible via web after some days or hours
Posted: Tuesday 25 March 2025 19:17
Version: 2024.7
Build Hash: b317cfab1
Compile Date: 2024-07-13 16:59:31
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]
Platform: Pi4b 4GB
Plugin/Hardware: MQTT Client Gateway
My system:
I use domoticz at a Pi4b 4GB in combination with only virtual Seonsors and Actors (Dummy Devices).
At the same Pi4B (actual distribution and updates) I have installed Node-Red (offical and actual release).
At a different hardware I use an MQTT Broker (Server).
Node-Red has subscribed some of the values from the MQTT server, make some calculations and
sends the results for visualisation via JSON to Domoticz.
For switching purposes Domoticz sends MQTT data direct to the MQTT broker.
MQTT Broker and the Pi4b are connected via LAN at the same ethernet switch (1Gbit).
Automatic domoticz backup is enabled.
Devices used are Energy meter, Percentage, Text and temperature.
I set up the system in 2024 and increase the amout from initial 20 domoticz dummy device, step by step, up to 70 now.
Initial all work perfect. But start at christmas time last year I get problems to access the domoticz webpages.
Sometimes after some weeks, sometimes after some hours.
If the problem occurs I get a timeout message from the browser (http and https) and permanent no connection.
Connect the Pi4B via SSH is still possible, RemoteDesktop too.
The Remote Desktop show no overheating of the Pi4b and a CPU load of 25-30% (with running RDP).
All requested testtasks acts fast, no performance problem.
The webpage of Node-Red (located at the same Pi4b) is still accessable.
So my conclution is that the problem is Domoticz and not Node-Red or the Pi4b itself.
Node-Red shows that all trafic send to Domoticz via JSON stops with timeout (No answer).
The only way I found to fix the problem is to stop the Node-Red service, restart the domoticz and start the Node-Red service again.
This works, for days or minutes.
It seems that the problem occus more often if I actually use the Domoticz webend.
After restart the domoticz service I have lost all data during the time the failure occurs, so the failure stops receiving and storage of the data into the database.
To temporary fix the problem I wrote a python program. This program quest every minute the domoticz Version via JSON.
If the failure occurs this read finish with a timeout. Then I automatic stop Node-Red service, restart Domoticz service and start Node-Red service again.
The actions are written to a log. Because of this log I have the info how often the problem occurs.
After restart the domoticz service the domoticz log shows no relevant entries.
I have checked that each Sensorvalue send to domoticz has an updaterate of 5 seconds or more seconds (most 1 minute).
I replace the Pi4b inclusive original Pi powersupply by a identical one.
I install a fresh Raspian, Node-Red and Domoticz.
The sensor data are send via http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx=xx&nvalue=0&svalue=val for example for "General kWh".
What could be the reason?
What is my failure?
Regards
Thomas
Build Hash: b317cfab1
Compile Date: 2024-07-13 16:59:31
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]
Platform: Pi4b 4GB
Plugin/Hardware: MQTT Client Gateway
My system:
I use domoticz at a Pi4b 4GB in combination with only virtual Seonsors and Actors (Dummy Devices).
At the same Pi4B (actual distribution and updates) I have installed Node-Red (offical and actual release).
At a different hardware I use an MQTT Broker (Server).
Node-Red has subscribed some of the values from the MQTT server, make some calculations and
sends the results for visualisation via JSON to Domoticz.
For switching purposes Domoticz sends MQTT data direct to the MQTT broker.
MQTT Broker and the Pi4b are connected via LAN at the same ethernet switch (1Gbit).
Automatic domoticz backup is enabled.
Devices used are Energy meter, Percentage, Text and temperature.
I set up the system in 2024 and increase the amout from initial 20 domoticz dummy device, step by step, up to 70 now.
Initial all work perfect. But start at christmas time last year I get problems to access the domoticz webpages.
Sometimes after some weeks, sometimes after some hours.
If the problem occurs I get a timeout message from the browser (http and https) and permanent no connection.
Connect the Pi4B via SSH is still possible, RemoteDesktop too.
The Remote Desktop show no overheating of the Pi4b and a CPU load of 25-30% (with running RDP).
All requested testtasks acts fast, no performance problem.
The webpage of Node-Red (located at the same Pi4b) is still accessable.
So my conclution is that the problem is Domoticz and not Node-Red or the Pi4b itself.
Node-Red shows that all trafic send to Domoticz via JSON stops with timeout (No answer).
The only way I found to fix the problem is to stop the Node-Red service, restart the domoticz and start the Node-Red service again.
This works, for days or minutes.
It seems that the problem occus more often if I actually use the Domoticz webend.
After restart the domoticz service I have lost all data during the time the failure occurs, so the failure stops receiving and storage of the data into the database.
To temporary fix the problem I wrote a python program. This program quest every minute the domoticz Version via JSON.
If the failure occurs this read finish with a timeout. Then I automatic stop Node-Red service, restart Domoticz service and start Node-Red service again.
The actions are written to a log. Because of this log I have the info how often the problem occurs.
After restart the domoticz service the domoticz log shows no relevant entries.
I have checked that each Sensorvalue send to domoticz has an updaterate of 5 seconds or more seconds (most 1 minute).
I replace the Pi4b inclusive original Pi powersupply by a identical one.
I install a fresh Raspian, Node-Red and Domoticz.
The sensor data are send via http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx=xx&nvalue=0&svalue=val for example for "General kWh".
What could be the reason?
What is my failure?
Regards
Thomas