Hello,
I've been pretty busy lately and didn't have much time to work on Amahi Energy Saver and the web config tool. However I have now finished the basic web application, which shows some energy statistics. It also allows to add/delete monitored hosts and change the configuration parameters. The GUI design is not finished at all. Eventually I plan to convert this into a widget for smooth integration into the Dash Board. But anyway, let me know what you think of this preview: http://bit.ly/fmdgnW
Cheers
jayrock
CLOSED: Amahi Energy Saver
Re: Amahi Energy Saver
Looking good jayrock
I like how you have everything layed out.
would fit well in the amahi dashboard
One thing which I think would be good is a service status of some sort to say if the service was running?
I like how you have everything layed out.
would fit well in the amahi dashboard
One thing which I think would be good is a service status of some sort to say if the service was running?
Re: Amahi Energy Saver
Hi sandogg,
thanks for the comments!
With the introduction of the web GUI the service is always running with the option to deactivate the functionality. One can actually set the shutdown type to "disabled". So maybe a separate monitor is not needed.
jayrock
thanks for the comments!
With the introduction of the web GUI the service is always running with the option to deactivate the functionality. One can actually set the shutdown type to "disabled". So maybe a separate monitor is not needed.
jayrock
Re: Amahi Energy Saver
Hi,
I'm pleased to announce that the first version of the web configuration application is ready for download on Google Code:
http://amahienergysaver.googlecode.com/ ... 59f.tar.gz
Very brief description:
- On the top part you see a summary of the saved and consumed power, plus the summed up time when your hda was power on and on standby
- Lower left shows the current configuration. If you change s.th., make sure to hit apply to commit the changes
- The lower right shows the list of monitored hosts. You can add any host that is active in the network, or enter a MAC address manually. You can also delete host for the list of monitored hosts.
Installation:
- Download and extract to some folder.
- As root, run
- Run (can be done as root or user)
Using the application:
- Open a browser and connect to http://hda:6500
- Play around with it and report any issues
Note that when you reboot your hda, you have to run aes-config-server.sh again.
I'm pleased to announce that the first version of the web configuration application is ready for download on Google Code:
http://amahienergysaver.googlecode.com/ ... 59f.tar.gz
Very brief description:
- On the top part you see a summary of the saved and consumed power, plus the summed up time when your hda was power on and on standby
- Lower left shows the current configuration. If you change s.th., make sure to hit apply to commit the changes
- The lower right shows the list of monitored hosts. You can add any host that is active in the network, or enter a MAC address manually. You can also delete host for the list of monitored hosts.
Installation:
- Download and extract to some folder.
- As root, run
Code: Select all
./install.sh
Code: Select all
./aes-config-server.sh
Using the application:
- Open a browser and connect to http://hda:6500
- Play around with it and report any issues
Note that when you reboot your hda, you have to run aes-config-server.sh again.
Re: Amahi Energy Saver
Hi,
I installed your web configuration app and get following message.
It was trying to install a 64 Bit package but I got a 32 Bit Fedora not a 64 Bit.
Then I run the server
On the website is following message: "We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly"
majide
I installed your web configuration app and get following message.
Code: Select all
[root@amahi jayrockk-Amahi-Energy-Saver---AES-app-ac4359f]# ./install.sh
Geladene Plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding de_DE to language list
Loading mirror speeds from cached hostfile
* fedora: mirror.switch.ch
* rpmfusion-free: rpmfusion.famillecollet.com
* rpmfusion-free-updates: rpmfusion.famillecollet.com
* rpmfusion-nonfree: rpmfusion.famillecollet.com
* rpmfusion-nonfree-updates: rpmfusion.famillecollet.com
* updates: mirror.switch.ch
Einrichten des Installationsprozess
Kein Paket rubygem-sqlite3-ruby.x86_64 verfügbar.
Fehler: Nichts zu tun
(in /home/xxx/Downloads/jayrockk-Amahi-Energy-Saver---AES-app-ac4359f)
rake aborted!
no such file to load -- sqlite3
(See full trace by running task with --trace)
Then I run the server
Code: Select all
[root@amahi jayrockk-Amahi-Energy-Saver---AES-app-ac4359f]# ./aes-config-server. sh
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:6500
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-04-21 20:15:30] INFO WEBrick 1.3.1
[2011-04-21 20:15:30] INFO ruby 1.8.7 (2011-02-18) [i386-linux]
[2011-04-21 20:15:30] INFO WEBrick::HTTPServer#start: pid=634 port=6500
/!\ FAILSAFE /!\ Thu Apr 21 20:15:44 +0200 2011
Status: 500 Internal Server Error
no such file to load -- sqlite3
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_r equire'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependenc ies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependenc ies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependenc ies.rb:156:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/ kernel/requires.rb:7:in `require_library_or_gem'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/ kernel/reporting.rb:11:in `silence_warnings'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/ kernel/requires.rb:5:in `require_library_or_gem'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/sqlite3_adapter.rb:10:in `sqlite3_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:223:in `send'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:223:in `new_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:188:in `checkout'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:184:in `loop'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:184:in `checkout'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:183:in `checkout'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:98:in `connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_specification.rb:115:in `connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/query_cache .rb:9:in `cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/query_cache .rb:28:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_ adapters/abstract/connection_pool.rb:361:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/string_co ercion.rb:25:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/head.rb:9:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `cal l'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/params_pa rser.rb:15:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/session/c ookie_store.rb:99:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/failsafe. rb:26:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatche r.rb:114:in `call'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/reloader. rb:34:in `run'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatche r.rb:108:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/static.rb:31:in `call '
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in `call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `each'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in `call'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/log_tailer.rb:17:in ` call'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in `cal l'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:48:in `se rvice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb:14:in `ru n'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:111
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_r equire'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
[2011-04-21 20:15:45] ERROR bad Request-Line `\026\003\001\000¡\001\000\000¥\000 \000HÀ'.
[2011-04-21 20:15:45] ERROR bad URI `î°¤G\001\aè½\000*\000ÿ\000\000\0009\0008\00 0
\0005\000E\000D\000f\0003\0002\000\000A\000\004\000\005\000/\000\026\000\023þÿ\ 000'.
majide
Re: Amahi Energy Saver
Hi,
Can you execute "yum search sqlite3" and post the result please.
/jayrock
Can you execute "yum search sqlite3" and post the result please.
/jayrock
Re: Amahi Energy Saver
Sure
Seems to be this package "rubygem-sqlite3-ruby.i686" for 32 Bit computer
Code: Select all
[root@amahi ~]# yum search sqlite3
Geladene Plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding de_DE to language list
Loading mirror speeds from cached hostfile
* fedora: mirror.switch.ch
* rpmfusion-free: rpmfusion.famillecollet.com
* rpmfusion-free-updates: rpmfusion.famillecollet.com
* rpmfusion-nonfree: rpmfusion.famillecollet.com
* rpmfusion-nonfree-updates: rpmfusion.famillecollet.com
* updates: mirror.switch.ch
=============================== Matched: sqlite3 ===============================
rubygem-sqlite3-ruby.i686 : Allows Ruby scripts to interface with a SQLite3
: database
eurephia-sqlite3.i686 : The eurephia SQLite3 database driver
libsqlite3x.i686 : A C++ Wrapper for the SQLite3 embeddable SQL database engine
libsqlite3x-devel.i686 : Development files for libsqlite3x
mingw32-libsqlite3x.noarch : MinGW Windows C++ Wrapper for the SQLite3
: embeddable SQL database engine
gambas2-gb-db-sqlite3.i686 : Gambas2 component package for db-sqlite3
libsq3.i686 : A C++ Wrapper for the SQLite3 embeddable SQL database engine
mingw32-libsq3.noarch : MinGW Windows C++ Wrapper for the SQLite3 embeddable SQL
: database engine
ocaml-sqlite.i686 : OCaml library for accessing SQLite3 databases
ruby-sqlite3.i686 : A Ruby interface for the SQLite database engine
dspam-sqlite3.i686 : SQLite v3.x storage driver for libdspam
libdbi-dbd-sqlite.i686 : SQLite plugin for libdbi
libsq3-devel.i686 : Development files for libsqlite3x
ocaml-sqlite-devel.i686 : Development files for ocaml-sqlite
sqlite-devel.i686 : Development tools for the sqlite3 embeddable SQL database
: engine
sqlite-tcl.i686 : Tcl module for the sqlite3 embeddable SQL database engine
zabbix-proxy-sqlite3.i686 : Zabbix proxy compiled to use SQLite
zabbix-server-sqlite3.i686 : Zabbix server compiled to use SQLite
zabbix-web-sqlite3.noarch : Zabbix web frontend for SQLite
Re: Amahi Energy Saver
I installed the ruby package per hand and reinstall the web app
Now I can see the configuration site.
Code: Select all
[root@amahi jayrockk-Amahi-Energy-Saver---AES-app-ac4359f]# ./install.sh
Geladene Plugins: fastestmirror, langpacks, presto, refresh-packagekit
Adding de_DE to language list
Loading mirror speeds from cached hostfile
* fedora: mirror.switch.ch
* rpmfusion-free: rpmfusion.famillecollet.com
* rpmfusion-free-updates: rpmfusion.famillecollet.com
* rpmfusion-nonfree: rpmfusion.famillecollet.com
* rpmfusion-nonfree-updates: rpmfusion.famillecollet.com
* updates: ftp.fi.muni.cz
Einrichten des Installationsprozess
Kein Paket rubygem-sqlite3-ruby.x86_64 verfügbar.
Fehler: Nichts zu tun
(in /home/xxx/Downloads/jayrockk-Amahi-Energy-Saver---AES-app-ac4359f)
== CreateMonitoredhosts: migrating ===========================================
-- create_table(:monitoredhosts)
-> 0.0031s
== CreateMonitoredhosts: migrated (0.0033s) ==================================
== CreateConfigurations: migrating ===========================================
-- create_table(:configurations)
-> 0.0043s
== CreateConfigurations: migrated (0.0046s) ==================================
Code: Select all
[root@amahi jayrockk-Amahi-Energy-Saver---AES-app-ac4359f]# ./aes-config-server.sh
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:6500
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-04-22 09:50:59] INFO WEBrick 1.3.1
[2011-04-22 09:50:59] INFO ruby 1.8.7 (2011-02-18) [i386-linux]
[2011-04-22 09:50:59] INFO WEBrick::HTTPServer#start: pid=17649 port=6500
I'll create a new config now
aes-config loaded successfully
Configurations controller: I'll read the monitored hosts now
load_monitored_hosts: trying to load monitored hosts....
load_monitored_hosts: This line has been read: xxx.xxx x.x.x.x xx:xx:xx:xx:xx:xx
load_monitored_hosts: loaded successfully
Configurations controller: I've read one line from monitoredhosts file
xx:xx:xx:xx:xx:xx xx.xx.xx.xx xxx.xxx
Processing ConfigurationsController#index (for xx.xx.xx.xx at 2011-04-22 09:51:05) [GET]
Configuration Load (0.8ms) SELECT * FROM "configurations"
Configuration Create (0.6ms) INSERT INTO "configurations" ("created_at", "checksqueezeboxes", "updated_at", "powerconsumptionoff", "shutdowntype", "interval", "usecalendar", "powerconsumptionon") VALUES('2011-04-22 07:51:05', 'f', '2011-04-22 07:51:05', 4.5, 'Poweroff', 180, 'off', 50.0)
Monitoredhost Load (0.3ms) SELECT * FROM "monitoredhosts"
Monitoredhost Create (0.4ms) INSERT INTO "monitoredhosts" ("created_at", "updated_at", "mac", "ipv4address", "hostname") VALUES('2011-04-22 07:51:05', '2011-04-22 07:51:05', 'xx:xx:xx:xx:xx:xx', 'xx.xx.xx.xx', 'xxx.xxx')
Rendering template within layouts/configurations
Rendering configurations/index
Rendered layouts/_header (89.7ms)
Rendered configurations/_configuration_partial (11.8ms)
Rendered monitoredhosts/_mh_partial (7.3ms)
Rendered monitoredhosts/_network_hosts_partial (12.0ms)
Rendered monitoredhosts/_new_host_partial (4.8ms)
Completed in 710ms (View: 304, DB: 2) | 200 OK [http://hda/]
Processing ReportController#energy_balance_chart (for xx.xx.xx.xx at 2011-04-22 09:51:07) [GET]
Parameters: {"id"=>"5", "saved"=>"0.000 kWh", "consumed"=>"0.681 kWh"}
Sending data energy_balance.png
Completed in 488ms (View: 1, DB: 0) | 200 OK [http://hda/report/energy_balance_chart/5/image.png?consumed=0.681+kWh&saved=0.000+kWh]
Re: Amahi Energy Saver
Excellent, thanks for your help in tracking this one!
Will do some more checks and fix the install script after that.
Will do some more checks and fix the install script after that.
Re: Amahi Energy Saver
Hi,
Amahi Energy Saver version 0.8 is available on Google Code
Amahi Energy Saver 0.8
============================
- Amahi Energy Saver and the web config App are now intergrated into one installation package. Dowhnload the installer from http://code.google.com/p/amahienergysav ... z&can=2&q= , extract it into some directory and as root run
When the installation is finished, reboot the computer. The config app is accessible at
Enjoy,
jayrock
EDIT: Install instructions updated
Amahi Energy Saver version 0.8 is available on Google Code
Amahi Energy Saver 0.8
============================
- Amahi Energy Saver and the web config App are now intergrated into one installation package. Dowhnload the installer from http://code.google.com/p/amahienergysav ... z&can=2&q= , extract it into some directory and as root run
Code: Select all
cd installfiles
./aes-install.sh
Code: Select all
http://hda:6500
jayrock
EDIT: Install instructions updated
Last edited by jayrock on Sun May 29, 2011 12:22 am, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 30 guests