Hello friends,
in blockly, I can use the sentence "set Device = On for 2 minutes".
This is working very well, but for example :
On timestamp 0 I trigger the lamp on for two minutes
On timestamp 60 seconds, I trigger again the lamp on for 2 minutes
On timestamp 120 seconds, the light is off
It would be nice, the light will go off at 180 seconds, because at timestamp 60 seconds I fired it again on for 120 seconds.
So I would request this functionalty for blockly
Thanks
elRedeo
Repeating set on for X minutes
Moderators: leecollings, remb0
-
- Posts: 9
- Joined: Thursday 15 October 2015 23:44
- Target OS: Linux
- Domoticz version: newest
- Location: Germeny
- Contact:
Repeating set on for X minutes
Regards
Dominic
Dominic
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Repeating set on for X minutes
Don't use on for...
Set your switch on and use a time script to switch them on depending on one or multiple tast update times.
Set your switch on and use a time script to switch them on depending on one or multiple tast update times.
-
- Posts: 9
- Joined: Thursday 15 October 2015 23:44
- Target OS: Linux
- Domoticz version: newest
- Location: Germeny
- Contact:
Re: Repeating set on for X minutes
Thank you for the quick answer.
I am a lua noob, so the question is, are there example scripts?
I searched the wiki without succes. A helping hand would be graceful.
I am a lua noob, so the question is, are there example scripts?
I searched the wiki without succes. A helping hand would be graceful.
Regards
Dominic
Dominic
-
- Posts: 9
- Joined: Thursday 15 October 2015 23:44
- Target OS: Linux
- Domoticz version: newest
- Location: Germeny
- Contact:
Re: Repeating set on for X minutes
OK, I searched the wron words on the wrong side
Will try this : http://www.domoticz.com/forum/viewtopic ... pir#p14415
Will try this : http://www.domoticz.com/forum/viewtopic ... pir#p14415
Regards
Dominic
Dominic
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Repeating set on for X minutes
You can also use other languages if you don't know lua. I do everything in PHP.
In my pass2php script that looks like this:
So the light is switched of when the pir is off for more than 3 minutes, the port is more than 3 minutes opened/closed, the light is more than 3 minutes on and the virtual switch 'auto lights' is on.
In my pass2php script that looks like this:
Code: Select all
if($s['pirgarage']=='Off'&&strtotime($t['pirgarage'])<driemin&&strtotime($t['poort'])<driemin&&strtotime($t['garage'])<driemin&&$s['garage']=='On'&&$s['lichten_auto']=='On')sw($i['garage'],'Off','licht garage');
-
- Posts: 9
- Joined: Thursday 15 October 2015 23:44
- Target OS: Linux
- Domoticz version: newest
- Location: Germeny
- Contact:
Re: Repeating set on for X minutes
OK, simple and much easier in blockly :
Set your switch on without any shut off condition
create a second blckly script for your lighting area with the condition if switch on then switch off after n seconds.
Each time the the PIR triggers the switch on command the countdown timer do branigan begin again
Just for know to each other with the same problem .....
Set your switch on without any shut off condition
create a second blckly script for your lighting area with the condition if switch on then switch off after n seconds.
Each time the the PIR triggers the switch on command the countdown timer do branigan begin again
Just for know to each other with the same problem .....
Regards
Dominic
Dominic
Who is online
Users browsing this forum: No registered users and 1 guest