This experimental exercise is for exposing home energy consumption figures to cellular phone real time. Solution utilizes Wattson energy meter and RaspBerryPI. Watsson is used for actual energy consumption and RaspBerryPI for exposing figures to phone via Internet connection. Exercise makes use of several great tutorials and open source libraries.
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Show home energy consumption figures on phone UI
1. Home energy consumption
Interested what is your home energy consumption at
some point of time you are away?
Want current consumption on your phone UI real
time?
If yes, read further
1-Oct-2013
Ver 0.02
4. SW-components / Rpi
●
Open Wattson C-library (For reading current power from Wattson-device
by Raspberry)
–
1-Oct-2013
Available at: http://dialog.hut.fi/openwattson/
Ver 0.02
5. SW-components / Android Widget
●
Tutorial for implementing Android
Widget (For showing power on your
Android device)
–
●
Available at:
http://www.vogella.com/articles/A
ndroidWidgets/article.html
Tutorial for Android http-connection
(For reading power from Raspberrybased web server)
–
1-Oct-2013
Available at:
http://www.vogella.com/articles/A
ndroidNetworking/article.html
Ver 0.02
6. SW-components / iOS app
●
●
●
Tab-based application, current power by
button on one tab and history graphic on
another
For graphic, take a look library Core Plot,
quite handy open source plotting framework.
Tutorial available at:
http://www.raywenderlich.com/13269/howto-draw-graphs-with-core-plot-part-1
1-Oct-2013
Ver 0.02
8. Prerequisites
●
●
●
●
Rpi is set up according to latest instructions from community
portal
Wattson device is set up as per instructions provided in sales
package.
Android application development environment available
Basic programming skills on C and Java and familiar with
Android application fundamentals (or iOS development tools
and basics of Objective-C/Xcode IDE)
1-Oct-2013
Ver 0.02
9. Tasks for RPi
●
●
●
●
Install http-server (like Apache)
Observe IP-address Rpi is getting from
Cable/ADLS-router
Test web server.
Compile OpenWattson on RPi as per its
README.txt
–
Find USB-path for connection to Wattson receiver
–
Set up Rpi's cron for periodical power reading
–
Target to file available on0.02
http-server (/var/www)
1-Oct-2013
Ver
10. Tasks for Cable/ADLS router
●
●
●
Router provides NAT-addresses not suitable to
Internet. Router has own unique public IP-address
that is dynamic.
For experimental purposes Rpi's server can be
exposed to Internet on port forwarding. This means
that calls on router's port (80) are forwarded to
internal IP where Rpi http server resides.
Above tasks are done on management console of
the router
1-Oct-2013
Ver 0.02
11. Tasks for phone app
●
●
●
Generate Android Application project on app
wizard.
Follow instructions provided earlier to modify your
app for Homescreen Widget
Add http-connection, modify URL based on your
routers public IP
–
1-Oct-2013
Use free services like No-IP.com for handling router's
public IP changes
Ver 0.02
13. More info needed?
●
●
●
As normal, there are lot of discussion forums,
wikis, tutorials, …
Presentation and test apps by Ari Lehtola who also
may be able to help.
http://www.linkedin.com/pub/ari-lehtola/3/5ab/58b
1-Oct-2013
Ver 0.02