trigger before / after sunset

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

trigger before / after sunset

Postby gvdham » Thu Apr 05, 2012 6:28 pm

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?
gvdham
Member
Member
 
Posts: 100
Joined: October 2009
Location: Netherlands

Re: trigger before / after sunset

Postby BreFra » Fri Apr 06, 2012 8:28 pm

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...
BreFra
Starting Member
Starting Member
 
Posts: 19
Joined: January 2010

Re: trigger before / after sunset

Postby Multispeed » Fri Apr 06, 2012 11:18 pm

Good question!

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

Can u make an event or trigger thats says

"10 min before dark" ?
Multispeed
Starting Member
Starting Member
 
Posts: 12
Joined: November 2011

Re: trigger before / after sunset

Postby Digit » Fri Apr 06, 2012 11:27 pm

You would need a time machine for that :lol:
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3101
Joined: March 2006
Location: Netherlands

Re: trigger before / after sunset

Postby RDNZL » Sat Apr 07, 2012 10:46 am

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.
http://domotiga.nl - open source home automation software for Linux.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 919
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: trigger before / after sunset

Postby gvdham » Mon Apr 09, 2012 11:19 am

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.
gvdham
Member
Member
 
Posts: 100
Joined: October 2009
Location: Netherlands

Re: trigger before / after sunset

Postby RDNZL » Mon Apr 09, 2012 2:24 pm

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.
http://domotiga.nl - open source home automation software for Linux.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 919
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: trigger before / after sunset

Postby gvdham » Fri Sep 28, 2012 8:01 pm

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.
gvdham
Member
Member
 
Posts: 100
Joined: October 2009
Location: Netherlands

Re: trigger before / after sunset

Postby RDNZL » Tue Oct 02, 2012 7:03 pm

You can login to domotiga.nl and complete the 'user manual' here http://domotiga.nl/projects/domotiga/wiki/User_Manual :wink:
Regards, Ron.
http://domotiga.nl - open source home automation software for Linux.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 919
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: trigger before / after sunset

Postby gvdham » Tue Oct 02, 2012 7:41 pm

Hihi, didn't know that. Will do that.
gvdham
Member
Member
 
Posts: 100
Joined: October 2009
Location: Netherlands


Return to DomotiGa Forum

Who is online

Users browsing this forum: No registered users and 1 guest