ā¦aktuell wird die Abnahme des Prototyps-0 abgeschlossen. Darauf aufbauend, beginnt mit Februar die Umsetzung des serienreifen Prototyps. Wir gehen davon aus, dass die Abnahme April/Mai durchgefĆ¼hrt wird. Parallel lƤuft schon die Beschaffung der Bauteile fĆ¼r das erste Kontingent. Hier sind wir aktuell stark von den Lieferzeiten der Hersteller abhƤngig.
Zusammengefasst: Die ersten Adapter liegen wahrscheinlich vor Mitte des Jahres nicht vor. ā¦
Hi @mwildbolz ,
Just a remark to your additional information.
I am at EVN in lower Austria and having a Kaifa smartmeter where the M-Bus is seald, so just the P1 to use.
So it seams they are having different smartmeter in different areas, also within lower Austria.
Is there a plan to implement the possibility to add the additional 2nd encryption key in the configuration?
At the moment Iām using a workaround and implementing this via an MQTT gateway. Itās working, but itās not a nice solution, especially because there is an openHAB binding existingā¦
Do you have any information on how the encryption with 2 keys works? At the moment I have no plans to add it as I donāt know how I should implement it. If you can provide me with the information on how these keys are used I can see if this is possible to add to the binding.
The default key seems to just work, if only 1 key is given by the energy supplier (like e.g. in the Netherlands)!
Afterwards Iām transferring the data to MQTT via the project DSMR2MQTT
If itās possible to add the 2nd encryption key also somewhere in this binding, then I think a communication directly from openhab would be possibleā¦
That was the information about the 2nd key I was looking for. Thanks. This seems fairly easy to add. Iāll add this to the binding and will provide a jar for you to test in the near future. What version of openHAB are you running?
Yeah, data transfer is running (E-Netze Steiermark SAGEMCOM SmartMeter via P1 port).
But at the moment via a workaround (with smarty_dsmr_proxy and DSMR2MQTT) and not directly with the openHAB addOn. You can contact me directly if you need additional information!
But as for as I see, we should get it to work with the openHAB Addon in the near futureā¦
Iāve build a kar file with the an extra configuration parameter additionalKey. If you had the smarty bridge thing created via the UI you need to recreate it to see the new parameter. Kar files are very version specific. Iāve built the kar file for openHAB 3.3.0 core (based on openHAB 3.4.0-SNAPSHOT add-ons code), and expect it to only work for 3.3.0: Release DSMR 3.3.0 updated version Ā· Hilbrand/openhab-addons Ā· GitHub Just drop the file in the addons directory and it should be seen by openHAB. It could be it doesnāt show up in installed bindings, but you should be able to add a bridge/thing in discovery.
I saw in your commit that you used different spellings of additionalKey. Maybe this is the problem?
In the configuration you write additionalnKey (github link), later additionallKey (github link) and so on?!?
Error message in the log:
[WARN ] [.dsmr.internal.device.SmartyDecrypter] - Decrypting smarty telegram failed:
javax.crypto.AEADBadTagException: Tag mismatch!
at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:623) ~[?:?]
at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116) ~[?:?]
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053) ~[?:?]
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853) ~[?:?]
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) ~[?:?]
at javax.crypto.Cipher.doFinal(Cipher.java:2260) ~[?:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.decrypt(SmartyDecrypter.java:216) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.processCompleted(SmartyDecrypter.java:193) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.parse(SmartyDecrypter.java:106) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:75) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:317) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:276) [bundleFile:?]
at org.openhab.core.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:82) [bundleFile:?]
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:834) ~[bundleFile:5.2.1.OH1]
at gnu.io.RXTXPort.eventLoop(Native Method) [bundleFile:5.2.1.OH1]
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:108) [bundleFile:5.2.1.OH1]
2022-09-05 21:21:38.555 [WARN ] [dsmr.internal.device.SmartyDecrypter] - Decrypting smarty telegram failed:
javax.crypto.AEADBadTagException: Tag mismatch!
at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:623) ~[?:?]
at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1116) ~[?:?]
at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1053) ~[?:?]
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853) ~[?:?]
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) ~[?:?]
at javax.crypto.Cipher.doFinal(Cipher.java:2260) ~[?:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.decrypt(SmartyDecrypter.java:216) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.processCompleted(SmartyDecrypter.java:193) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.SmartyDecrypter.parse(SmartyDecrypter.java:106) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.DSMRTelegramListener.handleData(DSMRTelegramListener.java:75) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRBaseConnector.handleDataAvailable(DSMRBaseConnector.java:116) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.handleDataAvailable(DSMRSerialConnector.java:317) [bundleFile:?]
at org.openhab.binding.dsmr.internal.device.connector.DSMRSerialConnector.serialEvent(DSMRSerialConnector.java:276) [bundleFile:?]
at org.openhab.core.io.transport.serial.rxtx.RxTxSerialPort$1.serialEvent(RxTxSerialPort.java:82) [bundleFile:?]
at gnu.io.RXTXPort.sendEvent(RXTXPort.java:834) ~[bundleFile:5.2.1.OH1]
at gnu.io.RXTXPort.eventLoop(Native Method) [bundleFile:5.2.1.OH1]
at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:108) [bundleFile:5.2.1.OH1]
I currently start the python script with following command-line, if this helps:
/smarty_dsmr_proxy/decrypt.py E7E235650CCE6A383ED4849C9E087D16 -a A54FFB0357D0EF0A13A11A8209BC4695 --serial-input-port=/dev/ttyUSB0 --serial-output-port=/dev/pts/1
As a followup, the DSMR binding update to add support for a 2nd key as mentioned above has been updated and confirmed by @mwildbolz to work with 2 keys.