esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

The SML read sensor sends data to the meter, although it should not. #5005

Closed rubinho76 closed 11 months ago

rubinho76 commented 11 months ago

The problem

Hello, I have flashed my Hichi SML sensor today from Tasmota to Esphome.

Unfortunately now my grid meter is going crazy. For whatever reason the sensor sends signals to the meter. This causes the meter to run through all the menus. With Tasmota it did not do that. I have an EMH (eHZM-W22E8-0LH00-D5-A5Q2) meter and this is the initial Tasmota code for that meter....

`>D

B ->sensor53 r M 1 +1,3,s,0,9600,EHZ 1,77070100100700ff@1,Aktuell,W,Power_curr,16 1,77070100010800ff@1000,Zählerstand Verb.,kWh,b_t0,4`

As a workaround, I taped off the TX diode, but that should work differently. What could be the reason?

Which version of ESPHome has the issue?

2023.9.3

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

2023.10.3

What platform are you using?

ESP8266

Board

ESP01

Component causing the issue

SML

Example YAML snippet

uart:
  id: uart_bus
  rx_pin: GPIO3
  baud_rate: 9600
  rx_buffer_size: 2048
  data_bits: 8
  stop_bits: 1
  parity: NONE

sml:
  id: mysml
  uart_id: uart_bus

sensor:
  - platform: sml
    name: "StromBezug"
    sml_id: mysml
    obis_code: "1-0:1.8.0"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "StromBezug_T1"
    sml_id: mysml
    obis_code: "1-0:1.8.1"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "StromBezug_T2"
    sml_id: mysml
    obis_code: "1-0:1.8.2"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "Stromeinspeisung"
    sml_id: mysml
    obis_code: "1-0:2.8.0"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "Stromeinspeisung_T1"
    sml_id: mysml
    obis_code: "1-0:2.8.1"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "Stromeinspeisung_T2"
    sml_id: mysml
    obis_code: "1-0:2.8.2"
    unit_of_measurement: kWh
    accuracy_decimals: 1
    device_class: energy
    state_class: total_increasing
    filters:
      - multiply: 0.0001
      - throttle: 30s
  - platform: sml
    name: "Momentanleistung"
    sml_id: mysml
    obis_code: "1-0:16.7.0"
    unit_of_measurement: W
    accuracy_decimals: 1
    device_class: "power"

Anything in the logs that might be useful for us?

No response

Additional information

No response

rubinho76 commented 11 months ago

Command back I was really stupid.

logger:
  baud_rate: 0

Was the trick Now it works!