I am providing Smart Homes to my customers and want to have the ability to get data from encrypted Smart Meters.
The local energy distributor uses Landys+Gyr E450 Smart Meters and they are pushing the data on the IR-Connection every 5 seconds. So I "only" need some App that uses the serial interface of the Raspberry Pi, receives, decrypts and converts the data to json or xml format.
Everything else I am familiar with. I have basic knowledge on programming, webserver, etc.. so everything else would be no problem. Maybe a code snipped of the decrypting algorithm could help me to make it work, but I am lost in your sources and can't find the right part.
A simple subroutine, maybe decrypt_dlms(inputdata_raw) {... return xml} would help me very much.
Sorry to say, but DLMS is not simple protocol. It helps if you are only receiving Push messages.
Read bytes from the serial port. Use GXDLMSTranslator.FindNextFrame to check have you received all the bytes in the frame. When you have bytes you can use
GXDLMSTranslator.PduToXml to convert bytes to XML.
InterfaceType what is you are using is HDLC. I hope that messages are not ciphered (encrypted).
Hello,
data received from Smart Meter is encrypted (got Authentication Key and Encyrption Key each 256bit long).
The data is pushed out of Smart Meter every 5 seconds, so there would not be a need to check if all is received, would do this in my routine for example: data complete when there is no new data for >1 second.
But what to do with the data after that... I don't know why they are using such an complex protocol. My old Smart Meter pushes the data unencrypted and that's all good...
So there is no chance for building a simple App or subroutine? That's sad...
Simple App for RaspberryPi
Hi,
Sorry to say, but DLMS is not simple protocol. It helps if you are only receiving Push messages.
Read bytes from the serial port. Use GXDLMSTranslator.FindNextFrame to check have you received all the bytes in the frame. When you have bytes you can use
GXDLMSTranslator.PduToXml to convert bytes to XML.
InterfaceType what is you are using is HDLC. I hope that messages are not ciphered (encrypted).
BR,
Mikko
Hello,
Hello,
data received from Smart Meter is encrypted (got Authentication Key and Encyrption Key each 256bit long).
The data is pushed out of Smart Meter every 5 seconds, so there would not be a need to check if all is received, would do this in my routine for example: data complete when there is no new data for >1 second.
But what to do with the data after that... I don't know why they are using such an complex protocol. My old Smart Meter pushes the data unencrypted and that's all good...
So there is no chance for building a simple App or subroutine? That's sad...
Simple App for RaspberryPi
Hi,
You can use our open source libraries to do this. Download sources from GitHub.
You can use GXDLMSTranslator.PduToXml to convert received data to XML.
I believe it helps you to get started.
BR,
Mikko