Page 1 of 2
DzVents stopped working
Posted: Tuesday 24 July 2018 9:51
by MartinManders
Hey Guys,
I have a rather strange problem.
I've got 2 raspberry 2's serving Domoticz.
Both rasp 4.97 latest stable.
One with RFX (klikaan with 30 devices ) and one with Aeotec dongle (ZWave with 60 devices)
Python version 2.7.13 I checked.
Suddenly stopped the Dzvents stopped at the ZWave rasp.
Everything works fine except INTERNAL event system?
LUA scripts (externally works fine, but DzVents INTERNALLY nothing happens (it had worked clueless)
I checked (almost) everything but with no result.
I rebooted Domoticz, I rebooted the raspberry, no special errors?
2018-07-24 09:48:06.388 Status: EventSystem: reset all events...
2018-07-24 09:48:06.389 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Batterij_Check.lua
2018-07-24 09:48:06.389 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Veranda.lua
2018-07-24 09:48:06.390 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/laatstepoging.lua
As you see in naming the last script, my options are over ....
Somebody ideas?
Thanks
Martin
Re: DzVents steppe working
Posted: Tuesday 24 July 2018 10:01
by emme
have you already checked under SETTINGS/OTHER that LUA and DZVENTS are enabled?
did you change the main theme? some themes does not include the flag correctly
for dzVents... are there more script triggered by the same device?
ciao
M
Re: DzVents steppe working
Posted: Tuesday 24 July 2018 10:11
by MartinManders
Hey,
Thanks for your quick reply.
On both systems are LUA and DzVentz enabled.
If I share the function between the rasp's then one rasp acts on the event, the other doesn't.
(Same script) I copied it over and back....
Re: DzVents steppe working
Posted: Tuesday 24 July 2018 10:17
by tonbor
Any device name change, that happend to me once.
Re: DzVents steppe working
Posted: Tuesday 24 July 2018 10:27
by MartinManders
DzVents just reacts on a timer event, but not on a device event.
I just renamed the device in both systems, One does react, the other doesn't.
Tried with both systems, no luck ;-(
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 15:47
by emme
can you please post a dzvents script?
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 15:50
by elmortero
Might sound silly, but did the trick a while ago for me:
In settings I disabled dzvents and eventsystemen and enabled them again..
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 15:58
by MartinManders
Hey Emme,
For this exercise I'm using a simple scripts, so there is no chance of naming issues etc..
I use this script on both Rpi's one works, one doesn't.
return {
on = {
devices = {
'KF1', 'KF3'
}
},
execute = function(domoticz, device)
domoticz.devices('Robin Spots').dimTo(50)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
end
}
Logging of working Rpi:
2018-07-24 15:55:43.136 (Meterkast) Light/Switch (KF1)
2018-07-24 15:55:43.377 (Home) Lighting 2 (Robin Spots)
2018-07-24 15:55:43.273 Status: dzVents: Info: Handling events for: "KF1", value: "On"
2018-07-24 15:55:43.273 Status: dzVents: Info: ------ Start internal script: veranda51: Device: "KF1 (Meterkast)", Index: 280
2018-07-24 15:55:43.274 Status: dzVents: Info: Device KF1 was changed
Logging of non-working Rpi:
2018-07-24 15:55:38.193 (Slimme meter) P1 Smart Meter (Power)
2018-07-24 15:55:42.399 (AEON) Thermostat (Therm R-R)
2018-07-24 15:55:43.129 (AEON) Light/Switch (KF1)
2018-07-24 15:55:44.745 (AEON) Thermostat (Therm Badkamer)
2018-07-24 15:55:48.199 (Slimme meter) P1 Smart Meter (Power)
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 16:03
by MartinManders
elmortero wrote: ↑Tuesday 24 July 2018 15:50
Might sound silly, but did the trick a while ago for me:
In settings I disabled dzvents and eventsystemen and enabled them again..
Sounded as something I haven't tried.
But also disabling en enabling didn't make the difference..
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 16:12
by MartinManders
Hereby the logging from both systems when I stopped the Eventsystem:
2018-07-24 15:59:09.187 Status: EventSystem: Stopped...
2018-07-24 15:59:21.859 Status: EventSystem: reset all events...
2018-07-24 15:59:21.860 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/sunscreen.lua
2018-07-24 15:59:21.861 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/test.lua
2018-07-24 15:59:21.861 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/veranda51.lua
2018-07-24 15:59:21.861 Status: EventSystem: reset all device statuses...
2018-07-24 15:59:21.865 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2018-07-24 15:59:21.865 Status: EventSystem: Started
2018-07-24 15:59:21.866 Status: EventSystem: reset all events...
2018-07-24 15:59:21.865 Status: EventSystem: Queue thread started...
2018-07-24 15:59:21.868 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/sunscreen.lua
2018-07-24 15:59:21.868 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/test.lua
2018-07-24 15:59:21.868 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/veranda51.lua
2018-07-24 15:59:21.868 Status: EventSystem: reset all device statuses...
2018-07-24 15:59:38.098 Status: EventSystem: Stopped...
2018-07-24 16:00:07.391 Status: EventSystem: reset all events...
2018-07-24 16:00:07.393 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Batterij_Check.lua
2018-07-24 16:00:07.393 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Veranda.lua
2018-07-24 16:00:07.394 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/laatstepoging.lua
2018-07-24 16:00:07.394 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/laatstepoging1.lua
2018-07-24 16:00:07.394 Status: EventSystem: reset all device statuses...
2018-07-24 16:00:07.407 Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
2018-07-24 16:00:07.408 Status: EventSystem: Started
2018-07-24 16:00:07.408 Status: EventSystem: Queue thread started...
2018-07-24 16:00:07.409 Status: EventSystem: reset all events...
2018-07-24 16:00:07.410 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Batterij_Check.lua
2018-07-24 16:00:07.410 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/Veranda.lua
2018-07-24 16:00:07.410 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/laatstepoging.lua
2018-07-24 16:00:07.411 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/laatstepoging1.lua
2018-07-24 16:00:07.411 Status: EventSystem: reset all device statuses...
Re: DzVents stopped working
Posted: Tuesday 24 July 2018 16:26
by emme
The answer to your question is:
Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
which lead to an already discovered problem with a (probably) solution
viewtopic.php?t=19122

Re: DzVents stopped working
Posted: Tuesday 24 July 2018 21:43
by MartinManders
emme wrote: ↑Tuesday 24 July 2018 16:26
The answer to your question is:
Status: EventSystem - Python: Failed dynamic library load, install the latest libpython3.x library that is available for your platform.
which lead to an already discovered problem with a (probably) solution
viewtopic.php?t=19122
I tried updating the python version as discribed, now my system is totally down.
Domoticz off-line.
Tried several things (rebooting, updating domoticz), the domoticz service is running but no way to connect to the server?
Any idea's?
Re: DzVents stopped working
Posted: Wednesday 25 July 2018 8:04
by emme
You probably have python issues..
try to disable all plugins (rename plugin.py in each folder under /home/pi/domoticz/plugin )
if this does not fix then try
/home/pi/domoticz/updaterelease
ciao
M
P.S.
did you update/upgrade the PI via apt-get or rpiupdate ?
Re: DzVents stopped working
Posted: Wednesday 25 July 2018 8:33
by MartinManders
emme wrote: ↑Wednesday 25 July 2018 8:04
You probably have python issues..
try to disable all plugins (rename plugin.py in each folder under /home/pi/domoticz/plugin )
if this does not fix then try
/home/pi/domoticz/updaterelease
ciao
M
P.S.
did you update/upgrade the PI via apt-get or rpiupdate ?
Hey goodmorning,
That was also my idea, but how to fix this?
I've renamed the plugin, start stopped, no luck.
I did again the ./updaterelease but also that doesn't fix the problem.
EDIT: I used apt-get to update
Thankx in advance
Martin
Re: DzVents stopped working
Posted: Wednesday 25 July 2018 10:18
by emme
can you please post the result for
sudo systemctl start domoticz
Re: DzVents stopped working
Posted: Wednesday 25 July 2018 17:43
by MartinManders
emme wrote: ↑Wednesday 25 July 2018 10:18
can you please post the result for
sudo systemctl start domoticz
Hai Emme,
pi@Meterkast:~/domoticz$ sudo systemctl start domoticz
pi@Meterkast:~/domoticz$
No result/error or working server ...
Or do you need some logging, and if yes, witch logging?
Solved : DzVents stopped working
Posted: Wednesday 25 July 2018 19:29
by MartinManders
MartinManders wrote: ↑Wednesday 25 July 2018 17:43
emme wrote: ↑Wednesday 25 July 2018 10:18
can you please post the result for
sudo systemctl start domoticz
Hai Emme,
pi@Meterkast:~/domoticz$ sudo systemctl start domoticz
pi@Meterkast:~/domoticz$
No result/error or working server ...
Or do you need some logging, and if yes, witch logging?
At last I gave up. I had a recent backup, sow I installed a fresh Stretch, installed Domoticz fresh, updated/upgraded. And put my backup back to the new system. 10 minutes fingers crossed, and all my zwave devices are working.
Thanks for the advices, and remember; always make backups

Re: DzVents stopped working
Posted: Wednesday 25 July 2018 22:40
by Andyf66
I’ve been having dzvents problems that started today too. Not sure if they are related.
Everything was working fine until I edited some scripts this morning. I left them saved and enabled all day but with some syntax errors.Ive now fixed these errors.
The events system starts up ok, but some scripts resolutely refuse to be called on device events. I see the event in the logs, but the script isn’t called.
What makes it more weird is that it is inconsistent. I made identical copies of scripts, and enabled them alternately so that only a single one was enabled at a time. Some are called, and some not, and even worse, enabling and disabling them seems to change whether unrelated other scripts respond to their events or not. It makes no sense!
The Ras Pi has not be changed in any way for a number of days so I’m sure it’s not that.
Any suggestions? Database corruption? Luckily I have hourly/daily dB backups and full nightly system backups.
Re: DzVents stopped working
Posted: Thursday 26 July 2018 0:01
by waaren
Andyf66 wrote: ↑Wednesday 25 July 2018 22:40
I’ve been having dzvents problems that started today too. Not sure if they are related.
Everything was working fine until I edited some scripts this morning. I left them saved and enabled all day but with some syntax errors.Ive now fixed these errors.
The events system starts up ok, but some scripts resolutely refuse to be called on device events. I see the event in the logs, but the script isn’t called.
What makes it more weird is that it is inconsistent. I made identical copies of scripts, and enabled them alternately so that only a single one was enabled at a time. Some are called, and some not, and even worse, enabling and disabling them seems to change whether unrelated other scripts respond to their events or not. It makes no sense!
The Ras Pi has not be changed in any way for a number of days so I’m sure it’s not that.
Any suggestions? Database corruption? Luckily I have hourly/daily dB backups and full nightly system backups.
@Andyf66, just a thought ; if you got syntax errors and dzVents complained about them all day (to the log) and if your log is on the sd card ?
That excessive writing to the log might have caused the sd card to go bad.
Again just a thought...
Re: DzVents stopped working
Posted: Thursday 26 July 2018 0:20
by Andyf66
[/b][/b]
waaren wrote: ↑Thursday 26 July 2018 0:01
@Andyf66, just a thought ; if you got syntax errors and dzVents complained about them all day (to the log) and if your log is on the sd card ?
That excessive writing to the log might have caused the sd card to go bad.
Again just a thought...
Unlikely as it’s runing from an SSD drive via a USB->SATA adaptor. Nice idea though.
I’m going to restore a database backup in the morning to see how that goes, and if that fails I’ll roll back to a full system backup from the night before.