is it possible tio see which dzvents script activated device
Posted: Tuesday 05 May 2020 14:17
Hello,
yesterday i had one of the weirdest things.
I had a zwave device(pump) which aparently activated on it's own
looking at the log it seems it was activated by a dzvents script.
the thing is this script does not have the pump device in it
is there a way to tell what activated this device
so it looks like pir sensor triggered dzvents script which turned on switch 19(veranda) and then also triggered Tuinsproeier
this is the script which turned on 2 seconds before the pump but it has no pump device in it
so in my situation it turned on device veranda at 22:05:57 and turned on device tuinsproeier at 22:05:59
this is the script which turns of the Tuinsproeier after 50 minutes
they both have dependency in it regarding timeframe.
yesterday i had one of the weirdest things.
I had a zwave device(pump) which aparently activated on it's own
looking at the log it seems it was activated by a dzvents script.
the thing is this script does not have the pump device in it
is there a way to tell what activated this device
so it looks like pir sensor triggered dzvents script which turned on switch 19(veranda) and then also triggered Tuinsproeier
Code: Select all
2020-05-04 22:05:57.801 Status: OpenZWave: Alarm received (Home Security: Motion Detected at Unknown Location), NodeID: 16 (0x10)
2020-05-04 22:05:57.802 (Aeonlabs Z-wave stick Gen5) Light/Switch (Sensor)
2020-05-04 22:05:57.804 (Aeonlabs Z-wave stick Gen5) General/Alarm (Alarm Type: Burglar 7 (0x07))
2020-05-04 22:05:57.807 (Aeonlabs Z-wave stick Gen5) Light/Switch (PIR sensor)
2020-05-04 22:05:57.858 Status: EventSystem: Script event triggered: /usr/local/domoticz/dzVents/runtime/dzVents.lua
2020-05-04 22:05:57.895 OpenZWave: Domoticz has send a Switch command! NodeID: 19 (0x13)
2020-05-04 22:05:57.897 (Aeonlabs Z-wave stick Gen5) Light/Switch (Veranda)
2020-05-04 22:05:58.326 MQTT: Topic: domoticz/in, Message: {"idx":339,"RSSI":10,"nvalue":0,"svalue":"22.1"}
2020-05-04 22:05:59.475 (Aeonlabs Z-wave stick Gen5) Usage (Watt Tuinlampen)
2020-05-04 22:05:59.479 (Aeonlabs Z-wave stick Gen5) General/kWh (kWh Tuinlampen)
2020-05-04 22:05:59.662 (Aeonlabs Z-wave stick Gen5) Light/Switch (Tuinsproeier)
2020-05-04 22:05:59.713 Status: EventSystem: Script event triggered: /usr/local/domoticz/dzVents/runtime/dzVents.lua
2020-05-04 22:05:59.741 Status: Notification: Domoticz
2020-05-04 22:05:59.742 Notification sent (email) => Success
2020-05-04 22:05:59.742 Notification sent (browser) => Success
2020-05-04 22:05:59.874 Notification sent (telegram) => Success
so in my situation it turned on device veranda at 22:05:57 and turned on device tuinsproeier at 22:05:59
Code: Select all
-- Script wat er voor zorgt dat de veranda verlichting automatisch aan gaat bij beweging
-- PIR sensor staat zelf ingesteld dat deze alleen werkt bij minder dan 5 lux
return {
active = true,
on = {
devices = {
['PIR sensor'] = {'between sunset and 00:00'}
}
},
execute = function(domoticz, beweging)
if beweging.state == 'On' then
domoticz.devices('Veranda').switchOn().checkFirst().forMin(5)
end
end
}they both have dependency in it regarding timeframe.
Code: Select all
-- Script zorgt er voor dat de tuinsproeier na inschakeling altijd weer uit gaat na 50 minuten
return {
active = true,
on = {
devices = { ['Tuinsproeier'] = {'on 01/04-30/09'} }
},
execute = function(domoticz, switch)
local timestamp=domoticz.time.rawTime
if (switch.state == 'On') then
local results = domoticz.helpers.addRollingTextLine(domoticz, 'Status', 'Tuinsproeier ingeschakeld', '4')
domoticz.devices('Tuinsproeier').switchOff().afterMin(50)
--domoticz.notify("Domoticz", timestamp.."\r\n".."Tuinsproeier ingeschakeld", "telegram")
domoticz.globalData.tuinsproeierlaststatus = 'On'
end
if (switch.state == 'Off') then
--tuinsproeierlaststatus wordt gebruikt om geen onnodige off meldingen via telegram te krijgen
if domoticz.globalData.tuinsproeierlaststatus == 'On' then
local results = domoticz.helpers.addRollingTextLine(domoticz, 'Status', 'Tuinsproeier uitgeschakeld', '4')
--domoticz.notify("Domoticz", timestamp.."\r\n".."Tuinsproeier uitgeschakeld", "telegram")
domoticz.globalData.tuinsproeierlaststatus = 'Off'
end
end
end
}