-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<CR><LF> missing in the encrypt-message.js (and thus also in decrypt-message.js and p1-message.txt) #47
Comments
Hi @Jeroen88, care to send a PR? I though these details came straight from an actual meter. Just made the examples for others to start experimenting with the decrypting (which is now also build into esphome) |
Hi Stephan, I am experimenting with decrypting too, that is why your example was a good test case. I am not a TypeScript programmer, cpp is my language. The solution is just adding an extra Here are the first hex bytes of the decrypt-message.js, taken from your
As you can see the I am looking for some real data, from a real encrypted meter. I can find encrypted data online but without the associated key. Do you happen to have a real example? I would love to test my decryption with it! |
@Jeroen88 you should see the decrypting and the parsing as two separate processes. I developed this on a mac, hence the error with the line endings. This message should decrypt correctly (since you got a DSMR message out of it). You can also use the sample code provided to encrypt a DSMR with the line endings you want. Or why not make the parsing code just ignore the incorrect line endings? Possibilities are endless. In my code found here all DSMR messages are parsed line by line (appending I can also help you creating a correctly encrypted message, so you can test your decryption? |
Here in encrypt-message.js a
<CR><LF>
is missing in the example. Page 16 paragraph 6.2 of DSMR 5.02 P1 companion standard clearly states that the<CR><LF>
after the CRC is part of the telegram. Not a big deal, but if somebody (like me :)) tries to decrypt and parse the result it fails because of the missing<CR><LF>
at the end.The text was updated successfully, but these errors were encountered: