Running servers when they are not needed can waste a considerable amount of energy. This project aims at sending Amahi server to suspend or poweroff when not needed.
To do so, Amahi Energy Saver regularly scans for connected clients, which are defined in the "monitored host list". If no client none of these clients is connectedturned on, the system suspends after a configurable period. So, for instance, you may want to add your client PC and your PS3 to the monitored host list. The Amahi Box will then stay up and running as long as client PC and/or PS3 are up and running. However, you might not want to add your home router to the list, as the router is always turned on. With the calendar fucntion one can define scheduled wake ups and periods during which the server shall stay awake no matter what.
Amahi Energy Saver also checks shares. As long as shares are accessed, the server does not suspend. If set up to do so, Squeezeboxserver is monitored to prevent suspend while Squeezeboxes are turned on.
When the system is to be used again, simply wake it up with WOL (ref. http://en.wikipedia.org/wiki/Wake-on-LAN). There are many tools to generate WOL packets, and it is even possible to wake your server over the internet (good link: http://www.wakeonlan.me/).
One can also define scheduled wake ups and periods during which the server shall stay awake no matter what.
4. Navigate to <code>/usr/share/aes</code> and run <code>./aes.rb --shownetworkhosts</code> to show and select to add any currently active network host to the list of monitored hosts. Run <code>./aes.rb --showmonitoredhosts</code> to check the monitored hosts and delete the ones you want to remove.
5. As root, run <code>service aes start</code> to start the service, and <code>chkconfig aes on</code> to make the service start on boot. Be careful, when you start the service the sytem MAY go to sleep when you don't expect it. Once it works as you want it, run <code>chkconfig aes on</code> to make the service start on boot.
==Logs==
==Command Line Interface==
*Note: Currently root priviledges are required to execute the CLI command. Navigate to /usr/share/aes to use the CLI correctly.
<code>./aes.rb --shownetworkhosts</code><br>
Lists the hosts found in the network, ie, all devices connected to the network. Gives the user the choice to add hosts to the monitored host list.
<code>./aes.rb --showmonitoredhosts</code><br>
Show a list of all hosts which are monitored by AES(i.e. the monitored host list), and also allows to delete hosts from the list. If these hosts are up and running (and respond to ping), the server does not suspend. <code>./aes.rb --shownetworkhosts</code><br>Lists the hosts found in the network and gives the user the choice to add them. This is useful to quickly fill the list of monitored hosts.
<code>./aes.rb --addhost macadress</code><br>
Manually add a host to the monitored host list of monitores hosts. Observe the MAC address format, which has to be XX:XX:XX:XX:XX:XX. Example is <br> <code>./aes.rb --addhost 12:34:56:78:90:ab</code>
<code>./aes.rb --showcalendar</code><br>