question

arvid avatar image
arvid asked

HAN port on the home electricity meter as energy meter for Dynamic ESS

To realize Dynamic ESS access to energy data for my home is necessary. This data is available in the HAN port on my electrical meter Aidon 6535. By using this data I avoid installing an expensive energy meter that takes up space and increases the risk of errors in my electrical system.

Can anyone help me with this?

Maybe Victron will com up with a solution as I assume there will be a big market for this?

(HAN port will usually be on new electricity meters in the EU)

Energy Meterdynamic ess
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
matt1309 avatar image
matt1309 answered ·

GitHub - runborg/pyHan: Simple Python library to decode data from the HAN port on Norwegian electricity meters


This might be useful in addition to this to make your own custom driver:

GitHub - fabian-lauer/dbus-shelly-3em-smartmeter: Integrate Shelly 3EM smart meter into Victron Energies Venus OS


You could tweak the shelly driver to get data from han rather than http endpoint which is what it does to get shelly energy meter data.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

arvid avatar image
arvid answered ·

Thanks. This will probably be difficult as I haven't done programming for many years. However, I have found a HAN port reader (Pow-U) for my meter Aidon 6525.

https://lectronz.com/products/pow-u-han-port-reader-for-m-bus-meters-esp32

This reader will be placed in the Wifi area of my PC and the Victronix equipment and connected to the HAN port with an ethernet cable. I can then read the data on my PC and the data is available to my Victron Cerbo GX as a Wifi signal.
Problem: How do I integrate the meter data from the HAN port reader (Pow-U) into my Cerbo GX?

Firmware v2.2 user manual_6okt23.pdf


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·

HI @Arvid


If you've got the data on PC/server and you want to send it to cerbo gx/venus os device I would use MQTT.

However you'll need to add a virtual energy meter on the cerbo gx given no device is plugged directly in.

To get a virtual/dummy energy meter in the gx device i think you can just tweak a premade driver that victron provides (less programming). And install it via ssh (I've pasted the link for how to install customer drivers below)


Here is the example code from victron:

velib_python/dbusdummyservice.py at master · victronenergy/velib_python · GitHub


I think you'll need to edit line 87. from

servicename='com.victronenergy.dummyservice.ttyO1',

to

servicename='com.victronenergy.grid.ttyO1',


I'm not 100% sure but you may also need to remove the default paths that are added to these ones under grid meter: (I'd add them in just in case)

dbus · victronenergy/venus Wiki · GitHub

Once you've update the code you need to follow the installing a custom driver section on this page:

howto add a driver to Venus · victronenergy/venus Wiki · GitHub


If everything's worked you should see your virtual meter in the output of dbus-spy

command when you paste that command into ssh.


If that's worked all you need to do then is send the data to the virtual device on the cerbo/venus os device. I prefer to do this via mqtt.

The topic for the same as dbus paths in link but also with VRM ID and device ID. For example power data would be sent to the mqtt topic:

W/{VRM ID}/vebus/{ID}/Ac/Power

Where you change {VRM ID} to whatever number your vrm id is and {ID} change to device ID (you'll be able tosee the device ID on the vrm devices page).

If the ESP32 device lets you send directly to custom topics you may be able to skip the need of a computer and send straight from ESP32 to venus os.


The github link for installing custom driver has most of this information but if you get stuck on any step just shout. I've got an example of this running on my setup however it's for a tank sensor rather than energy meter but the concept is the same.


PS you may got more responses if you move this to Modifications section of forum.

0 Likes 0 ·
arvid avatar image
arvid answered ·

Thanks to matt1309 for showing how this can be done in a way I understand.
There is still so much uncertainty for me in the implementation that I have decided to wait six months. I hope that in the course of this there will be more finished solutions to the problem of reading data from the HAN port on the electric meter (Aidon 6525) into Cerbo GX to be able to realize Dynamic ESS.
See also the same topic under Modifications, Ideas

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.