Page 1 of 1

trigger before / after sunset

Posted: Thu Apr 05, 2012 6:28 pm
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?

Re: trigger before / after sunset

Posted: Fri Apr 06, 2012 8:28 pm
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...

Re: trigger before / after sunset

Posted: Fri Apr 06, 2012 11:18 pm
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" ?

Re: trigger before / after sunset

Posted: Fri Apr 06, 2012 11:27 pm
by Digit
You would need a time machine for that :lol:

Re: trigger before / after sunset

Posted: Sat Apr 07, 2012 10:46 am
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.

Re: trigger before / after sunset

Posted: Mon Apr 09, 2012 11:19 am
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.

Re: trigger before / after sunset

Posted: Mon Apr 09, 2012 2:24 pm
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.

Re: trigger before / after sunset

Posted: Fri Sep 28, 2012 8:01 pm
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.

Re: trigger before / after sunset

Posted: Tue Oct 02, 2012 7:03 pm
by RDNZL
You can login to domotiga.nl and complete the 'user manual' here http://domotiga.nl/projects/domotiga/wiki/User_Manual :wink:

Re: trigger before / after sunset

Posted: Tue Oct 02, 2012 7:41 pm
by gvdham
Hihi, didn't know that. Will do that.