I hope to reach a more stable, but also more accessible device through ESPhome, which has better logging possibilities and is better manageable from remote.
If the schematic is not open, I will try to design one myself. Anyone else who did this?
I hope to reach a more stable, but also more accessible device through ESPhome, which has better logging possibilities and is better manageable from remote.
If the schematic is not open, I will try to design one myself. Anyone else who did this?
How do you think it will differ from the one you have?
I guess it needs a hardware invert of Rx, as the ESPHome solution does not support the software invert that is used now.
Have a look at GitHub - mmakaay/esphome-smartmeter: An ESPHome smartmeter project (hardware + ESPHome config)
Thanks! Very interesting!
I am currently working on a new revision of the board, mainly because me and Jos found some differences in the power supply side of things between DMSR v4 and DSMR v5. This is already reflected in the documentation on my GitHub repo, telling that you should not add the 1000 uF capacitor when using DSMR v5.
My new board design has a jumper that enables or disable the 1000 uF capacitor. That would allow a simple upgrade path when a v4 meter is replaced with a v5 meter.
There were some more changes. The current design status of the board looks like this:
The implemented changes so far are:
After even more tweaking, I now have the following design:
With support from @mmakaay I have now a working standalone (no external power needed!) unit to read my smartmeter (DSMR 4.2). Thanks a lot!
Hello,
i need help to make my dsmr reader work, i make @mmakaay project
my smart reader is a belgium with dsmr 5, so i don’t soldering all the components (capacitor 1000uF and jumper dsmr4)
d1 mini is connected over my network but all entities is unknow, and i change setup on esphome file for belgium smart meter
Hey. The best point to start, is enabling the UART debugger to see if the device is able to read the serial data stream from the P1 port. The most useful debug output in your case, is string output, since your meter doesn’t use encrypted telegrams. You can set this up by adding the following debug config to your uart:
configuration in the device YAML file:
uart:
debug:
direction: RX
after:
delimiter: "\r\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
thanks for your help, ok try this tomorow
so on my esphome yaml i have:
uart:
rx_pin: D7
baud_rate: 115200
rx_buffer_size: 1500
debug:
direction: RX
after:
delimiter: "\r\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
Hello,
i add you code to esphome yaml dans i have nothing
reader is connected but no information
Can you post your complete yaml config and maybe some pictures of your device, (bottom & top). Also did you check your cable between meter and device (RJ12 straight connections)?
Here you have some pictures
and my yaml
substitutions:
name: dsmr-reader
friendly_name: DSMR Reader
esphome:
name: dsmr
platform: ESP8266
board: d1_mini
# Enable Home Assistant API
api:
password: "xxx"
ota:
password: "xxx"
wifi:
ssid: xxx
password: xxx
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dsmr Fallback Hotspot"
password: "xxx"
captive_portal:
logger:
# Serial logging is disabled by setting the logger baud rate to 0.
# Otherwise the logger will occupy the hardware UART, making it unavailable
# for receiving smart meter data on pin D7 (GPIO13).
baud_rate: 0
level: VERBOSE
uart:
rx_pin: D7
baud_rate: 115200
rx_buffer_size: 1500
debug:
direction: RX
after:
delimiter: "\r\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
dsmr:
sensor:
- platform: dsmr
energy_delivered_tariff1:
name: ${friendly_name} Energy Delivered Tariff 1
state_class: total_increasing
energy_delivered_tariff2:
name: ${friendly_name} Energy Delivered Tariff 2
state_class: total_increasing
energy_returned_tariff1:
name: ${friendly_name} Energy Returned Tariff 1
energy_returned_tariff2:
name: ${friendly_name} Energy Returned Tariff 2
power_delivered:
name: ${friendly_name} Power Consumed
power_returned:
name: ${friendly_name} Power Returned
electricity_failures:
name: ${friendly_name} Electricity Failures
electricity_long_failures:
name: ${friendly_name} Electricity Long Failures
voltage_l1:
name: ${friendly_name} Voltage L1
voltage_l2:
name: ${friendly_name} Voltage L2
voltage_l3:
name: ${friendly_name} Voltage L3
current_l1:
name: ${friendly_name} Current L1
current_l2:
name: ${friendly_name} Current L2
current_l3:
name: ${friendly_name} Current L3
power_delivered_l1:
name: ${friendly_name} Power Delivered L1
power_delivered_l2:
name: ${friendly_name} Power Delivered L2
power_delivered_l3:
name: ${friendly_name} Power Delivered L3
power_returned_l1:
name: ${friendly_name} Power Returned L1
power_returned_l2:
name: ${friendly_name} Power Returned L2
power_returned_l3:
name: ${friendly_name} Power Returned L3
gas_delivered_be:
name: ${friendly_name} Gas Delivered BE
text_sensor:
- platform: dsmr
identification:
name: ${friendly_name} Identification
p1_version_be:
name: ${friendly_name} Version BE
i test my rj12 with a electric tester and work fine
The latest version of @mmakaay DSMR reader design (which you are using) uses a request_pin
to trigger the reading from the P1-port. So please enter the follow two lines just under de dsmr:
tag and before the sensor:
tag
request_pin: D5
request_interval: 15s
so it looks like:
dsmr:
request_pin: D5
request_interval: 15s
sensor:
- platform: dsmr
energy_delivered_tariff1:
name: ${friendly_name} Energy Delivered Tariff 1
state_class: total_increasing
These two lines are missing in his example.yaml on github. The 15s is the interval I’m using on my device, of course you can enter your interval instead.
Furthermore, if you are using a DSMR v5, remove the jumper labeled DSMR4
. Using the capacitor on a v5 version can trigger a reboot loop. (brownout situation during setup).
Yes, @jsuanet is right. The request_pin
is required for this version of the board. Without setting the pin, the firmware will never activate the pin, resulting in the device never requesting data from the P1 port.
I updated the example.yaml
in the repository to include the pin config.
I just managed to get Marcel’s SlimmeLezer+ up and running.
Is there a way to display instantaneous power as well (Opposed to just line voltage/current)?
Hello, i make smart reader for a friend (mine work like a charm) but i have a error on logs
[21:18:09][E][dsmr:265]: 0-0:96.1.4(202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020)
^
Invalid string length
i found same error on github with solution but don’t work for him
esphome:
platformio_options:
lib_deps: glmnet/[email protected]
lib_ignore: glmnet/[email protected]
maybee you have another solution
thanks for your help