From 7a38ec5d1a0f9cc5e07a39c5cff96d67e998e5d2 Mon Sep 17 00:00:00 2001 From: Bram van Deventer Date: Thu, 15 Jul 2021 20:58:41 +0200 Subject: [PATCH 1/2] Remove high / low tariffs - Use tariff 1 and 2 instead of high / low - Update README about NL and BE tariff differences. - Fix typo's --- README.md | 32 +++++++++++++++++++++++--------- esp8266-dsmr.ino | 10 +++++----- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1408d21..9429bd9 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,13 @@ # esp8266-dsmr -A ESP8266 based DSMR reader, posting onto MQTT, powered directly from the meter itself, no external power supply needed. +A ESP8266 based DSMR reader, posting messages onto MQTT.
+Can be powered directly from the meter itself, no external power supply needed*.
+* if enough power can be supplied by the meter. -The code should work on DSRM v2.2 and higher, only tested on V4.2. +The code should work on DSRM v2.2 and higher, only tested on V4.2.
+Supports Dutch and Belgian smart meters.
+## Board in action ![esp8266-dsmr](/docs/PCB_IRL.png "esp8266-dsmr") ## Requirements @@ -18,24 +22,24 @@ The code should work on DSRM v2.2 and higher, only tested on V4.2. - [PubSubClient](https://pubsubclient.knolleary.net) - MQTT client - [Core for ESP8266](https://github.com/esp8266/Arduino) - Arduino core for ESP8266 WiFi chip -## Supported messages +## Messages ### Info | Name | unit | DSMR code | MQTT topic | |:---- |:-------|:------ |:------| | DSMR version | - | 1-3:0.2.8 | /version | -| Status | online, offline | - | /status | +| Status | online | - | /status | ### Power | Name | unit | DSMR code | MQTT topic | |:---- |:-------|:------ |:------| | current power consumption | kW | 1-0:1.7.0 | /power/consumption | | current power production | kW | 1-0:2.7.0 | /power/production | -| total consumption low | kWh | 1-0:1.8.1 | /power/total_consumption_low | -| total consumption high | kWh | 1-0:1.8.2 | /power/total_consumption_high | -| total production low | kWh | 1-0:2.8.1 | /power/total_production_low | -| total production high | kWh | 1-0:2.8.2 | /power/total_production_high | -| power tariff | 1 = low, 2 = high | 0-0:96.14.0 | /power/power_tariff | +| total consumption tariff 1 | kWh | 1-0:1.8.1 | /power/total_consumption_tariff_1 | +| total consumption tariff 2 | kWh | 1-0:1.8.2 | /power/total_consumption_tariff_2 | +| total production tariff 1 | kWh | 1-0:2.8.1 | /power/total_production_tariff_1 | +| total production tariff 2 | kWh | 1-0:2.8.2 | /power/total_production_tariff_2 | +| power tariff | [See tariffs](#tariffs) | 0-0:96.14.0 | /power/power_tariff | | short power outages | - | 0-0:96.7.21 |/power/short_power_outages | | long power outages | - | 0-0:96.7.9 |/power/long_power_outages | | instant current phase 1 | A | 1-0:31.7.0 |/power/phase_1/current | @@ -63,6 +67,16 @@ The code should work on DSRM v2.2 and higher, only tested on V4.2. | timestamp| - | 0-1:24.2.1| /gas/timestamp | | device id | - | 0-1:96.1.0 | /gas/device | +## Tariffs +The meter has a power tariff property, and is used for the total consumption/production counters.
+The values for the day and night tariffs are different in the Netherlands compared to Belgium. +| Country | tariff | value | +|:---- |:---- |:---- | +| NL | Night (low) | tariff_1 | +| NL | Day (high) | tariff_2 | +| BE | Night (low) |tariff_2 | +| BE | Day (high)| tariff_1 | + ## Settings Copy `Settings.example.h` to `Settings.h` and fill in the correct data. diff --git a/esp8266-dsmr.ino b/esp8266-dsmr.ino index 4eb273a..2b146ff 100644 --- a/esp8266-dsmr.ino +++ b/esp8266-dsmr.ino @@ -31,10 +31,10 @@ const Measurement measurements[] = { {"power/device_id", "0-0:96.1.1", 11, 45, Measurement::STRING}, {"power/consuption", "1-0:1.7.0", 10, 16, Measurement::FLOAT}, {"power/production", "1-0:2.7.0", 10, 16, Measurement::FLOAT}, - {"power/total_consuption_low", "1-0:1.8.1", 10, 20, Measurement::FLOAT}, - {"power/total_consuption_high", "1-0:1.8.2", 10, 20, Measurement::FLOAT}, - {"power/total_production_low", "1-0:2.8.1", 10, 20, Measurement::FLOAT}, - {"power/total_production_high", "1-0:2.8.2", 10, 20, Measurement::FLOAT}, + {"power/total_consuption_tariff_1", "1-0:1.8.1", 10, 20, Measurement::FLOAT}, + {"power/total_consuption_tariff_2", "1-0:1.8.2", 10, 20, Measurement::FLOAT}, + {"power/total_production_tariff_1", "1-0:2.8.1", 10, 20, Measurement::FLOAT}, + {"power/total_production_tariff_2", "1-0:2.8.2", 10, 20, Measurement::FLOAT}, {"power/power_tariff", "0-0:96.14.0", 12, 16, Measurement::INT}, {"power/short_power_outages", "0-0:96.7.21", 12, 17, Measurement::INT}, {"power/long_power_outages", "0-0:96.7.9", 11, 16, Measurement::INT}, @@ -92,7 +92,7 @@ void setup() ArduinoOTA.setHostname(WIFI_HOSTNAME); ArduinoOTA.begin(); - logger.info("Setup complte"); + logger.info("Setup complete"); } void loop() From 7b28163d1f972c487c1e158de0e50ada27e0ef78 Mon Sep 17 00:00:00 2001 From: Bram van Deventer Date: Thu, 15 Jul 2021 21:08:17 +0200 Subject: [PATCH 2/2] Adding Missing properties to Readme Adding some text to the readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1408d21..6c6fa1d 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,9 @@ Connecting to the DSMR with a RJ11/12/25 (6p6c or 6p4c) cable plugged into the P `* 1 and 6 are not needed if powered by USB.` -## Known issues +# Known issues - Some DSMR cannot deliver enough power to run the Wemos stably.
Connect a 5V usb supply to fix this. + +# Missing properties? +Are you missing a property? don't be afraid to open a [issue](https://github.com/bram2202/esp8266-dsmr/issues), or contribute to this repo yourself!