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
Provide a unified and open API for all types of Smartmeters
- 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
- design a harmonized MQTT profile that can be used via an open visualization and automation.
- 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!
Smartmeters | Architecture |
---|---|
- 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
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}
- 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.
- 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.
- Brand: Semax Honeywell Elster
- Model: AS3000 mit AM540 Kommunikationsmodul
- Interface: DSMR P1
- Adapter: DSMR P1 to WLAN gPlug-Adapter
- Protocol: DSMR
- Configuration:
- the gPlug-Adapter reads the smart meter data and publishes it to an MQTT Broker (see below)
- 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)
- install the smartmeter-datacollector image
- Setup MQTT Bridge to transfer the messages to our main MQTT Broker on the NUC
- 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:
We used two types of MBUS adapters:
- for EKZ: MBUS to USB adapter
- for AEW: MBUS to TTL adapter and an USB to TTL/CMOS serial converter (e.g. FTDI FT232 or Prolific PL2303). Be sure that this converter does not contain a RS232 voltage converter (e.g. MAX232). More information about MBUS adapters:
- esphome-dlms-meter, combines an m-bus-slave-click UART adapter and an ESP32
- MBUS to TTL / USB schematics
- M-Bus-TTL (USB/RS232) Converter
- 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)
- apply a patch to adapt smartmeter-datacollector to the AEW smart meter:
- 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)
Peter Kreutzer, Derrick Oswald, Jonas Matt, Herrmann Hueni, Jordi Campos, Angelos Selviaridis, Thomas Strösslin