Twilight: sunrise/sunset and dusk/dawn plugin.
Twilight: sunrise/sunset and dusk/dawn plugin.
Hi,
I wrote my first plugin for EventGhost, EventGhost is perfect for my home automation projects (actually it is the best program I found until now). I needed a plug-in that can switch my lights at sunrise and sunset, so I wrote one.
Everything can be found here:
http://sites.google.com/site/eventghost ... s/twilight
~CoderX
I wrote my first plugin for EventGhost, EventGhost is perfect for my home automation projects (actually it is the best program I found until now). I needed a plug-in that can switch my lights at sunrise and sunset, so I wrote one.
Everything can be found here:
http://sites.google.com/site/eventghost ... s/twilight
~CoderX
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
did you find the eg.scheduler class? I think it is easier to use and more resource friendly than creating you own thread.
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Hi,
I need to calculate the sunrise/set and twilight times once a day. So if the plugin starts I have to calculate the values and schedule the calculation for the next day. All sun events can also be scheduled. Something for the next release.
~CoderX
I need to calculate the sunrise/set and twilight times once a day. So if the plugin starts I have to calculate the values and schedule the calculation for the next day. All sun events can also be scheduled. Something for the next release.
~CoderX
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Perhaps you overlooked the fact, that such a plugin already exists.
Pako
Pako
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Yes, I know this plugin, the problem that I have with it is that to much functionality is combined. I would brake it up in a scheduler, sun event generator and holiday event generator plugin. then the user can decide how these plugins interact with each other.
CoderX
CoderX
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Great stuff! Will try this asap.
If I did talk any Phyton I would have done this a long time ago... I like the approach, a small focused plugin.
If I did talk any Phyton I would have done this a long time ago... I like the approach, a small focused plugin.
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Your plugin is excellent and is exactly what I was looking for. I did notice a problem with it though: Your dusk and dawn are backwards as is the picture on your website. Dusk is the period after sunset before full night and dawn is the period after full night before sunrise.
Cheers!
Cheers!
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Thank you Manxam,
http://sites.google.com/site/eventghost ... s/twilight
~CoderX
Oeps, you are right, I mixed them up, download the corrected 0.0.2 version here:manxam wrote:Your dusk and dawn are backwards
http://sites.google.com/site/eventghost ... s/twilight
~CoderX
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
Thanks CoderX.
I have a suggestion, could you add an offset function. I could use it to turn my lights one hour before sunset or turn them of 2 hours after sunrise.
I have a suggestion, could you add an offset function. I could use it to turn my lights one hour before sunset or turn them of 2 hours after sunrise.
Re: Twilight: sunrise/sunset and dusk/dawn plugin.
I totally agree with arturmaj, an offset function would be great...!
My problem is that when the sunrise event triggers, it's still kind of dark inside my house so I wouldn't mind the lights being on for half an hour longer in the morning...
Maybe 2 or 3 configurable offsets that could trigger events like:
Twilight.offset1.sunrise / Twilight.offset1.sunset
Twilight.offset2.sunrise / Twilight.offset2.sunset
A negative offset (like -30) could trigger sunset 30 minutes earlier and sunrise 30 minutes later...
Otherwise, a great plugin!
My problem is that when the sunrise event triggers, it's still kind of dark inside my house so I wouldn't mind the lights being on for half an hour longer in the morning...
Maybe 2 or 3 configurable offsets that could trigger events like:
Twilight.offset1.sunrise / Twilight.offset1.sunset
Twilight.offset2.sunrise / Twilight.offset2.sunset
A negative offset (like -30) could trigger sunset 30 minutes earlier and sunrise 30 minutes later...
Otherwise, a great plugin!