First of all you need is a eHZ (Elektronischer Haushaltszähler) and an IrDA USB dongle like described [here](https://wiki.volkszaehler.org/hardware/controllers/ir-schreib-lesekopf). I got mine from Udo ([Volkszaehler](http://volkszaehler.org)) some time ago but it looks like he is not directly selling these anymore. What I found is [this link](https://s.sebald.com/flmui) to a shop selling the same dongles on Amazon. If your eHZ is not next to your openHAB device you might want to extend the USB cable using a [USB over LAN extender](https://s.sebald.com/dzsc7), which works pretty good for me.
I used several information from the openHAB community, mainly from [this topic](https://community.openhab.org/t/using-a-power-meter-sml-with-openhab/21923/1).
You need to get, modify and compile [libsml](https://github.com/dailab/libsml) from Github liked described [here](https://community.openhab.org/t/using-a-power-meter-sml-with-openhab/21923/1). I included my version of sml_server.c here as it differs a bit.
* **sml.items**: Put this file into your */etc/openhab2/items*.
* **sml.rules**: Put this file into your */etc/openhab2/rules* directory and modify it for your specific setup. In my case the compiled sml_server is in */home/openhabian/src/libsml/examples*. You also might need to adjust the device name, in my case it is: */dev/ttyUSB0*