DIY electricity meter using a Raspberry Pi Zero W and some MQTT/API wizardry

Kelly Hirano wanted to see how switching devices in his home on and off affected his electricity usage. Excited by the possibilities of reading the data from his SmartMeter, he discovered that he could buy a product (a Rainforest Eagle-200) which would expose the data via an API. Looking at their API documentation, he dug into the data using a Raspberry Pi Zero W and sent it out to a MQTT broker running Mosquito, as well as recording it locally. He added a Pimoroni Four Letter pHAT to the Zero to display the data. You can read a bit more over on his blog.

1 comment for “DIY electricity meter using a Raspberry Pi Zero W and some MQTT/API wizardry

  1. 29 January 2018 at 3:56 pm

    For people in the UK wanting to try this but for slightly less cost you can also use one of the Current Cost EnviR clamp meters which were shipped with various energy suppliers in the UK and are readily available on ebay for roughly £15 (sometimes less). (If you have a family member that got one for free even better, ask around there were loads of them at one point).

    On the back of the EnviR you will notice a small RJ11 jack, this is actually a serial port. You can buy a USB lead that plugs in here also from ebay for again around £15 (or if you are daring make one yourself out of an old phone lead). If you then connect this to a Pi and look at the serial data you will discover the meter pumps out the temperature and electricity usage every second or so as plain text. You can then read this straight from the device (usually /dev/ttyUSB0 or something like that) with Python or your language of choice.

Leave a Reply

Your email address will not be published. Required fields are marked *