dzVents and time..... The puzzle

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
Haringstad
Posts: 13
Joined: Tuesday 22 November 2016 9:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

dzVents and time..... The puzzle

Post by Haringstad »

FIrst of all: BIG THANKS to @dannybloe for providing dzVens! I already made some great working scripts with it, and I love it! Although, it took a little time to get used to it.... :ugeek:

So, now my puzzle:

Due to the fact, that The Netherlands, are up north on the map, during summer, the sunrise is very early. And I mean, during high summer, even around 5:15 (21st of June). I do use a twilight sensor to switch on/off stuff in and around the house. Works like a charm. But, this works nice in end may, june and beginning of Juli.

Now, here it comes: I want to write a script, that does the following:

Switch on the lights in the bedroom in between 04:45 and 05:10, when it is still dark. Then, switch on the lights in the living room and kitchen in between 05:20 and 05:35. But don't do the latter (livingroom and kitchen) after either sunrise, or the twilight sensor detected light. In other words, make a summer proof script. Using the timer will work during fall, winter and spring....

So, can this be done in dzVents? A little help in the form of hints would be very much appreciated!

Update: Figured it out myself. daytime, nighttime.....

Jacco
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: dzVents and time..... The puzzle

Post by dannybloe »

Yup, there you have it. You can even extend it using before/after .. sunrise/sunset. See the docs.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Haringstad
Posts: 13
Joined: Tuesday 22 November 2016 9:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: dzVents and time..... The puzzle

Post by Haringstad »

@dannybloe, I am extending your 'Fake Presence' script, and modifying it, that it can be used to be functional when at home, and fake being home when away, and it seems to get pretty decent. Biggest issue was at first, that some devices are in Amsterdam, and some in NY timezone :-) But solved that by installing Domoticz as a slave on the Pi ovah there ;-)

Maybe one day I'll tell you (and others) what safety Domoticz brings to people. Because, to 'them' it's not fun, it's not a gadget. It is providing them a safe feeling.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest