How to not run this script between times

Post Reply
DaWauZ
Posts: 70
Joined: Wednesday 05 November 2014 11:14
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

How to not run this script between times

Post by DaWauZ » Wednesday 16 August 2017 9:46

Hello,

Is it possible to NOT run this script between 2 times, say not between 03:00 and 09:30 ?
Because this script works like a charm, is switching light at certain values of lux. Only when we are sleeping, it is not needed in the early morning to switch lights on. How can I avoid that?
When using if time = > 09:30 , the script is giving me every minute a email and a switch lights on action. I don't like that.
lights-lux-blockly.jpg
lights-lux-blockly.jpg (103.92 KiB) Viewed 448 times
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)

freijn
Posts: 175
Joined: Friday 23 December 2016 17:40
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands Purmerend
Contact:

Re: How to not run this script between times

Post by freijn » Wednesday 16 August 2017 9:53

This is an example of only activate it between times.
Putting this at the top of your blocky is should work I believe

Image

Lebo2d9
Posts: 132
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi
Domoticz version: L stab
Location: Belgium
Contact:

Re: How to not run this script between times

Post by Lebo2d9 » Wednesday 16 August 2017 9:53

You need to create a vitrual switch with a time trigger

Verstuurd vanaf mijn SM-G920F met Tapatalk

Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come

DaWauZ
Posts: 70
Joined: Wednesday 05 November 2014 11:14
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: How to not run this script between times

Post by DaWauZ » Wednesday 16 August 2017 10:17

freijn wrote:
Wednesday 16 August 2017 9:53
This is an example of only activate it between times.
Putting this at the top of your blocky is should work I believe

Image
Yes I tried but then its giving me every couple of minutes an email, and a switch command. Without anything with time, it does not. I think when you do something with time, every x time blocky runs the script. If you dont use a time, it is only triggered by switches/devices.
Lebo2d9 wrote:
Wednesday 16 August 2017 9:53
You need to create a vitrual switch with a time trigger

Verstuurd vanaf mijn SM-G920F met Tapatalk
I didn't think about this option, but I do think it is a very good one, will try, thanks!
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)

DaWauZ
Posts: 70
Joined: Wednesday 05 November 2014 11:14
Target OS: Raspberry Pi
Domoticz version:
Location: Netherlands
Contact:

Re: How to not run this script between times

Post by DaWauZ » Wednesday 16 August 2017 11:15

I think this should it be then.
Am I correct that I not have to use time switch (tijdschakelaar-1) = off, because he only has to do something when de time switch is on?
lights-lux-blockly2.jpg
lights-lux-blockly2.jpg (135.73 KiB) Viewed 434 times
Raspberry Pi 2 model B with domoticz
OMV NAS installed on thin client HP T610
Openelec Kodi Mediaplayer on thin client HP T520 (and with multiboot windows 10)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest