ndokter / dsmr_parser

Library to parse Dutch Smart Meter Requirements (DSMR) telegrams.
MIT License
110 stars 64 forks source link

add encrytion_key and authentication_key functionallity for a protocol client #146

Open skrutzler opened 7 months ago

skrutzler commented 7 months ago

The current implementation is only allowing the parser object to use a encryption and authentication key.

With this pull request it should now also be possible to use those keys when only the client is used by a application.

Following that changes I plan to add the functionality in the home-assistant dsmr plugin https://github.com/home-assistant/core/tree/dev/homeassistant/components/dsmr

dupondje commented 7 months ago

Hi,

Thanks for your PR. You are still working on this as its still a draft. Is it eventually possible to add a test with the encrypted data/telegram, and have it parsed? This way we can test the decryption also.

Let me know when it can be reviewed :)

skrutzler commented 7 months ago

Hello,

yeah the PR is not ready yet. I was under the impression that the serial read was done for a full frame but apparently we read differently and that is not working out for decrypting telegrams which needs to have the full frame read (511bytes in my case) and then decrypt it. I currently do not have much spare time to work on that but see if I can play around a bit more in the near future.