Optical meter reading with KNX integration

Step by step.

The digitalisation of the flat and house connection meters is progressing, but there is still the task of being able to use this metering for control and energy management. An optical interface is mostly offered by the metering point operators and energy suppliers. Some products are available to integrate these values into the KNX. But here, too, the metering point operators offer different protocols, so that there are problems of compatibility or not all the required values can be read out.

A quite flexible and also inexpensive solution is to read out via an optical sensor with a serial interface and transfer to TCP/IP in WiFi. This requires an ESP8266 radio module with TASMOTA firmware. For KNX integration, the LOGIKEDITOR of the EIBPORT or the LOGIKMODULE used.

The Main Menu

First steps for setting up the ESP8266 radio module with TASMOTA

  • First, the optical sensor is connected to the ESP module via the serial interface.
  • After that, the ESP8266 radio module can already be put into operation.
  • The TASMOTA modules are normally accessible under the IP address 192.168.4.1 in their own network.
  • Important notice: Do not carry out a firmware update!
  • Switch from the main menu to the "Configuration" menu.
  • The network connection is changed in the configuration menu under "Configure WiFi".
  • After saving the settings, the unit can be called up in its own network.

Integrate energy meter template

For the individual setting of the radio module to the desired energy meter, further steps are necessary. For this, the configuration of the energy meter templates must be downloaded from the Internet and copied. These templates can be found under https://tasmota.github.io/docs/ can be called up. In addition, further information on the TASMOTA configuration and its application can be found here.

As can be seen in the illustration, the copy templates can be found under the menu item "Features" and then "Smart Meter Interface". The templates form a general basis for your meter. Even if the device types do not fit 100%, it is possible to subsequently adapt the selected template.

Setting up the template and inserting the script into the console

  • Go to "Configuration" via the "Main Menu" and then to "Configure Template".
  • Select the template "Generic (18)" to activate the serial interface. Save the changes.
  • Return to the main menu and change to "Consoles".
  • Paste your counter's script into the Console under "Edit Script" by copying and pasting the template from the web.
  • Activate the field "Script enable"!
  • Save the settings with "Save" and the counter values are displayed in the main menu.
  • The individual lines of the script can be changed depending on the protocol description of your meter or the specifications of the metering point operator.

After these settings, the existing measured values are now available, which realise the transmission to the KNX bus with the help of a logic group. Search in the LOGIKEDITOR of the EIBPORT or LOGIKMODULE the logic group template "Energy meter OPTO coupler" and import them. Then the group addresses must be adjusted accordingly. Now the integration is complete.