Custom Component for ESP Home to support the IM350 (Smart Meter from a local provider in Austria/Carinthia.)
From the provider i didn't get detailed instructions how i get the information from the customer interface or how i decrypt it, so i researched a lot and here are all information's i found for the device, i hope this will help other people who try to get the data from their smart meters.
The easiest solution to translate and decrypt the data is to use a device which supports python (raspberry for example) and then use the python library: https://github.com/Gurux/Gurux.DLMS.Python
But i wanted a solution which could run on an ESP and a ESPHome Integration.
see esp_home folder.
Two example files in python to translate the message from the meter.
see standalone_version folder for more information.
This sources have helped a lot to get this working.
For this Smart Meter you need a external Power source, other devices/models don't need that - if you have another device please ask your power network provider for a pinout diagram or documentation.
For powering up the device 3.3v from the ESP is enough! Pin 1/6 is for the internal power supply. Pin 2 is the data request pin this one also needs 3.3v/5v. Pin 5 sends out the data - you need a pull up resistor (i'm using a 10k resistor) here and a transistor for inverting the signal.
Basically i used this diagram (but with another esp32 board az-delivery ESP32 D1 Mini NodeMCU)
Source: (https://github.com/saghonfly/shrdzm/raw/dev/hardware/IM350_2.png)
Messages are encrypted with AES128-GCM.
Each meter has its own 16 byte encryption key. Ask your provider for the key.
For decryption you need: