trigger before / after sunset

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
gvdham
Member
Member
Posts: 111
Joined: Sat Oct 03, 2009 10:19 pm
Location: Netherlands

trigger before / after sunset

Post by gvdham »

after reading the domotiga site i stil didn't understand how to switch on a device for example 10 minutes before / after sunset. Is there anyone else who uses this and can explaint how tot do it?
BreFra
Starting Member
Starting Member
Posts: 21
Joined: Wed Jan 06, 2010 10:44 pm

Re: trigger before / after sunset

Post by BreFra »

I'm using an event which runs after sunset
For this I use an event that's triggered when the variable "dark" is set to "True".
To prevent continues triggering I use a condition "don't run event if event already ran in last x hours"
In the trigger list I added an action which waits the required time. Therafter the final trigger (device on/off) runs.

A quick and dirty solution for an event prior sunset could be using a "waiting" trigger of a little less than 24 hours. Im convinced sombody else knows a smarter solution...
Multispeed
Starting Member
Starting Member
Posts: 12
Joined: Mon Nov 28, 2011 12:17 pm

Re: trigger before / after sunset

Post by Multispeed »

Good question!

I would like to know the answer too.....

Can u make an event or trigger thats says

"10 min before dark" ?
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Re: trigger before / after sunset

Post by Digit »

You would need a time machine for that :lol:
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: trigger before / after sunset

Post by RDNZL »

Funny enough this is one of the few topics described in the 'manual', so RTFM ;-)

http://domotiga.nl/projects/domotiga/wiki/User_Manual

It describes how to:

Create a trigger for every minute.
Create a condition which is true for a given time before or after sunset/sunrise.
Var_Sunset is calculated every day, so a compare against it (which is what the = does) is True if condition is met.
There is an issue with SunSet and SunRise is not correct when Daylight Saving Time is active, will add a workaround for that soon.
Until then just add or subtract the extra hour difference.
Regards, Ron.
gvdham
Member
Member
Posts: 111
Joined: Sat Oct 03, 2009 10:19 pm
Location: Netherlands

Re: trigger before / after sunset

Post by gvdham »

Thank you for the extra info!
I did RTFM but it's a bit to technical. I'll try with the above text and the manual to make it work. I'm just an end user so don't blaim me for not understanding.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: trigger before / after sunset

Post by RDNZL »

I don't blaim you, hence the smiley.
If you figured it out and have better instructions i'd be happy to put them in the manual.
Regards, Ron.
gvdham
Member
Member
Posts: 111
Joined: Sat Oct 03, 2009 10:19 pm
Location: Netherlands

Re: trigger before / after sunset

Post by gvdham »

Hi all, after a reinstall because of some errors and a lack of time I had to redo this trigger and needed an our to fix it. so for me the next time a little something to remember and maybe help someone else.

First u need to create a trigger that triggers every minute of the hour.
Events -> Add trigger and fill in:
Minute <> 61

Now u need to create a condition.
Events -> Add condition and fill in for example:
Var_Sunset = Format(hour(Now()),"0#") & ":" & Format(minute(Now()),"0#")

Now u can make an event.
Events -> Add event and select the previous made trigger and condition. Now all u need is an action and your event is ready.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: trigger before / after sunset

Post by RDNZL »

You can login to domotiga.nl and complete the 'user manual' here http://domotiga.nl/projects/domotiga/wiki/User_Manual :wink:
Regards, Ron.
gvdham
Member
Member
Posts: 111
Joined: Sat Oct 03, 2009 10:19 pm
Location: Netherlands

Re: trigger before / after sunset

Post by gvdham »

Hihi, didn't know that. Will do that.
Post Reply

Return to “DomotiGa Forum”