Emoncms control developments and demo's
First Happy Christmas everyone for yesterday!
One of the things I enjoy about the Christmas period is that you get some nice time to relax and with relaxation comes ideas and energy to try out some new things.
Glyn and I had been talking about control interfaces that could work well on a mobile or tablet and Id been working on a touch enabled dial earlier this month so I thought Id package it up as a emoncms module that sets the control variables in the packetgen module, I've also created a couple of simpler control interface examples using buttons and edit boxes. To try out the following demo's for yourself see the steps at the bottom of the post.
One of the things I enjoy about the Christmas period is that you get some nice time to relax and with relaxation comes ideas and energy to try out some new things.
Glyn and I had been talking about control interfaces that could work well on a mobile or tablet and Id been working on a touch enabled dial earlier this month so I thought Id package it up as a emoncms module that sets the control variables in the packetgen module, I've also created a couple of simpler control interface examples using buttons and edit boxes. To try out the following demo's for yourself see the steps at the bottom of the post.
Example 1: Heating On/Off
A simple example using a bootstrap styled html button as our heating on/off button. Clicking the button toggles the state and updates the “packetgen” control packet with the new state.Example 2: Heating On/Off plus set point
Very similar to the first example but now with a text input for setting the set point temperature for the room/building. The microcontroller on the control node checks the room temperature and turns on and off the heater depending on the setpoint setting it recieves from emoncms.Example 3: Nest inspired dial
A nest inspired dial interface for setting the setpoint temperature. The set point can be adjusted by spinning the dial wheel with your finger:The dial and page resizes to fit different screen types from widescreen laptop's to mobile phones and tablets and touch can be used to spin the dial.
Solar PV Generation
Not really control but developing the idea of custom html/javascript canvas based graphics further.I've always liked the standard “news & weather” app that came with my android phone. It's a good example of how clean an intuitive graphs can be and how touch can be used to browse temperature/humidity at different times of the day.
This example is a start on creating a graph that looks and behaves in much the same way implemented in canvas.
What you will need to run these examples
You will need your own installation of emoncms to try these out, such as an emoncms + raspberrypi + harddrive setup.RaspberryPI with harddrive
You will also need the packetgen module (installed as default with the harddrive image):
http://github.com/emoncms/packetgen
and the 'development' repository
http://github.com/emoncms/development
Copy the folder titled myheating from the development repository to your emoncms/Modules folder. (from development/Modules/control)
You should now be able to load the examples by clicking on the My Heating menu item.
The example does not yet allow for any gui based configuration and so assumes that the control packet structure looks like this:
This packet will work with the Arduino electricradiator control node example that can be found here:
Arduino Examples / electricradiator
This sketch could be run on an emontx with jeeplug relay's attached or other rfm12b + arduino + relay type hardware builds.
Coding your own control interface
The code for the simple button example above which may be useful as a foundation for building something else can be found here:
https://github.com/emoncms/development/blob/master/Modules/control/myheating/button.php
The interface is all in html and javascript jquery and uses bootstrap style buttons it just sends the updated heating state to the packetgen module via ajax.
More posts on controlling things
Glyn's post on controlling his boiler: http://openenergymonitor.blogspot.co.uk/2013/12/emoncms-early-heating-control-demo.html
The packet generator: http://openenergymonitor.blogspot.co.uk/2013/11/adding-control-to-emoncms-rfm12b-packet.html To engage in discussion regarding this post, please post on our Community Forum.