Difference between revisions of "Make things happen at sunrise/sunset"
(Imported document) |
Chris Caven (Talk | contribs) m |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category: tutorials]] | |
− | <p> Needs to know your longitude and latitude in order to fire the sunrise and sunset events. In | + | <p><h1>How to set it up</h1></p> |
+ | <p> Needs to know your longitude and latitude in order to fire the sunrise and sunset events. In LinuxMCE admin, choose a wizard, basic info, installation. Our database has the longitude and latitude information for approximately 30,000 cities worldwide. Just choose your city from the list. In the unlikely event that you are not near any of those cities in the list, then you'll need to provide your longitude and latitude yourself. Note that any changes you make on that page will take effect after the next reboot or quick reload router. </p> | ||
− | <p> At each sunrise and sunset | + | <p> At each sunrise and sunset, LinuxMCE will fire a sunrise/sunset event. In LinuxMCE admin, choose a wizard, events handler, respond to events. Type a logical description for your event, such as "turn on lights at sunrise". Then choose sunrise or sunset from the list, click add, and then specify the command you want to be executed. Note that you can create as many event handlers for each type of event as you want. So you can have "turn on lights at sunrise" and "start watering lawn at sunrise" which both respond to the same event. </p> |
− | <p><h1>How to use it</h1></p> | + | <p> |
+ | |||
+ | <h1>How to use it</h1></p> | ||
<p><h1>Programmer's guide</h1></p> | <p><h1>Programmer's guide</h1></p> | ||
<p>The logic is in Event_Plugin.</p> | <p>The logic is in Event_Plugin.</p> |
Latest revision as of 20:52, 30 April 2010
How to set it up
Needs to know your longitude and latitude in order to fire the sunrise and sunset events. In LinuxMCE admin, choose a wizard, basic info, installation. Our database has the longitude and latitude information for approximately 30,000 cities worldwide. Just choose your city from the list. In the unlikely event that you are not near any of those cities in the list, then you'll need to provide your longitude and latitude yourself. Note that any changes you make on that page will take effect after the next reboot or quick reload router.
At each sunrise and sunset, LinuxMCE will fire a sunrise/sunset event. In LinuxMCE admin, choose a wizard, events handler, respond to events. Type a logical description for your event, such as "turn on lights at sunrise". Then choose sunrise or sunset from the list, click add, and then specify the command you want to be executed. Note that you can create as many event handlers for each type of event as you want. So you can have "turn on lights at sunrise" and "start watering lawn at sunrise" which both respond to the same event.
How to use it
Programmer's guide
The logic is in Event_Plugin.