CLOSED: Amahi Energy Saver

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

Re: Amahi Energy Saver

Postby jayrock » Sat Jan 15, 2011 2:48 pm

Here we go, latest version can be downloaded here: http://code.google.com/p/amahienergysav ... z&can=2&q=

Happy testing!

/jayrock

mfacer
Posts: 21
Joined: Sat Aug 14, 2010 3:50 am

Re: Amahi Energy Saver

Postby mfacer » Sat Jan 15, 2011 3:18 pm

This is, to me, the most important app available! It always bothers me that my HDA is sitting in the loft humming away doing NOTHING!

I installed the 3.3.2 version (I think, previous to today's upload!).

My only comment would be to change the default power off time from the first install? I ran the installer, then in Terminal it said the power would go off in one minute.. I couldn't get anything changed in that time to stop it. Using "WakeOnLan" app on my mac doesn't seem to have properly woken the box - so it'll have to wait until I get up in the loft tomorrow!

I suspect (like previous times) the amahi machine boots, but sticks on the login screen. Is there a way this app would log a user in?

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

Re: Amahi Energy Saver

Postby jayrock » Sat Jan 15, 2011 3:39 pm

Hi mfacer,

thanks for your feedback. Please install version 0.3.3 if possible, I removed some bugs found in 0.3.2. I've also removed the automatic start after installation, you now have to explicitly start the service and turn autostart on. The unexpected shutdown you experienced should not happen anymore.

It is possible to configure the time between consecutive checks of the system status, thus influencing the time before the system suspends. As root, type

Code: Select all

gedit /usr/share/aes/aes-config
and modify the value of "Interval". This is the time in seconds that has to pass twice while no activity is detected; after that the system suspends. You can set this for instance to 300, then the system will stay awake for at least 10 more minutes after the last client disconnects and a share has been accessed.

At the moment this parameter cannot be changed via the CLI, I put it on my to-do-list.

Regarding log-in, what's the purpose of this request? Autologin is what I also do in Windows, but I think Linux works differently here. If you want s.th. to start without logon, you'll have to tweak the run levels for that application. Google for "runlevels" a bit, it's different to Windows but actually pretty easy to use.

Cheers,
jayrock

mfacer
Posts: 21
Joined: Sat Aug 14, 2010 3:50 am

Re: Amahi Energy Saver

Postby mfacer » Sun Jan 16, 2011 6:51 am

Cheers - after several attempts I have managed to get the update installed. As soon as the HDA was booted, it would shut down! I had to get in to the services panel straight away to disable the service.

I've installed the update via SSH from my mac - as for some reason I cannot VNC to the HDA (I'll look later - I can't be bothered going back up to the loft!)

When I installed the update, I got the error message saying that "usr/bin/aes" already existed, so it couldn't create the file. However, when I try to #CD /usr/bin/aes it says that the directory doesn't exist. So I cannot actually get any further.

In terms of the Wake on lan, I went in to the PCs BIOS and made sure it was enabled. However, it still will not wake properly. Think I'll have to look in to this further (obviously not an Amahi issue!)

As for the remembering login, I simply mean that if I wake from lan, it will boot the machine as normal and present the login screen. I then need to enter the password for my Amahi user. I wanted the system to remember this. My system is effectively headless with it being in the loft. It's a pain going in and out of there!!

Thanks for the help and information. I'm sure that this should be part of the default amahi build for later releases... as I've said before, it's KEY for me! Would it be possible to detect not only the connections, but if certain apps are running? For example, I use my machine for really only sabnzbd... if that were downloading, it shouldnt shut down. Only if that isnt downloading or there's no mouse or keyboard detected for XX minutes should the system shut down.

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

Re: Amahi Energy Saver

Postby jayrock » Sun Jan 16, 2011 7:26 am

Hi mfacer,

thank for the feedback!
When I installed the update, I got the error message saying that "usr/bin/aes" already existed, so it couldn't create the file. However, when I try to #CD /usr/bin/aes it says that the directory doesn't exist. So I cannot actually get any further.
The error message doesn't harm if you are installing over an older version. Note that the diretory is /usr/share/aes rather than /usr/bin/aes.

Did you install as root?


In terms of the Wake on lan, I went in to the PCs BIOS and made sure it was enabled. However, it still will not wake properly. Think I'll have to look in to this further (obviously not an Amahi issue!)
WOL settings can be very tricky. Your board needs to support it, but you also need to get the network settings and - if enabled - firewall settings right: The magic packet has to be sent to the broadcast address of the LAN segment you are in (ie. the "last" address of your subnet). It's going out via port 9 UDP, so make sure that one is open.
As for the remembering login, I simply mean that if I wake from lan, it will boot the machine as normal and present the login screen. I then need to enter the password for my Amahi user. I wanted the system to remember this. My system is effectively headless with it being in the loft. It's a pain going in and out of there!!
I guess this is out of the scope of what the program should do; however there are guide how to achieve this, for instance here: http://www.linfo.org/automatic_login.html
Thanks for the help and information. I'm sure that this should be part of the default amahi build for later releases... as I've said before, it's KEY for me! Would it be possible to detect not only the connections, but if certain apps are running? For example, I use my machine for really only sabnzbd... if that were downloading, it shouldnt shut down. Only if that isnt downloading or there's no mouse or keyboard detected for XX minutes should the system shut down.
I'm actually thinking about having network activity as another item to prevent suspend. Stay tuned ;-)

/jayrock

mfacer
Posts: 21
Joined: Sat Aug 14, 2010 3:50 am

Re: Amahi Energy Saver

Postby mfacer » Sun Jan 16, 2011 1:30 pm

The error message doesn't harm if you are installing over an older version. Note that the diretory is /usr/share/aes rather than /usr/bin/aes.

Did you install as root?
Yep - installed as root (that's when you "SU" isn't it?)
I found the files in 'shares' as you said... the wiki pages just need updating with that as they say to use /usr/bin...
WOL settings can be very tricky. Your board needs to support it, but you also need to get the network settings and - if enabled - firewall settings right: The magic packet has to be sent to the broadcast address of the LAN segment you are in (ie. the "last" address of your subnet). It's going out via port 9 UDP, so make sure that one is open.
Not 100% sure what you mean here! I have wake on lan in the BIOS, so I assume the mobo supports it. Even though I cannot wake it! It opening UDP 9 a router thing? I'm using a mac to try and wake up the PC running Amahi... so there's no firewall anywhere and it's all on the internal subnet (255.255.255.0 - standard I think)

Another thing - when I run

Code: Select all

./aes.rb --shownetworkhosts
it says "permission denied - aes.log (Errno::EACCES)[/code] I have tried to chmod the log file but that's not allowed apparently!

I'd be keen to see this developed further - especially if it could have a web front end to change settings etc? So I could log in to energysaver.home.come or similar.

Thanks again :)

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

Re: Amahi Energy Saver

Postby jayrock » Sun Jan 16, 2011 2:04 pm

Hi mfacer
Yep - installed as root (that's when you "SU" isn't it?)
Exactly.
I found the files in 'shares' as you said... the wiki pages just need updating with that as they say to use /usr/bin...
Thanks for pointing this out! Updated the wiki.
Another thing - when I run
Code:
./aes.rb --shownetworkhosts
it says "permission denied - aes.log (Errno::EACCES). I have tried to chmod the log file but that's not allowed apparently!
You have to be root to execute this command - did you "su" as before?

If this doesn't help, please execute

Code: Select all

ls -l aes.log*
in /usr/share/aes and post the result
I'd be keen to see this developed further - especially if it could have a web front end to change settings etc? So I could log in to energysaver.home.come or similar.
Definitely, but I have to take it step by step. First, I want to make the basic functionality working. Second step then is to have a better configuration support, and a web page, like you suggest, is a good approach. But, don't expect anything in the very near future....

mfacer
Posts: 21
Joined: Sat Aug 14, 2010 3:50 am

Re: Amahi Energy Saver

Postby mfacer » Sun Jan 16, 2011 2:29 pm

I just SU'd again through SSH and I seem to be able to run the commands. I have added the network shares and have checked out the shutdown type.

What do the different options do for shutdown type? there are the obvious ones, but mem, disk etc - do they just shut the disks down or something? Just trying to see what my options are as wake on lan obviously isn't working at the moment!

Thanks again for this!

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

Re: Amahi Energy Saver

Postby jayrock » Sun Jan 16, 2011 2:42 pm

Great, let me know how it works!

Regarding shutdown types, here's a quick summary (will put it in the wiki also):

1: Poweroff
This is a full shutdown and should work on most systems. Some mainboards do not allow scheduled wakeup when using this method.

2: ACPI_S1
Legacy ACPI S1 state. Support depends on mainboard and Fedora support

3: ACPI_S3
Legacy ACPI S3 state. Support depends on mainboard and Fedora support

4: ACPI_S4
Legacy ACPI S4 state. Support depends on mainboard and Fedora support

5: mem
Suspend to memory, is intended to replace ACPI S1 but is not widely supported yet

6: disk
Suspend to disk, is intended to replace ACPI S4 but is not widely supported yet

7: standby
Suspend to memory, is intended to replace ACPI S3 but is not widely supported yet

When selecting the shutdown type I recommend the following procedure:

- Start with Poweroff to do basic checking and configuration. Since this is the safest version, it should also be your resort in case of problems.

- Once things are working, select either of the ACPI_S1..3 depending on what level of suspend you want

- If your are brave or the ACPI options don't work, try mem, disk or standby.


Hope this help,

jayrock

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

Re: Amahi Energy Saver

Postby jayrock » Mon Jan 24, 2011 8:43 pm

I'd be keen to see this developed further - especially if it could have a web front end to change settings etc? So I could log in to energysaver.home.come or similar.
Definitely, but I have to take it step by step. First, I want to make the basic functionality working. Second step then is to have a better configuration support, and a web page, like you suggest, is a good approach. But, don't expect anything in the very near future....
Actually, is there anyone who can help me with this as I have little experience with web/html programming. The frontend would need only a few features, just a couple of radio buttons and dropdown boxes I guess. It can interact with the main application via the CLI a well.

The only potentially advanced stuff is the list of predefined wake times. If feasible it would be great to have this integrated with the Amahi calendar - haven't had time yet to look into this in detail. Can the Amahi calendar be categorizes and are the calendar items available as a text file? We could simply have a category for aes then.

/jayrock

EDIT: I created a sepeate post on the calendar question: http://forums.amahi.org/viewtopic.php?f=7&t=2451

Who is online

Users browsing this forum: No registered users and 9 guests