Just a quick note to point you in the direction of my new “eHome” page on my blog. It uses a CurrentCost meter to read electricity usage and temperature data from my home, via the superb Pachube service. As I gradually purchase new sensors, I’ll update the page to include data from those, too.
Today I have been working on the project I mentioned a few weeks back, to collect, store and graph data sent from my current cost unit. If you have been following this blog, you will know that I plan to make the service available to anyone, for free, so that they can do the same.
As I intend to release this service to the community in the coming months, I realised I couldn’t keep referring to the project as ‘the project’, so from here on in it has been lovingly code-named ‘Datazzle’ (say: dah-taz-all).
Ok, so what’s the deal? What is it? How will it work?
Datazzle will comprise initially of an XML web service (for receiving your sensor data) and a companion web site, or web front-end, that will allow you to view all your sensor data from one place, graph it, and also let you define various options for sharing your data with others.
To get started, all one will have to do is sign-up for a free account, define at least one ‘environment’ (eg. “My House”) with one location inside it (eg. “Living Room”), and setup at least one sensor (eg. “Temperature sensor”). That’s it. It’s all point-and-click.
Then, you’ve got to get your hands dirty because it’s up to you to send compatible XML data to the API on a regular basis. To help you along the way, I will be releasing an open-source version of my test code (cleaned-up a little, of course!) that will initially connect to the current cost, take your API key, User Id and the environment configuration variables, and publish the data for you. This will basically convert the current cost XML data into XML that conforms to the “Datazzle Data Specification”, which is basically just a tweaked-version of the EEML standard.
You can use Datazzle to store data from ANY compliant device, not just the Current Cost…
Datazzle will be device-agnostic, meaning that you can use it to connect any physical or virtual sensor data (eg output from something like Second Life), and it will store it and allow you to navigate your data in a variety of different ways. From one Datazzle account, you will be able to setup multiple environments, and locations within those environments, to store data from as many sensors as you wish. You’ll get a ‘sensor dashboard’ to maintain all your sensors, from multiple locations.
Introducing the Datazzle Data Specification… feedback please
Although still only in the design phase, I have decided to base my XML format loosely around the EEML specification, already well established for sharing sensor data. The web service includes a web front-end that lets users setup and configure their devices and set a bunch of parameters (such as sensor types and locations) from the GUI, so the EEML that is sent to the server need only specify the corresponding ID values, instead of the actual string values every time. Take a look at the snippet to see what I mean:
<datazzle> <userId>123456</userId> <apiKey>00000000-0000-0000-0000-000000000000</apiKey> <eeml> <environment updated="2008-10-12T16:35:42" creator="" id="3456789"> <location id="123" /> <data sensorId="101"> <!-- Current temperature, in degrees celsius --> <value>28.7</value> </data> <data sensorId="102"> <!-- Current energy consumption, in watts --> <value>2692</value> </data> </environment> </eeml> </datazzle>
You will note that there is less EEML here than in the specification and that some of the attributes have changed. I have also added “userId” and “apiKey” elements. A lof of the data included in the EEML specification has been ommitted from the EEML element you are required to send to the server, simply because you have already specified it once – when you were setting your sensor up online (i.e. the status of your feed, a description, a title, any links/copyright data etc, latitude and longitude, tags for each <data/> element and the units of measure).
Of course, when the service is available, there will be a nice UI to help you get up and running with the XML standard as quickly as possible (and a lot more documentation!). For now though, that’s all the info I have for you. If anyone has any thoughts or ideas, please feel free to comment – I’m open to adapting the specification to suit the needs of the community.
Here’s a quick preview of the tray app monitor that lets you see what data the current cost is sending to your computer, and the converted output being sent to Datazzle:
I will try to post more information and screenshots on the application and the service soon.
Thanks for reading!
Happy to report that my second CurrentCost display has arrived, just a day after ordering it off eBay from CurrentCost themselves. A bargain at just £15 plus postage, it enables me to have this unit on our kitchen worktop, while the other is connected to my server ready to connect to the web service I am developing.
A quick update on that: having had so much fun so far creating an infrastructure capable of handling the current cost data, I have decided to extend it so that other users from around the world can publish and share their sensor data, not just from the current cost. I know, I know… there’s also the very good Pachube out there for those who are inclined to use it, but I figured what I’d like to do is offer something a bit more consumer friendly, with graphing and social features as well.
If anyone is interested in helping me test this out (or even in lending a hand with the design and build), do get in touch. More on the current project progress soon…
I don’t think I have ever been so pleased to be woken from my saturday-morning slumber at 7.30am before. Still trying to open my eyes I made it to the front door, where the chipper postman handed me my package. Could it be? Was it my long-awaited CurrentCost? Yes!
After 22 days, my CurrentCost had arrived. At 7.30am, on Saturday morning!
Needless to say, it was fitted within 30 minutes.
As I write this I am just hooking it up to my PC to check all is working OK, but now the fun starts – I can begin developing my software to log the data. Watch this space!