OpenEnergyMonitor and Nanode Hackathon from Wednesday 27th April 2011 - Monday 2nd May 2011 @Llanfrothen
Wiki (this page): http://bit.ly/oem_2011
Website bit.ly: http://bit.ly/openemon
Glyns' photos: https://picasaweb.google.com/glyn.hudson/SnowdonBuildSesh
Sam: Git Tutorial DONE Here is a typed up copy of a potential workflow for us collaborating on git: openenergymonitor.org/emon/node/144
Deploy EMON CMS (see below)
Sam: Google Android Hello World
Walkthrough OEM Website
Sam: Subsumtion Layer Architecture
- Visual Display at London Hackspace: http://bit.ly/oem_lhs
- Sam + ? + ?: Hack to integrate data feeds from emon CMS into a sketchup model of the house/buildings overlayed with live sensor data. :)
- Sam: PHP code to generate the XML, CSV feeds
- Sam + Trystan: User registration, device registration(MAC), Authentication(API keys)
- Ken + Suneil: Solar powered Nanode + super caps + battery charging circuit, and RGB indicator, nanode pachube connection: get and put data.
- Ken + Suneil: Solar Tracker
- Sam + ? + ?: Nanode firmware works out of the box with emon CMS
- ?: Webserver for configuring (local)
- take best code from jeenode webserver and webduino
- Webserver for configuring (remote)
- make emon CMS easier to deploy
- Sam: Minimal LAMP stack on a live cd as a 'viewer' (CD is read-only unless it is a CDRW).
- Sam: Minimal LAMP stack on a live usb preinstalled with emon CMS.
- Energy comparisons: e.g. consumption of energy, and everyday comparisons to understand energy quantities. Other way to display energy in meaningful ways; quick indicators.. colours. Informative indicators with useful stats.
- Glyn: RFM12 Wireless nanode / EmonTx dev. Using JeeNode + Etherboard as example
Modify nanode to avoid SPI conflicts with RFM12(see below) Transmit data from JeeNode/Emon Tx to Nanode +RFM12 Display wireless packet data on local web page served by nanode Decode data into original variables
- Create array of transmitter node ID's
Display variables on local web pages (served by Nanode)
- Post data to EmonCMS in an intelligent way with API key of Nanode and Node ID of wireless node -Sam and Trystan started
Nanode serve local page and also post to EmonCMShttps://github.com/openenergymonitor/RF12Ethernet-/tree/master/nanode_localserver_RFData
1) Following this tutorial: http://tinsology.net/2009/06/creating-a-secure-login-system-the-right-way/
10:30am friday: A non polished multi user implementation of Emoncms now works!
1:00pm Saturday: Partial rebuild of emoncms + step by step builds of emoncms with different parts implemented. If your trying to understand the code try going through the different build steps, I intend to write up each step as an extended tutorial soon.
For now the code can all be found up on github here:
Latest emoncms build on github:
A little idea to help with the future hackathons (colder time of year e.g. winter). So if it gets a bit colder we can look at making a Japanese Kotasu space heater (or just use a current-munching beast of a desktop PC :) http://en.wikipedia.org/wiki/Kotatsu
Wireless Nanode Dev
GitHub Repo: https://github.com/openenergymonitor/RF12Ethernet-
Nanode and RFM12 combo (Notes..to be made tidy later)
Problem: We want to add wireless connectivity to the Nanode using the RFM12 / Hope Alph RF modules. Both the RFM12 wireless transceiver and and ENC28J60 ethernet chip on the Nanode both use the SPI bus to communicate with the Atmega328. This causes a conflict unless the chips are selected correctly.
Solution: This has been done before by Jcw from JeeLabs with this EtherCard. He gets over the problem by having the RFM12 and Ethernet chip on different slave-select (SS) lines. Ethernet on digital 8 and RFM12 on digital 10. The procedure below discribes the changes needed on the Nanode to make it compatible with the Jee Etherlibrary code. The Nanode currently also uses digital 10 as a SS for the Ethernet Card
- RFM12 uses digital 10 as SS (slave-select)
- Need to modify the nanode to use digital 8 instead of digital 10 for its Ethernet chip SS line: Solution: lift Atmega328 leg of digital 10 and connect directly to RFM12 Sel line. Put jumber between digital 8 and 10 on Nanode header to bridge Ethernet controller SS to digital 8. The Nanode is now practically identical to the JeeNode Etherboard
- If using RFM12 sketch only (no etherent) need to insert line to pull pin digital 8 high (remember to set it as output), this puts the tri-state buffer between Etherent SO and Nanode MISO into high impedance mode.
- Leg 5 or 6 of the tri-state buffer also needs to be lifted to disconnect digital 2 from Ethernet chip interrupt. Digital 2 needs to be used for RFM12 interrupt, it is not needed for Ethernet.
The JeeLabs Ethercard does not incorporate a tri-state buffer, It seems that if the SS line is used to de-select the chip the tri-state buffer is not needed to stop the chip from hogging the SPI bus
Note: Future versions of the nanode will include a user configurable hardware jumper to select SPI slave select pins for the on-board hardware
Nanode V3 Schematic:
Solar tracker build