I've searched in many posts wikis etc and i got confused
There are many examples in lua which i find more difficult than dzvents (just managed to make 1 simple script with switch click to toggle group lights thanks to waaren! ) and a lot of scripts that make to complicated stuff so it's difficult to remove some functions
is there any example to help please?
if no PIR1 motion is not detected for 5 mins and Door_sensor switches to ON then Switch on Living_room lights (group)
Help With PIR No motion [Solved]
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Help With PIR No motion
One more example..
Code: Select all
return
{
on =
{
devices =
{
'Door_sensor',
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = "Door PIR"
},
execute = function(dz, item)
if item.active then
local PIR1 = dz.devices('PIR1')
if not(PIR1.active) and PIR1.lastUpdate.secondsAgo > 300 then
dz.groups('Living_room lights').switchOn()
end
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Re: Help With PIR No motion [Solved]
REALLY? it was so simple? im reading all day for this too with time stamps and time difference checking and so complex things .. Thank GOD You are a saviour!!!! Thank you so much! Now i can make most of the scripts i need with the rest of the devices!
Who is online
Users browsing this forum: No registered users and 1 guest