thank you, tried your code but i unfortunately get the same result.
also, my log is not giving any more information:
Code: Select all
2019-09-09 21:17:08.209 Status: dzVents: Info: Handling events for: "Deur kast tuinkamer", value: "Open"
2019-09-09 21:17:08.209 Status: dzVents: Info: ------ Start internal script: Alarm away dzvents: Device: "Deur kast tuinkamer (zigbee2mqtt)", Index: 682
2019-09-09 21:17:08.215 Status: dzVents: Info: ------ Finished Alarm away dzvents
2019-09-09 21:17:11.088 (domo slave) General/Percentage (CPU_slave)
2019-09-09 21:17:12.971 (hpauto) General/Percentage (hpauto cpu)
2019-09-09 21:17:13.113 Status: dzVents: Info: Handling events for: "Deur kast tuinkamer", value: "Closed"
2019-09-09 21:17:13.114 Status: dzVents: Info: ------ Start internal script: Alarm away dzvents: Device: "Deur kast tuinkamer (zigbee2mqtt)", Index: 682
2019-09-09 21:17:13.118 Status: dzVents: Info: ------ Finished Alarm away dzvents
2019-09-09 21:17:15.251 MQTT: Topic: domoticz/in, Message: {"idx":429,"nvalue":0,"svalue":"","Battery":18,"RSSI":7}
2019-09-09 21:17:16.631 Status: dzVents: Info: Handling events for: "Deur kast tuinkamer", value: "Open"
2019-09-09 21:17:16.631 Status: dzVents: Info: ------ Start internal script: Alarm away dzvents: Device: "Deur kast tuinkamer (zigbee2mqtt)", Index: 682
2019-09-09 21:17:16.636 Status: dzVents: Info: ------ Finished Alarm away dzvents
2019-09-09 21:17:18.364 Status: dzVents: Info: Handling events for: "Deur kast tuinkamer", value: "Closed"
2019-09-09 21:17:18.364 Status: dzVents: Info: ------ Start internal script: Alarm away dzvents: Device: "Deur kast tuinkamer (zigbee2mqtt)", Index: 682
2019-09-09 21:17:18.369 Status: dzVents: Info: ------ Finished Alarm away dzvents
which i find really weird, i tried the log part before but it did not help me and now it also does not...
but thanks anyway.
waaren wrote: Monday 09 September 2019 20:22
To understand what is happening it can be helpful to add some log statements in the script. I have seen many forum-members struggling with the behavior of the dzVents forXXX and repeatXXX methods and therefore I try to prevent the use of them. Luckily it is quite simple to replace these methods with a combination of the afterXXX and cancelQueuedCommands() method.
like below
Code: Select all
return
{
on =
{
devices =
{
'Deur Kast tuinkamer'
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'tuinkamer control',
},
execute = function(dz, item)
local lamp = dz.devices("Lamp kast tuinkamer")
lamp.cancelQueuedCommands()
if item.state == "Open" then
lamp.switchOn().checkFirst()
lamp.swotchOff().afterMin(5)
else
lamp.switchOff().checkFirst()
end
end
}