EnergyMe Home: open source smart energy meter

Hi everyone. Wanted to share a project I’ve been building, EnergyMe Home, an open-source DIN-rail energy monitor built around the ESP32 and the ADE7953.

It covers 16 independent CT channels plus a voltage reference from one board (but still works with 3 phase), and mounts on the DIN rail next to the breakers. Firmware and hardware are both open source on GitHub. Works fully local via MQTT/local API, and we recently added an optional cloud portal on top for remote monitoring, cost analysis, CO2 tracking, appliance recognition, and solar/battery sizing.

We’re a startup in Italy, about 100 units running in the field across 20+ countries at this point. Obviously, a lot of overlap with what emonTx/emonPi already somewhat do; would genuinely like to hear how this community sees the trade-offs, especially around channel density and costs.

GitHub: GitHub - jibrilsharafi/EnergyMe-Home: Smart energy meter capable of monitoring up to 16 channels. Supports MQTT, REST API, Modbus TCP, InfluxDB, AWS IoT Core. Friendly UI and fully open source (PCB, schematics, components, source code) · GitHub
Site with photos: energyme.net

Happy to answer anything technical.

Congratulations on shipping @jibril! I haven’t had a chance to look through the code in too much depth, but a few questions:

  • What did you find the most challenging part of the design? :slight_smile:
  • What do you think your design does better and worse than the Pi3?
  • What is the time slicing period for CTs 1-15? You have CT0 on a dedicated input, and then is each other CT connected through the mux for 200 ms?
  • Have you tested connecting all 16 CTs at once? It looks pretty cramped on that bottom panel!
  • On that topic, why did you choose 16 inputs? I was even looking to dropping down a little to 3 or 4 CT inputs - solar + battery + mains covers most people’s use cases.
  • Are you calibrating for phase on the CTs as well? We’ve found those highly sensitive to CT placement so really need to be done in situ.
  • You’ve mentioned CO2 sensing; I couldn’t see any expanders for other sensors, did I miss something? I’ve had nice results with the STCC-4 CO2 sensor, if you’re looking for something.
  • Appliance recognition has always been the ultimate end point of all energy monitoring systems, but no one’s managed it commercially or open source (as far as I know!). Any progress your side? :slight_smile:
  • edit: bonus question, how did you find working with FreeRTOS? I got to the stage where I should have probably gone with an RTOS, thinking of Zephyr in the future…

Again, congratulations on getting it out - nice to see other designs out there!

Hi! Thank you, and regarding your questions:

  • Fitting everything in such a small form factor was the hardest; second was the high/low voltage isolation along with the metering part.
  • To be honest.. quite a lot better. For starters, it is self-contained: you only need to connect the mains in, the clamps, and that is done. Connect to the WiFi and you have all the data you need, without external transformers or complex processes. The form factor is extremely compact compared to pi3, and ultimately it is even cheaper.
  • The multiplexed channels are sampled every 400 ms, but the priority schedule is dynamic based on the actual load. So a static 10W load could be sampled every 10s, allowing for more accurate measurements on more important channels.
  • Yes, we’ve done many installations. And while it is a bit cramped, it still fits, and in any case is something you do only once and don’t touch/move regurarly, so it is fine.
  • Because based on the size constraint of the enclosure, that was how many 3.5mm audio jacks I could fit!
  • Yes we do calibrate everything thoroughly during manufacturing, and actually I have to say that the meaasurements are accurate witouth in situ calibration.
  • I was referencing to our cloud portal (optional), where we gather CO2 emissions in each country, and later combine it with your consumption to give footprint analysis. No sensors involved, sorry for being unclear!
  • Actually we have made quite a lot of progress (we already recognize all fridges and resistive loads!), and it is thanks to both the high-quality and high-resolution data, as well as the channel sub-metering, which few other have. This combination (along with a lot of data and good ML) allows to get increasingly good results.
  • It was a pain in the beginning, but oh boy how much it is paying off now. I can simply add another task or whatever I want, and as long as I don’t starve any other task, everything keeps working perfectly. I could spend hours talking about how “well” made the code is (in the sense that it does A LOT of things), but feel free to explore it yourself to understand better :slight_smile:

The Pi3/Tx6 are also self contained and plug in. It was a design choice to have the separate boxes, rather than a DIN rail unit. Easier to install for non-technical users as it’s just a plug, there’s no direct handling of mains voltage. It also has lot more expandibility. We have a WiFi module, just not generally available yet. There’s legacy compatibility concerns as well – a strength and a weakness!

The amplitude is fine, I was thinking the phase correction. It’s very sensitive to the CT installation, but is quite a small deviation particularly at PF ~ 1.

Nice :slight_smile: Interesting to see if you could do better (see below).

I don’t think that follows: 10 W static is equivalent to 1000 W static. Are you looking at rate of change, rather than absolute load? That’s a big difference to the Pi3 - all channels are sampled at 2.4 kHz continuously. It would be interesting to see if you could do better assignment with higher resolution data.

Got it, using the public grid intensity APIs.

Yep - that’s the big advantage of the RTOSs once you go beyond some threshold of complexity :slight_smile:

Yes, but to be honest, deciding not to pursue a DIN rail mount does not have any advantages over using a DIN rail mount, but it avoids the added complexity of designing a DIN case and fitting the PCB and everything else around it (in my case, a lot of effort went into that). And not handling mains voltage is indeed easier (for designing, and especially certifications), but that is exactly what makes EnergyMe really self-contained: you don’t need any external components, just two wires and some clamps, and it fits everywhere. Soon we will also release the Home Pro, with Ethernet in place of 4 connectors, thus having full flexibility.

Channel 0 is sampled continuously at tens/hundred of kHz, while the other channels are sampled (at the same frequency) only when it’s their turn. This is an approximation, but we found that in houses and businesses where everything is being monitored, less than 1% of the energy doesn’t sum up (summing all channels vs channel 0), so I would say this is more than enough. And yes, 10W static has almost the same low priority as 1000W static, just the latter having a bit more priority since it is a higher share of the total load.

Congrats! This looks very nice @jibril and great to see someone else start an open hardware business :clap: