3.9639 z-wave causes webinterface to crash

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Ries
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands
Contact:

3.9639 z-wave causes webinterface to crash

Post by Ries » Friday 15 June 2018 9:53

Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Description:
Domoticz stopped within 2 minutes after reboot after updating to 3.9639 (from 3.95xx). Disabling ATAG ONE plugin delayed it.

After some unstructured debugging (turning plug-ins and other stuff on and off) I created a stable situation with only the atag one plugin disabled.
reenabling the plugin makes domoticz crash again

[EDIT] Crashed anyway after 30 minutes
Last edited by Ries on Monday 18 June 2018 14:08, edited 1 time in total.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

User avatar
waaren
Posts: 910
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by waaren » Friday 15 June 2018 11:31

Ries wrote:
Friday 15 June 2018 9:53
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat
Description:
Domoticz stopped within 2 minutes after reboot after updating to 3.9639 (from 3.95xx). Disabling ATAG ONE plugin delayed it.

After some unstructured debugging (turning plug-ins and other stuff on and off) I created a stable situation with only the atag one plugin disabled.
reenabling the plugin makes domoticz crash again

[EDIT] Crashed anyway after 30 minutes
Did it just stop without any messages in the log or do you see something in that file ?
Compile locally or using the ./updateBeta process ?
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Ries
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by Ries » Friday 15 June 2018 11:43

I updated via rhe menu in domoticz.
No clues in the log in domoticz except for those i recently posted here.
Is there a logfile somewhere? I looked in var/log but and in the directory but didnt see anything obvious
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

User avatar
waaren
Posts: 910
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by waaren » Friday 15 June 2018 11:50

Ries wrote:
Friday 15 June 2018 11:43
Is there a logfile somewhere? I looked in var/log but and in the directory but didnt see anything obvious
on my system the logfile location and activation is defined in /etc/init.d/domoticz.sh.
Spoiler: show
Relevant part of my file:
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=root
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

DAEMON=/opt/domoticz/$NAME
DAEMON_ARGS="-daemon"
DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -log /var/log/domoticz.log"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
Do you see something in that file that points to a logfile ?
If not then a first step might be to activate it.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Ries
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by Ries » Friday 15 June 2018 12:27

Turns out the webinterface doenst work.
But scripts that do not involve z-wave do work.
Image

/tmp/domoticz.txt does not exist
Turns out domotica is actually running but shows offline in the web browser.
Spoiler: show
pi@raspberrypi:~ $ sudo service domoticz.sh status
● domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh)
Active: active (running) since Fri 2018-06-15 11:56:54 CEST; 1h 2min ago
Process: 753 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/domoticz.service
└─780 /home/pi/domoticz/domoticz -daemon -www 8080 -sslwww 443

Jun 15 11:56:54 raspberrypi domoticz.sh[753]: 2018-06-15 11:56:54.731 Status: Domoticz V3.9639 (c)2012-2018 GizMoCuz
Jun 15 11:56:54 raspberrypi domoticz[770]: Domoticz is starting up....
Jun 15 11:56:54 raspberrypi domoticz.sh[753]: 2018-06-15 11:56:54.731 Status: Build Hash: 786b9638, Date: 2018-06-14 16:44:52
Jun 15 11:56:54 raspberrypi domoticz.sh[753]: 2018-06-15 11:56:54.732 Status: Startup Path: /home/pi/domoticz/
Jun 15 11:56:54 raspberrypi domoticz.sh[753]: domoticz: Domoticz is starting up....
Jun 15 11:56:54 raspberrypi domoticz[780]: Domoticz running...
Jun 15 11:56:54 raspberrypi systemd[1]: Started LSB: Home Automation System.
pi@raspberrypi:~ $
Attachments
C2E5D99A-BE41-49D1-BC52-A7A549BBB2C1.png
C2E5D99A-BE41-49D1-BC52-A7A549BBB2C1.png (274.75 KiB) Viewed 414 times
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

User avatar
waaren
Posts: 910
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by waaren » Friday 15 June 2018 13:14

Ries wrote:
Friday 15 June 2018 12:27
Turns out the webinterface doenst work.
But scripts that do not involve z-wave do work.
/tmp/domoticz.txt does not exist
Turns out domotica is actually running but shows offline in the web browser.

the # at the beginning of the line is a comment so effectively you are not logging to a file and/or do not create a PID (Program Identification)

Maybe something else on your system occupies port 8080 ? You could try to use another port number (8084) or something else
On the other problem you had with permissions; I see that you run the domoticz daemon as user PI. to further investigate what the cause of this permission problem is you could try to change this to root and see what happens.

to enable these settings

modify the file as root (sudo nano or sudo vi)
sudo systemctl daemon-reload // reload units
sudo service domoticz restart
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Ries
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by Ries » Friday 15 June 2018 13:52

Waaren, thank you for your patience. I am not savvy with Linux.
Ok perhaps this makes sense:
  • apparently domotica was never 'down', only the webinterface was down. when I 'restarted' domoticz by entering ./domoticz in the domoticz directory I was probably creating another instance of domotica that competed to have the web interface.
  • after fooling around with hardware settings and turning off scripts it seemed stable after disabling the z-wave hardware. When reenabling all but z wave and rebooting the raspberry all seemed stable for at least 30 minutes. then I enabled zwave: after a lot of errors in the log, those errors diminished and :
so far so good.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

rrozema
Posts: 118
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi
Domoticz version: beta
Location: Delft
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by rrozema » Monday 18 June 2018 14:00

The web interface becoming non-responsive is a problem that I and a colleague of mine have had for some months already. Can't tell for my colleague, but mine is domoticz latest beta, running on up-to-date raspbian jessie on a raspberry pi 3, using a razberry gpio zwave shield.

When domoticz is started, at first the webserver works. Then many times the webserver becomes unresponsive after switching one or more devices. Raspberry is still accessible via putty, etc, but the webserver is stuck/dead/unresponsive, whatever you want to call it: nothing happens. Not showing any error for a long time; only after a very long time, chrome reports the page didn't load. Doing a page refresh just shows the blue background, and again nothing. I go into ssh (using putty) and run

Code: Select all

sudo service domoticz stop
, this takes a long time, like 2 minutes or so, then do

Code: Select all

sudo service domoticz start
and try again. Most of the times the stalled webserver remains.

After a few retries I can sometimes get it to work by keeping domoticz off for 5 to 10 minutes (either via service domoticz stop or switching my pi off), then start domoticz and wait a few more minutes without opening a web page. After opening the webserver I don't click any switch, I just go into the log, and see if all non-sleeping z-wave devices have been queried. Once that message shows in the log, I try to switch one light and wait for it to come on or off. It can take up to 5 minutes before that light responds. Once one switch works, I try another, and so on. At first it feels like my (z-wave) network or domoticz is overloaded: switches respond only after a few minutes, and once they do respond, they go through all the commands issued in a very fast pace like they were queued up and then released quickly after one another (so lights flashing on and off in the entire house). But once it works, domoticz keeps on working. As you can guess I am very afraid of restarting my domoticz once it works, because I'm never sure it will come up again after the restart.

In an effort of identifying the cause I have disabled all plugins apart from z-wave. I only have z-wave devices, so running domoticz without z-wave doesn't make sense, and the problem persists. However, as it doesn't happen every time and I need to wait several minutes between each step, it is very hard to reproduce / debug. And there is no error message anywhere in the domoticz log files. But I haven't found any clues as to what exactly the cause is. I did notice some other weird behaviour though that might be related: even though z-wave always replies to each command with the state of the device upon each switch command, sometimes the state of the switch in domoticz doesn't match that of the switch(i.e. a light remains on while domoticz thinks it is off or vice versa). This should never happen as far as I know. And to me it shows that there must be some bug in either openzwave or domoticz in handling z-wave commands. I think this bug may also be causing the z-wave network to be blocked, causing the webserver to block.

Ries
Posts: 33
Joined: Tuesday 01 December 2015 9:47
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Netherlands
Contact:

Re: 3.9639 domoticz stops soon after reboot

Post by Ries » Monday 18 June 2018 14:07

I recall it taking a long time until domoticz stops after the sevice stop command.
So, these might indeed be related issues.
Renaming the issue.
Version 3.9639
Platform: Jessie lite
Hardware: Raspberry pi 3B; RFXCOM; Weather Underground; Dummy; OpenZwave USB; Fritzbox Callmonitor via LAN interface; System Alive Checker (Ping); Philips Hue Bridge; Atag One Thermostat

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests