DzVents stopped working  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

DzVents stopped working

Post 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
Last edited by MartinManders on Tuesday 24 July 2018 10:28, edited 1 time in total.
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents steppe working

Post 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
The most dangerous phrase in any language is:
"We always done this way"
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents steppe working

Post 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....
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DzVents steppe working

Post by tonbor »

Any device name change, that happend to me once.
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents steppe working

Post 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 ;-(
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents stopped working

Post by emme »

can you please post a dzvents script?
The most dangerous phrase in any language is:
"We always done this way"
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: DzVents stopped working

Post 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..
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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)
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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..
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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...
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents stopped working

Post 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
;)
The most dangerous phrase in any language is:
"We always done this way"
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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?
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents stopped working

Post 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 ?
The most dangerous phrase in any language is:
"We always done this way"
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: DzVents stopped working

Post by emme »

can you please post the result for

sudo systemctl start domoticz
The most dangerous phrase in any language is:
"We always done this way"
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Re: DzVents stopped working

Post 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?
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
MartinManders
Posts: 23
Joined: Tuesday 24 July 2018 9:23
Target OS: Linux
Domoticz version: 2023.2
Location: Netherlands

Solved : DzVents stopped working

Post 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 🤓
- Reliability means:
never have to say i am sorry -
Rpi's 3B 1x RFX com + 20 dev 1x ZWave + 130 dev + rpi 4 remote
Andyf66
Posts: 44
Joined: Wednesday 13 June 2018 12:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DzVents stopped working

Post 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.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: DzVents stopped working

Post 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...
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Andyf66
Posts: 44
Joined: Wednesday 13 June 2018 12:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: DzVents stopped working

Post 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.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests