Note, although this is a completely redesigned hardware based on a different ESP32 module (it uses the ESP32C3 and not the ESP32-WROOM-32 of our original module), we have extended our software to also support the new hardware.
The source code is the same, and the board selection configures the software so i will run on the chosen module. Simply select the “ESP32 Dev Module” board for the “dabbler hardware” and the “ESP32C3 Dev Module” board for the “uStepper hardware”.
You will also need the .wwws files for both versions.
As you might have discovered we recently shut down our sales of MEP interface modules and kits.
Our initial goals were to:
Get the MEP documentation and specs released for the public so everyone could tinker with the interface. We succeeded this almost a year ago, and as a bonus the IR interface documentation and specs were also released. You’ll find both on the GitHub we have setup for OSGP Alliance here: https://github.com/OSGP-Alliance-MEP-and-Optical Note: The OSGP Alliance is the global non-profit association dedicated to promoting the adoption of the Open Smart Grid Protocol (OSGP) and infrastructure for smart grid applications towards a future proof modern smart grid. Networked Energy Services (NES) is a member and chose that the documentation / specs should be released via OSGP Alliance.
Do a prototype implementation of a module that put the Echelon/NES meters online. Note: It was NEVER our intention to develop a finished consumer product, nor sell/distribute such products.
Get people involved in tinkering with the MEP interface – either by getting them to do their own projects or by getting them involved in developing “our” prototype further.
Unfortunately the offer started just as Graves became a father and I got a new job. So we both had “real life” situations that demanded more of our time. Combined with a higher demand on the offer than expected, we had to extend the offer far longer than expected.
Our “limited time offer” had “limited effects” :-). We had hoped that someone would step in and start producing these modules, and although we had a few interested people contacting us, nothing happened that ended up in something we could refer others to. In the end we kind of gave up. Also we caught up with the initial demand for modules and started shutting down the offer. As usual we purchase too many parts, so it took some time before we were out. But we are now completely out of parts and don’t plan to buy any more.
Well, this “whining” is just to explain that it was neither (and never were) our intentions to bring this project further than to the prototyping state, nor our intentions to sell these modules and kits. We have full time jobs in “real life”, so we don’t want to start a business selling these modules (it won’t be viable without other products too – the demand for MEP modules is simply not high enough for this to happen).
Now for the good news! / we are happy to announce:
After shutting down our offer, we were contacted by a party that do run a business selling various electronic products – and they are currently working on a cost reduced version of the module. We have allowed them to build on our project free of charge and the plan is it will end up in a more or less compatible version running the same software (or a variant of it).
They are still in the development phase (there is a lot of work in bringing a tinkering prototype to a state where it can be produced and sold in an effective/viable manner), but they have allowed us to tell you about it and share their name.
If everything goes as planned you will soon be able to purchase a “Dabbler” MEP module variant from the Danish company uStepper. Stay tuned on both their website and our Blog!
Back in June 2022 Engelbert Horvat reached out to us to discuss a MEP solution for his Echelon/NES Smart Meter. Engelbert lives in Austria, so unfortunately our module is not a good solution for him. Although the MEP electrical connections and protocol is standardized in these meters, the MEP “drawer” our modules are designed for is a Danish thing – and has even been abandoned in the NES Smart Meter Generation 4 on the Danish market. Note: It would be possible to use our module, but it needs to be connected by wires and one should probably also create an enclosure for it.
Luckily Engelbert is also a fellow tinkerer, so although we inspired him, he developed his own hard- and software solution. To get people to do this has always been our mail goal and we asked him to tell his story as inspiration for others:
Hi, my name is Engelbert and live in Austria in the city of Amstetten which has its own power supply company (the “Stadwerke Amstetten”). They have around 12000 Echelon/NES Smart Meters installed. I wanted to interface with my smart meter and send informations via MQTT to a home automation system (FHEM in my case).
First contact and tests in June 2022: I was asking “Stadwerke Amstetten” how to interface with their smart meters and eventually was finding the right person who had very good knowledge and enough motivation. To my surprise he gave me a spare NES smart meter just for testing, “I can fool around with this a bit for the next few month or so” he told. Also I got a xml file with the basic Encyption key (MBK) for this smart meter. So no problem with obtaining a MBK at all….my thanks are going out to Stadwerke Amstetten. But I was told that it is not so easy to get out data, and also that I was first one who was asking for this in Amstetten.
Finding the Echelon/NES smart meter informations on the dabbler.dk site was just great and I did hope to be able to go on with this.
Gert was providing me with the current (at the time prelim) ESP32 MEP interface software, and some installation hints as well. (They where mostly in Danish language, but Google does a great job in translating…).
So I wanted to get some readings from the smart meter quickly….
Hardware wise I had a ESP32 Module (ESP32 Dev. Kit) which is supplied and programmed via a micro USB port. Also I found a old MAX232 (exactly a MAX232ECPE for 5 Volt !) and the capacitors in my electronics storage. Because MAX232E is a 5V but ESP32 is a 3.3V device level shifting for the RX data out of the MAX232 must be done. I did just a simple voltage dividor with 2 resistors (1k / 1.8k). For the TX signal to MAX232 I was hoping that ESP32 delivers enough voltage for the 5V logic of the MAX232. So I came up with a simple schematic – basically a stripped down version of the NES-MEP from dabbler.dk, including now a ESP32 Module. Please visit https://github.com/ehorvat1/NES-MEP-Reader/tree/main/Hardware and look for the file NES-MEP-5Volt.pdf.
I have checked also some voltages and power consumptions. MAX232 provides 2 voltage charge pumps and their output can be measured on pins 2 (VS+) and 6 (VS-) . Note: using 100nF caps for a MAX232 is a bit out of spec. Caps should be 1µ for MAX232E but 0,1µ for MAX232A or MAX3232, but it was working well and I could easily exchange the MAX232 with a low volt MAX3232 later. At a power supply of 5V the MAX232E gave 8.2V on VS+ and -7.3V on VS- during operation.
I have also tested on 3.3V level with a MAX3232 in combination with a LM2596S based step down converter. At a power supply of 3.5V the MAX3232 gave 5.8V on VS+ and -5.5V on VS- . All supplied by the NES Smart meter 26V output which used then app. 18mA on average, with some short peaks due to Wifi communication up to 30-40mA (and this may lead to problems – see notes at the end.)
Software wise was also no big deal with a little help from Gert.
Please note that the MEP basic key (MBK) comes in different forms: a) ASCII which should be 20 characters long similar to this: a7941d85bce8a8fa2ab7 . b) HEX representation of the ASCII format which would be similar to: 6137393431643835626365386138666132616237 so this is 40 char long where ASCII is shown in hex (ASCII a = 61(hex)) c) Decimal representation of the ASCII format which is like hex, but each ASCII is shown in a decimal.
Final (…kind of) PCB design Aug 2022: I have designed now a PCB which holds the MAX3232, a ESP32 Module and a DC/DC converter to 3.3V.
Another issue is how to physically connect to the MEP port in a home environment. At my place the MEP port terminals are covered by the lower plastic cover which is sealed off by the power company in my case – it is not allowed to cut the seals !!. As a first try “Stadwerke Amstetten” would be ok to take the seals off so I can put the hardware inside the NES meter covers. But I did not like that, I want the NES-MEP-ESP32 to be easily accessible. So I have convinced them to to another solution.
Which is that the owner of the smart meters (the power company) will open the sealed off cover and install a little connector to the MEP port terminals which are then routed outside using a 6-wire flat ribbon cable. The flat ribbon cable fits through the gap of the plastic cover on the back of the meter and the hardware can be placed outside the meter. The smart meters have to be excanged on a regular basis (3 years ? For calibration checking) so this must also be taken into account.
Github Repo Nov. 2022: I wanted that ESP32 is sending NES meters data via MQTT to my home automation system. So I stumbled over a nice project on GitHub called AMS2MQTT Bridge (https://github.com/gskjold/AmsToMqttBridge) and modified this to read data via MEP port from the NES smart meter. You can find this on my GitHub at https://github.com/ehorvat1/NES-MEP-Reader. You will find there also detailed info about the used hardware.
Notes: 1) I have found that NES meter power supply is quite limited and on some meters just too less power is provided to drive ESP32….which is no big deal since I am using ESP32 Modules anyway which have an USB port for programming and power supply. So for some (I had only problems with NES Smart Meters Type 83332-3I)
2) My software uses the hex format of the MBK Key and not the ASCII representation used in Gerts NES-MEP software. The “hex” MBK is 40 char long as each ASCII is represented by a 2 digit hex number.
This is another bonus entry on our blog in the Echelon/NES Smart Meters series. As we have mentioned before, it is sometimes hard to find time besides our regular jobs to dabble with this project. We have had a lot of interest in using the IR (Infrared) port on the Echelon/NES Smart Meters, and there have been (at least with N1) some confusion about if it was encrypted or not.
We know that someone at Sommerhack 2021 had been told by N1 that they should be able to use the IR port and that the key was the same as the MBK used for the MEP communication. We have not tried that ourselves as we have chosen to focus our limited time on the MEP integration. And to our knowledge – nobody else have tried the IR approach – that is – until now :-).
Our fellow tinkere Ulrik was faced with the challenge that his power supplying company Konstant, does not allow him to use the MEP-port on his Echelon meter. They are simply following another approach compared to N1, and suggests that their customers should use the IR-port.
Overall/political speaking this is actually really good news. Because if N1 can allow us to use the MEP port in a safe way, why should Konstant be against it for security reasons? Why should they not agree to allow it sometime in the future if they are pushed? Also – if Konstant can allow their customers to use the IR port in a safe way, why should N1 be against it for security reasons? Why should they not agree to allow it sometime in the future (if not already?) if we push them?
Some have been dreaming of being able to interface with the Echelon/NES meters for years – but it was not possible due to a lot of “red tape”. Maybe we now have or will get TWO separate interfaces for interfacing with Echelon/NES Meters?
Enough dabbling with words from dabbler.dk – let’s hand over this scene to Ulrik and let us hear what he was actually able to do with the IR port:
First of all, I would like to say thank (and sorry) to Gert and Graves for letting me ‘spam’ them with my thoughts, questions and discoveries. And of cause for helping me out from time to time :-).
INFO: My name is Ulrik and I work as an Automation technician. I started out as an electrician and was fascinated by all the technical stuff you could do. I have around 30 Years of technical background. I build my own house in year 2000 where I put in a PLC to control the house. All lightning, heating, ventilation and alarmsystem is run from that. Well… Back on the track… I started out collecting the pulses from my main meter by using the S0 pulses. Worked great, until I got solarpanels installed and the meter now send out pulses whenever a watt was produced or consumed, so not that usefull :-(. Then I started looking at other ways and stumbled over a lot of options, among this was the IR port. So here’s a story of how I got this to work :-). I have a NES 83334 meter. I also use Home Assistant.
I have very little knowledge of Python and NODE RED, so ‘Google was my friend’ 🙂 I also know that this setup could be much more ‘smart’. But for now, it just might get people started to get data from the meters 😉
If you use a resource file, you can ‘autostart’ the program.
Errorhandling still needs to be taken care of 😉
NODE-RED Program: The data from termineter is stored in /var/tmp BT23 and BT28 and is updated every 10 sec-ish. I use NODE-RED to handle the data (and send them to HomeAssistant via MQTT) Install the ‘Bufferparser’. (Manage palette and search for ‘node-red-contrib-buffer-parser’) The Bufferparser handles and changes the data from the files in /var/tmp and makes the data ready. Afterwards the data is made ready in a function and finally sent by MQTT.
I also tried to make some ‘autodiscovery sensors’ for HomeAssistant.
Screendump of the Flow:
1. Timestamp runs every 10 secs.
2. Function /var/tmp/BT23:
3. BufferParser BT23:
4. Change node ‘fwd_total’:
5. MQTT: Setup according to your MQTT broker settings.
6. Discovery settings for HomeAssistant
Screenshot from HomeAssistant:
Hope this can inspire other to get data from ECHELON/NES meters via IR eye.