I do not know if it is possible, but I definitely have not managed to do in Blockly.
I need to control the time it takes endencido a switch.
For example: If the switch room takes on 15 minutes, turn off the switch office.
Some help?
Controlling ON time of a switch.
Moderator: leecollings
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Controlling ON time of a switch.
I think you'll need to explain better.
Do you mean turn of a light if another light is on for more then 15 minutes?
Do you mean turn of a light if another light is on for more then 15 minutes?
-
JonyBCN
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Controlling ON time of a switch.
something like that, yes. I want to control the time it takes on a switch to act accordingly. for example, "if X switch takes time off, then Y Z switch acts form.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Controlling ON time of a switch.
I do that all the time to switch off lights that were switched by a PIR, or when I leave my home etc.
Parts of my pass2php script:
I can only suggest to learn one programming language and start scripting, a whole world of possibilities will open...
Parts of my pass2php script:
Code: Select all
if(strtotime($t['pirkeuken'])<tweemin && strtotime($t['wasbak'])<tweemin && $s['pirkeuken']=='Off' && $s['wasbak']=='On' && $s['werkblad']=='Off' && $s['keuken']=='Off' && $s['kookplaat']=='Off')sw($i['wasbak'],'Off');
Code: Select all
$items=array('denon','bureel','tv','tvled','kristal','eettafel','zithoek','garage','terras','tuin','voordeur','keuken','werkblad','wasbak','kookplaat','sony');
foreach($items as $item) if($s[$item] != 'Off' && strtotime($t[$item]) < time-$uit) sw($i[$item],'Off');
-
JonyBCN
- Posts: 39
- Joined: Tuesday 24 May 2016 22:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Controlling ON time of a switch.
I tried with LUA and I must confess that I am a useless for it. Also, I think it would be a good option to implement Blockly, it is an excellent tool for those who do not know programming.
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Controlling ON time of a switch.
This isn't lua, it's php. Much easier.
Who is online
Users browsing this forum: No registered users and 1 guest