All the electricity meters in Germany will successively be replaced  by smart meters, so mine was recently replaced too. Of course, I wanted to take t

Reading out a smart meter, using a Raspberry Pi Zero W and Python

submited by
Style Pass
2020-10-22 05:21:00

All the electricity meters in Germany will successively be replaced by smart meters, so mine was recently replaced too. Of course, I wanted to take the chance and try to read out the new smart meter and make some diagrams for different periods of time, to exactely monitor my energy consumption.

Smart meters are using the so called SML-protocol to output data via an optical interface. There is already a lot of information about the SML-protocol available on the Internet, as well as information on how to read it out and how to decode it, using different devices and languages. For using a Raspberry Pi and Python, Stefan Weigert (http://www.stefan-weigert.de/php_loader/sml.php) wrote some very nice Python Code, which I was giving a try. Unfortunately, I had some issues with it, although I have the same type of smart meter, like he has (ISKRA MT175). Stefan kindly allowed me to use his code for showing the changes I made to it, in order to make it work with my setup. Unlike Stefan, I did not build the optical sensor by myself, instead I am using one from Weidmann Elektronik (http://weidmann–elektronik.de/Produkt_IR-Kopf.html).

Actually, I thought it would be quite straight forward to get everything set up with the Raspberry Pi Zero W, that I intended to use for reading the values from the meter. I rather expected that there would be some problems with the Powerline connection that I planned for bringing the network down to the basement. Surprisingly, setting up the Powerline was not a problem at all. Connection was established easily and it works like a charm since the first day. The real problem was that the reading of the SML-messages was very unreliable. Over long periods of time, it was not possible to get some values from the meter anymore. I narrowed down the problem to the point that I could see that, when some specific devices in the apartement (e.g. the TV) were turned on, it was not possible to get some reasonable readings from the meter. I still can not clearly say, if the issue is on the side of the Raspberry Pi (respectively the sensor), or if it’s an issue of the smart meter itself, which I actually started to belive.

Leave a Comment