Script to turn and after delay off some lights
Posted: Tuesday 08 August 2017 22:47
Hi all
Pretty new to Domoticz scripts, and I seem to fail to grasp how to control things from a script.
I seek some pointers and hints on how to achieve the following simple script. Preferably in Bash, as I know that already, but maybe it is time to bite into Perl or Lua (been meaning to for a while)
Script to be activated by a switch (that part seems easy)
- if between midnight and 06h00
- and within 1 minute of the first switch, a second switch is triggered
- every 10 seconds, take a camera shot
- Wait 30 more seconds
- run a scene (turn on some lights and make some noise
- wait 10 more minutes
- run another scene (turn of lights)
Elements of the above I think I know how to make
- Script to be activated by a switch
- Check within one script if another switch is triggered
(just have two scripts, the first one creates a dummy file, and removes it again after 1 minute)
- check time of day
- every 10 seconds, do something in parallel (just spawn a 2nd script)
Elements of the above do not know:
- Activate a camera snapshot event
- Activate a scene
Thanks
Maurits
Pretty new to Domoticz scripts, and I seem to fail to grasp how to control things from a script.
I seek some pointers and hints on how to achieve the following simple script. Preferably in Bash, as I know that already, but maybe it is time to bite into Perl or Lua (been meaning to for a while)
Script to be activated by a switch (that part seems easy)
- if between midnight and 06h00
- and within 1 minute of the first switch, a second switch is triggered
- every 10 seconds, take a camera shot
- Wait 30 more seconds
- run a scene (turn on some lights and make some noise
- wait 10 more minutes
- run another scene (turn of lights)
Elements of the above I think I know how to make
- Script to be activated by a switch
- Check within one script if another switch is triggered
(just have two scripts, the first one creates a dummy file, and removes it again after 1 minute)
- check time of day
- every 10 seconds, do something in parallel (just spawn a 2nd script)
Elements of the above do not know:
- Activate a camera snapshot event
- Activate a scene
Thanks
Maurits