Smart Meter Toolkit
According to the Electricity Supply Ordinance, the grid operator must enable the end customer to receive real-time measurement data from the smart meter. The Smart Meter Toolkit is a lean open source solution.
-
Initial situation
Smart meters typically upload the measured values to the grid operator once a day. This is usually insufficient for the use of home automation applications or the precise analysis of electricity consumption. However, according to the Electricity Supply Ordinance, the grid operator must enable the end customer to read the real-time measurement data from the smart meter.
-
SCS solution
SCS developed a lean and easily expandable open source solution in Python for EKZ that can be operated on a Raspberry Pi. The measurement data is sent to the toolkit via a customer interface on the meter, which converts it into the widely used MQTT protocol and forwards it.
-
Added value
The open source aspect enables the further development of the software by the community. SCS maintains contact with interested parties and contributors and manages the project on Github.
Project insights
By 2027, distribution grid operators are obliged to equip 80% of households in Switzerland with smart meters. This automatically uploads the metering data to the grid operator – typically once a day. End customers can view this data retrospectively via a web interface. However, this is not sufficient for analysing the metering data in more detail or even integrating it into the home automation system. However, end consumers can read the metering data locally via a customer interface on the smart meter. This allows the current electricity consumption to be recorded in real time and with a resolution of 5-30 seconds.
Local interface
Unfortunately, the “Consumer Information Interface” (CII for short) does not use a protocol for data transmission that shows the measured values in an easily understandable form. The meters usually use the DLMS/COSEM standard, which is used via the High-Level Data Link Control (HDLC) network protocol. Depending on the meter model, the M-Bus or DSMR-P1 standard is used for the physical layer. In addition, the measurement samples are often encrypted and transmitted in fragmented form for data protection reasons. This means that although smart meter manufacturers comply with international standards, the question remains for network operators as to how customers can receive the measurement data “in a comprehensible form” in accordance with the ordinance.

Read out via Raspberry Pi
SCS developed a lean solution using a Raspberry Pi and open source software to read the data and process it in an understandable way. The parsed meter data is forwarded via MQTT – a simple, lightweight, publish-subscribe based network protocol that is often used in the home automation sector. It offers the flexibility to reuse the data both on the network and locally on the device where the meter data is received.
Multiple data sources and sinks
In the core application, the data collector, one or more smart meter readers can be instantiated as data sources and one or more data sinks. In order to be able to forward the measurement data within the application without coupling the data sources and sinks too strongly with each other, the observer pattern was used. This fits in well with the asynchronous approach on which the application is based. This keeps the CPU load low.
Published via Github
The Data Collector software is hosted on Github: As a Python package index (PyPi) or as a ready-made Raspberry Pi demo image that can be flashed directly onto an SD card(https://github.com/scs/smartmeter-datacollector). With just a few configuration steps via a local web interface of the Raspberry Pi, it is possible to visualise the measurement data via Grafana. Furthermore, in this demo the data is recorded via InfluxDB so that it can be displayed retrospectively over a few months. All of this takes place locally on the Raspberry Pi – no consumer data is sent to the cloud.

Integrate into home automation
Ambitious end users who want to integrate their smart meter measurement data into home automation have the option of linking the Data Collector software directly to an external MQTT broker. As it is developed in Python, it is also possible to run the software on a different Linux platform instead of a Raspberry Pi. This makes the software very flexible to use.
Further information can be found in the detailed technical article on the Smart Meter Toolkit in Bulletin 1/2024 from Electrosuisse.
