u9n / dlms-cosem

A Python library for DLMS/COSEM
Other
79 stars 39 forks source link

Example just reading from Norwegian HAN wanted #56

Closed b1r63r closed 1 year ago

b1r63r commented 2 years ago

I would like to see a simple example that just reads hdlc from serial port. I see there is already an example for parsing norwegian han. I would like to actually read from such a meter. It does not seem to need any setup, it sends data without any negotiations.

Krolken commented 2 years ago

Reading from the Norwegian HAN-port is not really in scope for this library. But parsing the data is.

Some of it is described in our project: hanporten.se, https://github.com/u9n/hanporten/

This library handles the complete HDLC connection and DLMS connections state. This is to be able to do anything with a meter via the "normal" interface.

Reading the customer interface would just need a simple loop since it just pushes data. It is described here: https://hanporten.se/norska/protokollet/#las-ut-datan

Also not that you would need an converter for the Mbus electrical interface.

b1r63r commented 2 years ago

I already have the mbus converter hooked up to a pi zero w. I can read data from the meter. I have found some projects with code, but they seem unmaintained. This project seems to be alive, so I was hoping to make use of it.

Krolken commented 2 years ago

Ok. So what data are you able to read out from the meter? And what do you need help with? Parsing the data? Is there anything in the example that is not clear?

Krolken commented 1 year ago

Closing due to inactivity.