Hello to everyone,
I'm a little noob and lost to be fair.
I want the light to turn on when the door opens but online if the motion sensor has not been active during 30minutes.
A little help? Is it possible with blocky? Only with LUa?
Thanks
No motion for 30 minutes
Moderator: leecollings
-
- Posts: 20
- Joined: Sunday 16 April 2017 17:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 222
- Joined: Tuesday 22 July 2014 7:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: No motion for 30 minutes
It is not difficult, if you know how.:
I attached my script with even two sensors that need to be motionless for 20 minutes.
I attached my script with even two sensors that need to be motionless for 20 minutes.
- Attachments
-
- light-off.txt
- (1.21 KiB) Downloaded 323 times
-
- Posts: 20
- Joined: Sunday 16 April 2017 17:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: No motion for 30 minutes
Thanks!
I think I need to learn a little bit more about scripting and lua.
But now I have something to start with.
I think I need to learn a little bit more about scripting and lua.
But now I have something to start with.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: No motion for 30 minutes
In pass2php that would be like this:
Only when the door opens ($status) and the status of pir is off and the last updatetime of the pir is more than 1800 seconds ago the light is switched on.
Code: Select all
<?php
if($status=='Open'){
if(apcu_fetch('spir')=='Off' && apcu_fetch('tpir')<time-1800)sw('light','On');
}
Who is online
Users browsing this forum: No registered users and 1 guest