Skip to content

tom-ch1/EnergyDataHackday2021_SmartMeter_Local_CII

Repository files navigation

Interoperability plug-test for smart meter’s local CII

Empower citizens to use their own energy data. Using the smartmeter's local interface for visualisation and automation

See Challenge.md

See also repo smartmeter-datacollector here: https://github.com/scs/smartmeter-datacollector

Goal

Provide a unified and open API for all types of Smartmeters

Idea

  1. Read different types of smart meter CII (DLMS, IDIS CII, DSMR-P1, MBUS), used by different DSO (EKZ, AEW, EWB, Romande Energie) by means of a hardware metering data adapter and publish the data "as is" to an MQTT Broker
  2. design a harmonized MQTT profile that can be used via an open visualization and automation.
  3. implement an MQTT client that subscribes to the "raw" Smartmeter topics, translate the messages to the harmonized MQTT profile and publish them to the MQTT Broker.

The customer can thus use the data for further processing, visualisation or automation. As the MQTT topics are standardized, the customer does not need to care about the type of Smartmeter or DSO, it just works!

Component Setup

Smartmeters Architecture

Results

  • We connected to all four smart meters and converted their MQTT messages into a uniform structure
  • We integrated the smart meter data into openHAB
  • We persisted the data into influx and displayed it using grafana
  • Presentation

Uniform MQTT profile

This is how the smart meters published their data:

EKZ: smartmeter/LGZ1030655933512/ACTIVE_POWER_P {"value": 1, "timestamp": 1629055611}
Romande Energie: tele/gPlug11/SENSOR {"Time":"2021-09-24T17:56:38","z":{"Pi":0}}
AEW: smartmeter/12345/ACTIVE_POWER_P {"value": 42.0, "timestamp": 1632499152}
EWB:  tele/gPlug10/SENSOR {"Time":"2021-09-24T17:03:45","z":{"Pi":12}}

And this is how our transformer script converted the data:

EKZ: smartmeter/<id od EKZ smart meter>/power/power_in {"timestamp": 1629055611, "value": 1}
Romande Energie: smartmeter/<id of Romande Energie smart meter>/power/power_in {"timestamp": 1632498998,"value": 0 }
AEW: smartmeter/<id od AEW smart meter>/power/power_in {"timestamp": 1632499152, "value": 42 }
EWB: smartmeter/<id od EWB smart meter>/power/power_in {"timestamp": 1632495825,"value": 12}

Visualisation with Grafana

grafana

Integration into openHAB

openhab

Smartmeters and Adapters

EKZ

  • Brand: Landis+Gyr
  • Model: E450
  • Interface: MBUS
  • Adapter: MBUS adapter
  • Protocol: DLMS/COSEM
  • Configuration:
    • The MBUS to USB Adapter connects the Smartmeter to a Raspberry Pi
    • On the Raspberry Pi, the smartmeter-datacollector software retrieves data from the smart meter and publishes them to the mosquitto MQTT Broker that runs on the NUC.
    • smartmeter-datacollector depends on the gurux library for reading DLMS Data from the smart meter.

AEW

  • Brand: Landis+Gyr
  • Model: E450
  • Interface: MBUS
  • Adapter: MBUS adapter
  • Protocol: DLMS/COSEM
  • Configuration:
    • The MBUS-TTL-USB Adapter connects the Smartmeter to the NUC
    • On the NUC, the smartmeter-datacollector software was installed to retrieve data from the smart meter and publishe them to the mosquitto MQTT Broker. smartmeter-datacollector depends on the gurux library for reading DLMS Data from the smart meter.

ewb

Romande Energie

  • Brand: ISKRA
  • Model: AM550
  • Interface: DSMR P1
  • Adapter: DSMR P1 to WLAN gPlug-Adapter
  • Protocol: DSMR
  • Configuration:
    • the gPlug-Adapter reads the meter data and publishes it to an MQTT Broker (see below)
  • The gPlug-Adapter is comprised of a voltage conversion circuit board and an ESP8266 flashed with Tasmota firmware
  • some assembly required (not shown here)
  • plug it into the smart meter P1 port
  • connect to the WiFi access point that it makes (SSID: Tasmota....XXXX)
  • in the configuration page (that pops up) configure access to your home WiFi
  • 'save' and it reboots
  • connect to the "new" IP on your home WiFi (http:///) to access the Tasmota configuration page
  • configure the MQTT host and topic and other Tasmota options
  • 'save'
  • More Information about DSMR P1 Adapter devices:

MBUS adapter

We used two types of MBUS adapters:

  • install ubuntu
  • install smartmeter-datacollector debian package
    • apply a patch to adapt smartmeter-datacollector to the AEW smart meter:
      • replace missing timestamp with the local time
      • replace missing device ID with a fake ID (12345)
  • create a user for mqtt (password: hackday)
mosquitto_passwd -c /etc/mosquitto/pwfile hackday
  • add a listener to /etc/mosquitto/:
allow_anonymous true
listener 1883
password_file /etc/mosquitto/pwfile
  • no credentials are needed, but you can use hackday/hackday if you like

you can use the commandline client on the nuc: mosquitto_sub (subscribe) or mosquitto_pub (for publishing) for instance:

mosquitto_sub -h localhost -t "#"
mosquitto_pub -h localhost -t "<your favorite topic>" -m "<your message>" (edited) 

Team

Team Peter Kreutzer, Derrick Oswald, Jonas Matt, Herrmann Hueni, Jordi Campos, Angelos Selviaridis, Thomas Strösslin

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages