Page 1 of 1

Script to turn and after delay off some lights

Posted: Tuesday 08 August 2017 22:47
by cybermaus
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

Re: Script to turn and after delay off some lights

Posted: Wednesday 09 August 2017 9:42
by dannybloe
Take a look at dzVents or watch the getting started video from the dzVents forum.

Re: Script to turn and after delay off some lights

Posted: Wednesday 09 August 2017 23:18
by cybermaus
Ok, that is a very powerfull script tool, a very good explanation, and it simply works !

Thanks!

Re: Script to turn and after delay off some lights

Posted: Wednesday 06 September 2017 13:40
by midomot
Hello
Did you manage to build this script ?
I have a few sensors on their way from china, some cameras here and there, and like your idea