Open source energy monitoring using Raspberry Pi

OpenEnergyMonitor, who make open-source tools for energy monitoring, have been using Raspberry Pi since we launched in 2012. Like Raspberry Pi, they manufacture their hardware in Wales and send it to people all over the world. We invited co-founder Glyn Hudson to tell us why they do what they do, and how Raspberry Pi helps.

Hi, I’m Glyn from OpenEnergyMonitor. The OpenEnergyMonitor project was founded out of a desire for open-source tools to help people understand and relate to their use of energy, their energy systems, and the challenge of sustainable energy.

Photo: an emonPi energy monitoring unit in an aluminium case with an aerial and an LCD display, a mobile phone showing daily energy use as a histogram, and a bunch of daffodils in a glass bottle

The next 20 years will see a revolution in our energy systems, as we switch away from fossil fuels towards a zero-carbon energy supply.

By using energy monitoring, modelling, and assessment tools, we can take an informed approach to determine the best energy-saving measures to apply. We can then check to ensure solutions achieve their expected performance over time.

We started the OpenEnergyMonitor project in 2009, and the first versions of our energy monitoring system used an Arduino with Ethernet Shield, and later a Nanode RF with an embedded Ethernet controller. These early versions were limited by a very basic TCP/IP stack; running any sort of web application locally was totally out of the question!

I can remember my excitement at getting hold of the very first version of the Raspberry Pi in early 2012. Within a few hours of tearing open the padded envelope, we had Emoncms (our open-source web logging, graphing, and visualisation application) up and running locally on the Raspberry Pi. The Pi quickly became our web-connected base station of choice (emonBase). The following year, 2013, we launched the RFM12Pi receiver board (now updated to RFM69Pi). This allowed the Raspberry Pi to receive data via low-power RF 433Mhz from our emonTx energy monitoring unit, and later from our emonTH remote temperature and humidity monitoring node.

Diagram: communication between OpenEnergyMonitor monitoring units, base station and web interface

In 2015 we went all-in with Raspberry Pi when we launched the emonPi, an all-in-one Raspberry Pi energy monitoring unit, via Kickstarter. Thanks to the hard work of the Raspberry Pi Foundation, the emonPi has enjoyed several upgrades: extra processing power from the Raspberry Pi 2, then even more power and integrated wireless LAN thanks to the Raspberry Pi 3. With all this extra processing power, we have been able to build an open software stack including Emoncms, MQTT, Node-RED, and openHAB, allowing the emonPi to function as a powerful home automation hub.

Screenshot: Emoncms Apps interface to emonPi home automation hub, with histogram of daily electricity use

Emoncms Apps interface to emonPi home automation hub

Inspired by the Raspberry Pi Foundation, we manufacture and assemble our hardware in Wales, UK, and ship worldwide via our online store.

All of our work is fully open source. We believe this is a better way of doing things: we can learn from and build upon each other’s work, creating better solutions to the challenges we face. Using Raspberry Pi has allowed us to draw on the expertise and work of many other projects. With lots of help from our fantastic community, we have built an online learning resource section of our website to help others get started: it covers things like basic AC power theory, Arduino, and the bigger picture of sustainable energy.

To learn more about OpenEnergyMonitor systems, take a look at our Getting Started User Guide. We hope you’ll join our community.


Erik avatar

Didn’t know this existed. Very nice. Are there plans to go with standard bluetooth or wifi between components instead of RF? Also can the base communicate with X10 devices already or do people have to manually add other software? But this may be just the thing to finally get going on that home automation project.

Fibonacci11235813 avatar

Great work!

Glyn Hudsonhttps avatar

Hi Eric, thanks for your kind words. It’s possible to use an ESp8266 to go direct to Wifi:

The base-station does not have X10, however since the base-station is a RasPi under the hood maybe X10 could be added via USB? I don’t have any experience with X10.

If you have any further questions, please join in the conversation on our community forum:

r356c avatar

“including Emoncms, MQTT, Node-RED, and openHAB”

A top-shelf selection of home automation and domestic power use visualization software tools.

All are well proven and best in class in my opinion.

rolinger avatar

Great project Glynn, as r356c says it looks like you’ve lined up all the best home automation / control software and useful hardware. I’m in the (slow!) process of transitioning from Misterhouse on an NSLU2 to openhab running on a Pi and this looks like a nice add-in

Glyn Hudson avatar

Thanks guys,

Another nice open-source home automation platform that’s not currently included on the emonPi is Home Assistant. I’ve not had a change to use it much my self yet but I’ve been following the rapid development of this project over the past couple of years: If you starting from scratch I would consider it over OpenHAB

r356c avatar

The beauty of using a MQTT broker as the primary connectivity for IoT/home automation shines here.
I’ve run the Mosquitto MQTT broker, OpenHAB, Home Assistant and Node-RED all on the same RPi talking to the same devices with no conflicts.

The communications transport needs to be flawless. After two years of continuous use, I have yet to have a glitch that I blamed on the Mosquitto MQTT broker in my home automation system.

Thoni avatar

I wonder would it be justified if transformed emonPi PCB could accept Compute Module 3 Lite?

Raspberry.Tips avatar

Im using EmonCMS vor collecting and visualize my temperature data, i love it its pretty simple!

Comments are closed