CLOSED: Amahi Energy Saver

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Thu Mar 24, 2011 2:47 am

In the scenario you described (HDA always up when clients are up) it shouldn't be a problem. The clients wake the server and get IP addresses from the sever DHCP immediately after that.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi Energy Saver

Postby bigfoot65 » Thu Mar 24, 2011 4:48 am

I have a question.

I understand when the last client goes off line, the HDA is supposed to sleep. If I have a printer and video games system hooked in wireless and wired, will the HDA still sleep?

If so, then I am gonna attempt to test this on my new HDA :)
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Thu Mar 24, 2011 5:06 am

bigfoot65,

I'm not sure if you want the server to sleep despite the video game system and printer are on, or if you want it to stay on. Well, it doesn't matter, both is possible.

You define hosts that Amahi Energy Saver monitors (by MAC address). As long as any of these hosts respond to ping, the server stays up. The server goes to sleep when the last monitored client goes off line. Note there are also more criteria that prevent sleep, such as share access.

So, if e.g. you want the server to stay up when the video game system is on, add the systems MAC address to the list of monitored hosts.

/jayrock

rjwaldren
Posts: 71
Joined: Mon Jan 17, 2011 7:15 pm

Re: Amahi Energy Saver

Postby rjwaldren » Thu Mar 24, 2011 10:30 am

I did something similar in my router based script. But I defined a range of addresses (my dhcp range where all clients of interest live) that would periodically quick ping. The script could then watch the arp table to determine if active clients were up or down. If a client in the range came up - send a wake to the NAS - if all clients were down send a sleep. All devices that were not of interest to the NAS were kept out of the monitored range.

With my script the thing I left out was checking that the server wasn't busy with anything other than torrents. With greyhole, that's a bad plan, turns out that with softraid it's not to bright either. Hopefully, now that the expresscd alpha has surface I can start playing with your app soon.
Amahi 6.1 x86_64 ExpressCD - Intel D510MO, 2GB, Promise TX300
1x 500GB 2.5" WD Black (OS and LZ). Pool: 1x 1.5TB Samsung F2, 1x 1.5TB Samsung F3, 1x 2TB Samsung F4EG
Apps: uShare, uTorrent, Amahi Energy Saver

sandogg
Posts: 8
Joined: Tue Mar 22, 2011 2:36 pm

Re: Amahi Energy Saver

Postby sandogg » Mon Mar 28, 2011 6:02 am

jayrock,

I'm new to amahi and this was exactly what was missing for me.
Will install and have a play.

Couple of questions:

How often does the aes ping a machine it is monitoring?

If the machine is on DHCP does the lease time affect the aes?

Sorry I think they these questions are a bit noob.

Keep up the work. Add a GUI/Web interface/Amahi App and I will be more than willing to pay for this! :D

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Mon Mar 28, 2011 6:54 am

Hi sandogg,
How often does the aes ping a machine it is monitoring?
You can actually set the intervall from 60 to 600 seconds. Try running

Code: Select all

​./aes.rb --interval​
If the machine is on DHCP does the lease time affect the aes?
No, aes is not all dependent on DHCP. It (mainly) works with MAC addresses.

The web app is coming along quite ok, however recently I had little time to actually finish it off. Stay tuned.

/jayrock

sandogg
Posts: 8
Joined: Tue Mar 22, 2011 2:36 pm

Re: Amahi Energy Saver

Postby sandogg » Thu Mar 31, 2011 1:49 pm

Thanks jayrock,

I've had a good play about finding out in the process that my new HP Microserver does not support S3 :( but will Hibernate.

Everything good so far with AES on the HDA. I have used WOL from my Linux Box using etherwake and from ipod touch.

Is there a way to find out if the service is running without restarting it?
There was one point after too many restarts when the service did not start.

Is there a command to find out which shutdowntype you currently have selected?
In the process of finding out my Microserver does not support S3 I would never know which shutdowntype I had set up which did work.

These two above are not important, I just wondered if it was possible already.



However I am having problems with the AES Client.
Using Windows XP.
I can't manually enter the HDA mac address, it returns to default value every time.
I can't search and select a server, getting error

Code: Select all

ex:Unknown error (0x80005000)
I think that is a .net error?

Log file:

Code: Select all

[INFO] [SysTrayApp] 3/31/2011 9:16:16 PM:: Start AESClient [DEBUG] [SysTrayApp] 3/31/2011 9:16:16 PM:: No log files deleted. [DEBUG] [SysTrayApp] 3/31/2011 9:16:16 PM:: Configuration read
However if I hover over the AES icon in the taskbar it does say "hda available" but the menu commands do nothing.

AES client works on Win 7 for me but my couple of people at home have XP...

Thanks for any help jayrock and look forward to your new developments.

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Thu Mar 31, 2011 9:44 pm

Is there a command to find out which shutdowntype you currently have selected?
In the process of finding out my Microserver does not support S3 I would never know which shutdowntype I had set up which did work.

....


Using Windows XP.
I can't manually enter the HDA mac address, it returns to default value every time.
I can't search and select a server, getting error

Code: Select all

ex:Unknown error (0x80005000)
I think that is a .net error?

Log file:

Code: Select all

[INFO] [SysTrayApp] 3/31/2011 9:16:16 PM:: Start AESClient [DEBUG] [SysTrayApp] 3/31/2011 9:16:16 PM:: No log files deleted. [DEBUG] [SysTrayApp] 3/31/2011 9:16:16 PM:: Configuration read
However if I hover over the AES icon in the taskbar it does say "hda available" but the menu commands do nothing.
Regarding the currently set shutdown type, there's no command, but in HDA terminal you can type

Code: Select all

cat /usr/share/aes/aes-config
to see the current setting.

Windows client: Can you check which .net version is installed? AES client requires .net 3.5, and it should check it during installation.

Thanks for pointing out the problem with manually entering the MAC address. There is a bug indeed. Will fix it asap.

Cheers

jayrock

sandogg
Posts: 8
Joined: Tue Mar 22, 2011 2:36 pm

Re: Amahi Energy Saver

Postby sandogg » Fri Apr 01, 2011 6:16 am

Thanks jayrock.

.net was already 3.5 on one machine running XP. The other only had 2.0 and AES client asked for 3.5 which I downloaded and installed before installing AES client.

I have tried .net 4.0 as well but same errors on XP. I have also tried using a fresh install of XP with .net 3.5 but same issues.

User avatar
jayrock
Posts: 223
Joined: Thu Dec 02, 2010 12:55 am

Re: Amahi Energy Saver

Postby jayrock » Sun Apr 17, 2011 7:19 am

Hi,

Amahi Energy Saver version 0.4.6 is available on Google Code.

Amahi Energy Saver 0.4.6
============================
- The script file /usr/share/aes/aes-resume.sh is added. This file is executed approx. 30 seconds after resume from S1/S3/S4 and can be used e.g. to restart services that do not work after resume. At the moment, this file has to be edited manually.

Enjoy,

jayrock

Who is online

Users browsing this forum: No registered users and 12 guests