This article aims to provide an overview the the different methods available to collect energy consumption data. It is divided into three sections.

  • One for interfacing existing power meters such as a main meter.
  • One for installing and collecting data from smart plugs.
  • One for reading data from web resources.

Interfacing existing power meters

Here is a list of solutions developed in the project to understand the differences and more of the background to how they work continue reading below the list.

NodeMCU S0 or LED €3 WIFI chip solution
Pros & Cons: This provides an very affordable solution for pulse counting. The solution does however need a power supply so the power meter needs to be situated fairly close to a power outlet.
Raspberry PI S0 or LED solution
Tutorial: -
Pros & Cons: With the raspberry pi you can add the databases and webbservers and visualisation to make a complete solution contained in just one hardware. With nodered you can route data and send it further.
NodeMCU DLMS/COSEM €3 WIFI chip solution
Tutorial: -
Source: Not available yet.
Pros & Cons: Reading the counter values and other parameters will enable you to get a consistent data flow even if the device resets or there is an power outage. However some power meters are looked down with a password.

Power meters can support all kinds of more or less advances protocols for communicating such as M-bus, Modbus, Machine specific RS232 connections, DLMS/COSEM , etc. The most common interface and simple interface however is the S0 protocol.


The S0 protocol basically consists of a simple pulse transmitted over either two wires or an LED on the meter. Each pulse corresponds to a certain amount of energy having being consumed.

To connect you equipment to this interface you can in other words either connect a pulse sensor to it an place it on top of the LED or you can connect it directly to the meters two connectors marked S0. In manny installations however the connectors might be accessible.

The S0 connectors on a power meter are isolated from the meter with a optocoupler.
A optocoupler is basically an LED and a phototransistor (light sensor) so in reality connecting to the S0 connectors or the LED with a phototransistor will be almost the same from an electrical point of view. There are however some differences in terms of the signal.

Most power meters will send an 80ms long pulse over the S0 connectors while the LED typically only is lit for around 4ms depending on the modell of the meter. Since one way of filtering out noise and false detections is to consider the length of the pulse this might be important to know. Also on some meters the S0 connectors might be configured with an other other pulse ratio then the LED on the same meter. E.g. the connector might be set to 100 pulses/kWh while the LED is set to 1000 pulses/kWh.

Smart plugs

In this project we have explored three different types of smart plugs. One of these is the Plugwise which utilizes Zigbee as means of communication. Another one is Fibaro which utilizes Zwave. Last of all we have also tested solutions form a company called Yanzi which uses an open source protocol called IPv6lowPAN.

In general all kinds of plugs that are not wifi based needs some form of gateway to connect to. From there the data can either be accessible locally through an api on the gateway or through an api on the a cloud server. In some cases like with the Plugwise solution there is no API but data can still be collected through a third party software.