Echelon/NES Smart Meters – possible 0x0B / 0x0C bugfix?

Bugfix

Thanks to Reto (info@makerspace-reinach.ch) we might have a solution for a long standing bug.

If you are having issues getting reliable readings from the meter/module and getting errors / Meter responses like these from the module:

  • 0x0B Authentication failure
  • 0x0C Invalid sequence number…

Typically from these requests:

  • 0x30 Full Table Read 0x0017 BT23 Current Register Data
  • 0x30 Full Table Read 0x001C BT28 Present Register Data

…then you know have an option to update the software. Make sure to study the readme before fetching updated software from our GitHub (https://github.com/DabblerDK/MEP-SW-ESP32).

As I don’t have a meter I can test this on anymore (and even if I did have such a meter), this updated software is provided as is – ALL USE IS ON YOUR OWN RISK :-).

Please do let us know if you had issues before and this updated software solved it!

Echelon/NES Smart Meters – probably our final post on this topic

Sad face

Today I got a bit of a surprise – without any warning my power distribution company changed my power meter from a NES Echelon meter to a Landis+Gyr E360 meter.

This means that I unfortunately have no way of testing and working on new hardware/software for our Dabbler MEP interface.

I hope someone else with access to a NES meter with a MEP interface will pick up the task and improve the hard- and software further.

We’ll continue to keep the Dabbler GitHub running on https://github.com/dabblerdk.

…and we’ll also keep the Documentation and message board GitHub we have setup in corporation with OSGP Alliance running: https://github.com/OSGP-Alliance-MEP-and-Optical.

Echelon/NES Smart Meters – MEP interface modules is now available again from www.ustepper.com

uStepper

Thanks to our friends at www.ustepper.com hardware to IoT enable your NES/Echelon meter is now available again.

You can purchase it directly from their shop here: https://ustepper.com/shop/home/26-esp32-c3-dabbler-mep-interface.html

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 always you can find our updated software on our GitHub here: https://github.com/DabblerDK/MEP-SW-ESP32

As always other small fixes and improvements were done and going forward we’ll plan to keep supporting both hardware versions.

Echelon/NES Smart Meters – MEP interface modules will (hopefully) soon be for sale again

uStepper

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.

As you might know we had (and still have) a hard time getting more people involved, but we have had some community contributions to the code and inspiration stories. To try to push this further, we chose to do a “limited time offer” where you could buy either parts (kits) or assembled modules of our prototype.

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!

Echelon/NES Smart Meters – MQTT now part of the main software

MQTT logo

We have merged a long standing pull request, so MQTT is now part of our main software. While here we did some long due cleanup of the headlines on the Dashboard page.

This update consists of two files. Please update them both and in this order:

  1. A new firmware: “\NES-MEP-UI\build\esp32.esp32.esp32doit-devkit-v1\NES-MEP-UI.ino.bin”
  2. A new wwws-file: “\NES-MEP-UI-SPIFFS\update.wwws”

You’ll find the files and documentation on how to update them on our GitHub: Click here to go there!

(Guest writer) Echelon/NES Smart Meter – FHEM integration in Austria

FHEM Home Control

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.

Kind Regards,
Engelbert Horvat

PIPrint – A Free Direct Printing Solution for your Microsoft Dynamics 365 Business Central

…and Now for Something Completely Different…

Some of you might recall that this blog is not limited to posts about Echelon/NES meters, and know it is actually for all kind of stuff Graves and I am dabbling with. Granted, lately it’s been mostly about our Echelon/NES project – but we have not stopped dabbling with other stuff too :-).

You might know that my day job is to develop solutions in Microsoft Dynamics 365 Business Central (I’ll call it BC in this entry), and for some time I had an idea I would like to share with the community:

As some of you might know, the BC web client and Microsoft’s chosen path has made it quite an expensive challenge to do direct print (direct print is when you do a print directly to a printer – without the user having to i.e., download a PDF and then print it manually).

Microsoft do have a solution called Universal Print and BC supports it along with e-mail enabled printers. You can read more about both solutions here! The main problem – if you printer does not support e-mail printing, is that Universal Print is quite expensive.

Others also have solutions for this – and it might even be included in something more advanced like ForNAV Direct Print.

But why didn’t someone design and do a cheap, Do-It-Yourself solution?

…and – if you are on BC SaaS, but still need a simple, cheap solution to print on local and cheap printers? Or even Network printers that does not support e-mail printing?

And off cause we should try to keep it as cheap and simple as possible – and don’t rely on any special ports to be forwarded and open in firewall etc. That is simply too cumbersome for regular users to setup!


BC App – maybe a Per Tenant Extension?

Well, imagine installing an app on your BC that collects all printjobs as PDF and store them in a BC table. Then making them available through a webservice of some kind… While at it we could do a secondary webservice allowing “Print Processors” (I’ll explain what that is in a minute) to register printers with BC, so they are available for printing directly in BC.

We must do it, so we are able to install and use it for both BC OnPrem and BC SaaS, right?


So, what is this “Print Processor” thingy and what does it run on?

Well, it is something that can obtain a list of available printers and call a BC webservice to tell BC about them. It should also call a BC webservice at some interval to see if there are any print jobs (PDFs) waiting, and if so – fetch the PDFs and print them. For the last part we can simply rely on solutions other created – it cannot be that hard to print a PDF, right?

Ideally the “Print Processor” should be available on multiple platforms, it only has a few requirements:

  • Connect to the network so it can call BC webservices (Internet if BC SaaS)
  • Call webservices and handle the result
  • Connect to the local printer (network, USB etc.)
  • Print a PDF to a local printer

Ideally it could just be some kind of script? Python for Linux and other Unix like systems (some NAS servers even run Unix like systems). And maybe PowerShell for Windows while we are at it?


Really – how hard can it be to pull this off?

Well – https://github.com/DabblerDK/PIPrint

This is in NO WAY final “production” quality software, but feel free to use it on your own costs and risk and build on it.
Release it commercially, use it privately etc.
Please always keep a reference to this blog somewhere people see when they use it. And please give back any improvements to the GitHub repository and the community…

Enjoy…

[Limited offer has now ended] Echelon/NES Smart Meters – MEP interfaces modules and kits

Limited Time Offer

Update as per 2023-03-30: We are out of PCBs and parts and are not planning to order any new ones.

The Limited offer has now finally ended. It has been running FAR longer than we expected due to high demand – we were simply not able to catch up, and when we did, we had some extra modules and kits we wanted to provide.

Anyway – everything comes to an end, and we simply don’t have the time to keep providing these kits and modules. We hope that someone else will pick up this task – and we will be happy to refer/forward any requests etc…

Remember all Hard- and Software is (and will continue to be) available on our GitHub here: https://github.com/dabblerdk

Below you’ll find the original text of this entry along with the comment section:


This is a follow up on our previous Echelon/NES Smart Meter post.

We have released all our Hard- and software on GitHub here: https://github.com/dabblerdk, so your cheapest way of getting started if you have soldering skills is to order a PCB and components – and start building your own modules.

We hope that someone will pick up the task of producing/selling kits and assembled modules, but we have decided to offer some ourselves for a limited time to get more people involved.
Note: The price is set so others will have a chance of under-bidding us, that is on purpose.

If you buy one of our modules we expect you to participate in the project in some way. It could be as simple as write your story/experience about the project (as a guest writer on www.dabbler.dk or on the OSGP Alliance GitHub site), or if you have the skills you can help develop/improve the hard- and software.

We have two options:

  1. The MEP module as a kit, all components included. The ESP32 is a 16MB version.
    You are required to have the tools and skills, to assemble the PCB, adjust the buck converter and program the ESP32.
    The PCB/components are classic through-hole-technology (THT) so you don’t need to have good SMD skills.
    But note that the ESP32 is a separate PCB with castellated holes (that is kind of like SMD).
    As the module is NOT assembled, we cannot test it or install the software. You’ll have to do that yourself.
    Price: 300 DKK including freight in Denmark (payment due before shipment (bank transfer, PayPal or Mobile Pay).

  2. An assembled MEP module. The ESP32 is a 16MB version.
    The Module is flashed and should boot into Access Point mode when mounted in the Smart Meter. You should then be able to go to the homepage of the module and configure it to use your WIFI. Here you will also be able to enter the MBK key you got from your Power Company.
    PCB and components are mostly classic through-hole-technology (THT), but the ESP32 is a board with castellated holes.
    We might also choose to provide SMD versions at the same price depending on component availability. You will be asked if SMD is OK with you before shipping.
    Before shipment we will make sure the module boots correctly in our Smart Meter, but we won’t perform a long/extensive test of the module.
    Price: 500 DKK including freight in Denmark (payment due before shipment (bank transfer, PayPal or Mobile Pay).

IMPORTANT:
This is a prototype project without ANY form of warranty. Any use of this module is your risk and costs!
We cannot gurantee delivery times as we purchase most components from China to keep the cost low. Delivery times may vary from 0 to 2 months or in special cases even longer.

NOTE:
AS we currently have no experience with the IR solution, we will NOT be providing any hard- or software for that at this point.

ORDERING:
Please send an e-mail to gert@dabbler.dk and graves@dabbler.dk, stating if you want a kit or an assembled module. Also state your shipment address.

Please let us know if you have any questions.

[Breaking News] Echelon/NES Smart Meters – Documentation for MEP and Optical interfaces have been released on GitHub!

Breaking News!

It is with great pleasure we finally can announce the release of the following official OSGP Alliance documentation for OSGP Smart Meters (i.e. Echelon/NES Smart Meters):

  • The Multipurpose Expansion Port (MEP) interface and protocol
  • Optical interface and protocol

You will find the PDF files in the Documentation repository at GitHub using this link: https://github.com/OSGP-Alliance-MEP-and-Optical.

Thank you for your patience, we know this have been under way for almost two years.

Now, go ahead, please start Tinkering now! 🙂

Note: The hard- and software we’ve been tinkering with is not finished (probably will never be finished as it is a tinkering project 🙂 ), but we’ll get it released ASAP so others can get inspired or join as they wish.