Script to turn and after delay off some lights

All kinds of 'OS' scripts
Post Reply
cybermaus
Posts: 4
Joined: Monday 14 November 2016 17:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

Script to turn and after delay off some lights

Post by cybermaus » 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

dannybloe
Posts: 884
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: Script to turn and after delay off some lights

Post by dannybloe » Wednesday 09 August 2017 9:42

Take a look at dzVents or watch the getting started video from the dzVents forum.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

cybermaus
Posts: 4
Joined: Monday 14 November 2016 17:47
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Script to turn and after delay off some lights

Post by cybermaus » Wednesday 09 August 2017 23:18

Ok, that is a very powerfull script tool, a very good explanation, and it simply works !

Thanks!

midomot
Posts: 5
Joined: Sunday 12 February 2017 14:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Script to turn and after delay off some lights

Post by midomot » Wednesday 06 September 2017 13:40

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

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests