Yes, that’s the problem.
FYI: My smart meter (different vendor) has the following problem: It forgets the INF configuration when there is a power outage. So I always have to reconfigure…
Yes, that’s the problem.
FYI: My smart meter (different vendor) has the following problem: It forgets the INF configuration when there is a power outage. So I always have to reconfigure…
Hello mampfes,
thanks for your help.
i will check about the blackouts there.
I already know the the entered pin stays active after blackout.
Give me some days and I will be safe to say what is possible and what not
Dear all,
thx for this nice component - unfortunately it does not work for me
Hope you could help me: No matter what I do, I always get
"[22:30:00][D][obis_d0:152]: abort"
in the logger. I tried different things, but apparently the data is not comming through. Using NodeMCUv2 (ESP 8266) with the exact example as given by judges.
Any idea where I should be looking at?
Update: Found that my meter uses SML and code 1_8D_0P_N_1S
for serial coms.
Meter name: ebz dd3 2r06 dta smz1
How do I activate that in the above example? Thx!
Update 2: The link provided by mampfes in the post below was helpful (THX!) - now the IR readout works without problems.
Further reference: https://www.mittelstedt.net/?tag=esphome (german website)
Thx!
@Ole_North This component only supports D0 based meters. For SML, please use this component: SML (Smart Message Language) — ESPHome
Has anyone tried to use this on a tasmota based device like the Hichi IR or ESPLesekopf?
Scary, is there something pre build that you can just flash over tasmota?
ESPHome is using a different approach than Tasmota: ESPHome doesn’t a provide pre-build binary, but let you build your own application based on your needs. Therefore, please get familiar with ESPHome.
Hi guys,
I am also trying to read the energy from my energy meter with an ESP01. I have an ACE3000 type 260.
My configuration:
uart:
id: uart_bus
tx_pin: 1
rx_pin: 3
baud_rate: 300
data_bits: 7
parity: EVEN
stop_bits: 1
obis_d0:
id: mysml
uart_id: uart_bus
optimize_size: true
on_telegram:
then:
- logger.log: "telegram received"
sensor:
- platform: obis_d0
name: "PV-Energie"
obis_d0_id: mysml
obis_code: "1-0:1.8.0*255"
unit_of_measurement: kWh
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{8}\\*kWh"
interval:
- interval: 5min
then:
- uart.write: "/?!\r\n"
From the log I can see that reading from energy meter seems to work:
But it is not showing any information in the dashboard:
Do you have any ideas how to fix this?
Thanks and regards.
According to the log, your sensor configuration should look like this:
sensor:
- platform: obis_d0
name: "PV-Energie"
obis_d0_id: mysml
obis_code: "1.8.0"
unit_of_measurement: kWh
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{1}\\*kWh"
If this is not working, you can temporary remove the value_regex to check whether it is a problem with the obis_code or the regular expression.
Please let me know once it is working, then I would add your configuration to the examples in the documentation.
How would you add a range-check to these sensors so we ignore value changes outside a certain range? Would be a great addition to the example section
Hi,
my config looks the following for an ACE 3000 Type 260:
(Only meter reading is available, no power)
external_components:
- source: github://mampfes/esphome_obis_d0
uart:
id: uart_bus
tx_pin: 1
rx_pin: 3
baud_rate: 300
data_bits: 7
parity: EVEN
stop_bits: 1
obis_d0:
id: mysml
uart_id: uart_bus
optimize_size: true
# Logging if needed
# on_telegram:
# then:
# - logger.log: "telegram received"
sensor:
- platform: obis_d0
name: "PV-Energie"
obis_d0_id: mysml
obis_code: "1.8.0"
unit_of_measurement: kWh
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{1}\\*kWh"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
# ACE energy meter needs to be triggered
interval:
- interval: 5min
then:
# Send start sequence
- uart.write: "/?!\r\n"
Thanks
If I don’t see any logging despite debug level and just a warning to set my baud rate to 0 because uart is interfering, how should I proceed?
How do I figure out if the ibis command is wrong or I just messed up the pin numbers?
Two small mistakes, the pins were not the default for the board (esp8285) and i got the regex wrong as the accuracy is different for each value read.
So here is the correct version for an EZB DD3 with this Sensor
esphome:
name: strom-d0
friendly_name: Strom-D0
esp8266:
board: esp8285
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
password: ""
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "StromzählerFallbackWifi"
password: ""
uart:
id: uart_bus
tx_pin: 13
rx_pin: 14
baud_rate: 9600
data_bits: 7
parity: EVEN
stop_bits: 1
external_components:
- source: github://mampfes/esphome_obis_d0
logger:
baud_rate: 0
obis_d0:
id: mysml
uart_id: uart_bus
optimize_size: true
# Logging if needed
on_telegram:
then:
- logger.log: "telegram received"
sensor:
- platform: obis_d0
name: "Verbrauch"
obis_d0_id: mysml
obis_code: "1-0:1.8.0*255"
unit_of_measurement: kWh
accuracy_decimals: 8
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{8}\\*kWh"
filters:
- filter_out: nan
- platform: obis_d0
name: "Verbrauch_T1"
obis_d0_id: mysml
obis_code: "1-0:1.8.1*255"
unit_of_measurement: kWh
accuracy_decimals: 3
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{3}\\*kWh"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Verbrauch_T2"
obis_d0_id: mysml
obis_code: "1-0:1.8.2*255"
unit_of_measurement: kWh
accuracy_decimals: 3
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{3}\\*kWh"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Erzeugung"
obis_d0_id: mysml
obis_code: "1-0:2.8.0*255"
unit_of_measurement: kWh
accuracy_decimals: 8
device_class: energy
state_class: total_increasing
value_regex: "\\d{6}\\.\\d{8}\\*kWh"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "VerbrauchGesamt"
obis_d0_id: mysml
obis_code: "1-0:16.7.0*255"
unit_of_measurement: W
accuracy_decimals: 8
device_class: energy
state_class: measurement
value_regex: "\\d{6}\\.\\d{2}\\*W"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Verbrauch_L1"
obis_d0_id: mysml
obis_code: "1-0:36.7.0*255"
unit_of_measurement: W
accuracy_decimals: 2
device_class: energy
state_class: measurement
value_regex: "\\d{6}\\.\\d{2}\\*W"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Verbrauch_L2"
obis_d0_id: mysml
obis_code: "1-0:56.7.0*255"
unit_of_measurement: W
accuracy_decimals: 2
device_class: energy
state_class: measurement
value_regex: "\\d{6}\\.\\d{2}\\*W"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Verbrauch_L3"
obis_d0_id: mysml
obis_code: "1-0:76.7.0*255"
unit_of_measurement: W
accuracy_decimals: 2
device_class: energy
state_class: measurement
value_regex: "\\d{6}\\.\\d{2}\\*W"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
#bis hier wars ok
- platform: obis_d0
name: "Spannung_L1"
obis_d0_id: mysml
obis_code: "1-0:32.7.0*255"
unit_of_measurement: V
accuracy_decimals: 1
device_class: energy
state_class: measurement
value_regex: "\\d{3}\\.\\d{1}\\*V"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Spannung_L2"
obis_d0_id: mysml
obis_code: "1-0:52.7.0*255"
unit_of_measurement: V
accuracy_decimals: 1
device_class: energy
state_class: measurement
value_regex: "\\d{3}\\.\\d{1}\\*V"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
- platform: obis_d0
name: "Spannung_L3"
obis_d0_id: mysml
obis_code: "1-0:72.7.0*255"
unit_of_measurement: V
accuracy_decimals: 1
device_class: energy
state_class: measurement
value_regex: "\\d{3}\\.\\d{1}\\*V"
# Filter, b/c sometimes NaN is received
filters:
- filter_out: nan
text_sensor:
- platform: obis_d0
name: "Device Identification"
obis_d0_id: mysml
obis_code: "1-0:96.1.0*255"
entity_category: diagnostic`
Nice to finally filter out spikes with “nan” when the sensor fails at reading the value properly and transmitting it.
GitHub - aquaticus/esphome-iec62056: IEC 62056-21 component for ESPHome could be another solution. Not sure if there are any major differences.
Thanks for the code and the suggestions…
Unfortunately I always get dropouts/timeouts of one minute or more. Im using a wemos d1 mini - is that the problem, cause they got to many requests ?
[21:35:02][W][component:237]: Component obis_d0 took a long time for an operation (445 ms).
[21:35:02][W][component:238]: Components should block for at most 30 ms.
[21:35:06][D][text_sensor:064]: 'Device Identification': Sending state ''
[21:36:24][D][obis_d0:222]: OBIS value end missing
[21:36:24][D][obis_d0:242]: OBIS info: 1-0:96.1.0*255 -> 001LOG00********
[21:36:24][D][text_sensor:064]: 'Device Identification': Sending state '001LOG00********'
[21:36:24][D][obis_d0:242]: OBIS info: 1-0:1.8.0*255 -> 012998.5962*kWh
[21:36:24][D][sensor:093]: 'Consumed Energy': Sending state 12998.59668 kWh with 4 decimals of accuracy
[21:36:24][D][obis_d0:242]: OBIS info: 1-0:16.7.0*255 -> 000841*W
[21:36:24][D][sensor:093]: 'Power': Sending state 841.00000 W with 0 decimals of accuracy
[21:36:24][D][obis_d0:242]: OBIS info: 1-0:32.7.0*255 -> 229.1*V
[21:36:24][D][obis_d0:242]: OBIS info: 1-0:31.7.0*255 -> 004.13*A
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:81.7.4*255 -> 323*deg
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:14.7.0*255 -> 50.0*Hz
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:1.8.0*96 -> 00009.8*kWh
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:1.8.0*97 -> 00064.6*kWh
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:1.8.0*98 -> 00355.3*kWh
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:1.8.0*99 -> 03928.1*kWh
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:1.8.0*100 -> 12998.5*kWh
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:0.2.0*255 -> ver.03,D8FF,20170504
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:96.90.2*255 -> A8B3
[21:36:25][D][obis_d0:242]: OBIS info: 1-0:97.97.0*255 -> 00040100
[21:36:25][W][component:237]: Component obis_d0 took a long time for an operation (443 ms).
[21:36:25][W][component:238]: Components should block for at most 30 ms.
[21:36:29][D][text_sensor:064]: 'Device Identification': Sending state ''
[21:37:18][D][obis_d0:222]: OBIS value end missing
[21:37:18][D][obis_d0:242]: OBIS info: 1-0:96.1.0*255 -> 001LOG00********
[21:37:18][D][text_sensor:064]: 'Device Identification': Sending state '001LOG00********'
[21:37:18][D][obis_d0:242]: OBIS info: 1-0:1.8.0*255 -> 012998.6087*kWh
[21:37:18][D][sensor:093]: 'Consumed Energy': Sending state 12998.60840 kWh with 4 decimals of accuracy
[21:37:18][D][obis_d0:242]: OBIS info: 1-0:16.7.0*255 -> 000835*W
[21:37:18][D][sensor:093]: 'Power': Sending state 835.00000 W with 0 decimals of accuracy
[21:37:18][D][obis_d0:242]: OBIS info: 1-0:32.7.0*255 -> 229.0*V
[21:37:18][D][obis_d0:242]: OBIS info: 1-0:31.7.0*255 -> 004.11*A
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:81.7.4*255 -> 322*deg
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:14.7.0*255 -> 50.0*Hz
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:1.8.0*96 -> 00009.8*kWh
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:1.8.0*97 -> 00064.6*kWh
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:1.8.0*98 -> 00355.3*kWh
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:1.8.0*99 -> 03928.1*kWh
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:1.8.0*100 -> 12998.6*kWh
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:0.2.0*255 -> ver.03,D8FF,20170504
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:96.90.2*255 -> A8B3
[21:37:19][D][obis_d0:242]: OBIS info: 1-0:97.97.0*255 -> 00040100
[21:37:19][W][component:237]: Component obis_d0 took a long time for an operation (450 ms).
[21:37:19][W][component:238]: Components should block for at most 30 ms.
[21:37:23][D][text_sensor:064]: 'Device Identification': Sending state ''
[21:41:16][D][obis_d0:222]: OBIS value end missing
Thats my config for the uart interface
uart:
id: my_uart
rx_pin:
number: D7
inverted: false
baud_rate: 9600
data_bits: 7
parity: EVEN
stop_bits: 1
1 minute dropouts are not normal. Do you have a smart meter that sends the data on its own (without the need to request it)? Then you can maybe configure it.
It you have to request it manually, then reduce your request-interval.
hey mampfes thanks for you reply.
i got the smartmeter Logarex LK11BE and used your config-file from github.
Strangely enough, it is in phases. So sometimes it runs really well with no dropouts and sometimes I get these dropouts .
*edit: what i think i have found out is - that it runs more stable when the solar system is producing electricity