ESPHome DSMR component - debug errors / strange data

Hi,

This is my first post on the forum, so I hope I provide the correct information.

I’m using the ESPHome DSMR component and HA isn’t receiving the data. In the ESPHome logs I see the following:
[17:47:22][W][dsmr:092]: Timeout while reading data for telegram
[17:47:22][V][dsmr:142]: Header of telegram found
[17:47:22][D][uart_debug:158]: <<< "h\xAA=Ugq{{g}\x97\x97\x9D\x9B\x9F\x9B\x8F\x9F\x91\x93\xE5\xEB\xE5\xEB\x00gif\xB16\xDB\xA3\x8F\xAF\x95\x9F\xAD\xE5\xEB\x00V\xFB\x8B\x9D\xA3\x9F\xA3\x9F\xAF\x9B\x9B\x9F\x91\x9D\x8F\x9D\x91\x97\x93\x99\x99Y\xAD\xE5\xEB\x00V\xFB\x8B\x8D\x93\xA3\x9D\xA3\x9D\xAF\x97\x95\x99\x9F\x99\x9F\x99\x97\x99\x95\x99\x9F\x99\x9F\x99\x99\x99\x8F\x99\x99\x99\x93\x99\x9B\x99\x91\x99\x93\x99\x97\x99\x9D\x99\x91\xAD\xE5\xEB\x00gi\xB6\x9D\xA3\x8F\xA3\x9D\xAF\x9F\x9B\x9B\x8F\x95\x9F\xA3\x9D\x9B\x9F
[17:47:22][V][dsmr:142]: Header of telegram found
[17:47:22][V][dsmr:142]: Header of telegram found
[17:47:22][V][dsmr:142]: Header of telegram found
[17:47:22][D][uart_debug:158]: <<< "\x9F\x9D\x91\x9B\x8D\x9F\xA3\x9B\x91\x9F\xAB)Q/\xAD\xE5\xEB\x00gi\xB6\x9B\xA3\x8F\xA3\x9D\xAF\x9F\x9F\x9B\x93\x95\x8D\xA3\x97\x93\x9D\xAB)Q/\xAD\xE5\xEB\x00gi\xB6\x9B\xA3\x8F\xA3\x9B\xAF\x9F\x9F\x93\x9B\x91\x91\xA3\x97\x91\x91\xAB)Q/\xAD\xE5\xEB\x00V\xFB\x8B\x8D\x93\xA3\x9D\x97\xA3\x9F\xAF\x9F\x9F\x9F\x9B\xAD\xE5\xEB\x00gi\xB6\x9D\xA3\x91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x99\x9D\x99\x8F\x99\x9F\x99\x9F\x99\x9B\x99\x91\x99\x91\x99\x93
[17:47:22][D][uart_debug:158]: <<< “\x9F\x91\x9D\x8F\x9D\x91\x97\x95\x9F\x95Y\xAD\xAF\x9F\x93\x91\x99\x9F\xA3\x9D\x8D\x95\xAB%\x99\xAD\xE5\xEB\x00od\xAF\xAF\xB3\xDE\x0F”
[17:47:23][W][dsmr:092]: Timeout while reading data for telegram
[17:47:23][V][dsmr:142]: Header of telegram found
[17:47:23][D][uart_debug:158]: <<< "h\xAA=Ugq{{g}\x97\x97\x9D\x9B\x9F\x9B\x8F\x9F\x91\x93\xE5\xEB\xE5\xEB\x00gif\xB16\xDB\xA3\x8F\xAF\x95\x9F\xAD\xE5\xEB\x00V\xFB\x8B\x9D\xA3\x9F\xA3\x9F\xAF\x9B\x9B\x9F\x91\x9D\x8F\x9D\x91\x97\x93\x99\x97Y\xAD\xE5\xEB\x00V\xFB\x8B\x8D\x93\xA3\x9D\xA3\x9D\xAF\x97\x95\x99\x9F\x99\x9F\x99\x97\x99\x95\x99\x9F\x99\x9F\x99\x99\x99\x8F\x99\x99\x99\x93\x99\x9B\x99\x91\x99\x93\x99\x97\x99\x9D\x99\x91\xAD\xE5\xEB\x00gi\xB6\x9D\xA3\x8F\xA3\x9D\xAF\x9F\x9B\x9B\x8F\x95\x9F\xA3\x9D\x9B\x9F
[17:47:23][V][dsmr:142]: Header of telegram found
[17:47:23][V][dsmr:142]: Header of telegram found
[17:47:23][V][dsmr:142]: Header of telegram found
[17:47:23][D][uart_debug:158]: <<< "\x9F\x9D\x91\x9B\x8D\x9F\xA3\x9B\x91\x9F\xAB)Q/\xAD\xE5\xEB\x00gi\xB6\x9B\xA3\x8F\xA3\x9D\xAF\x9F\x9F\x9B\x93\x95\x8D\xA3\x97\x93\x9D\xAB)Q/\xAD\xE5\xEB\x00gi\xB6\x9B\xA3\x8F\xA3\x9B\xAF\x9F\x9F\x93\x9B\x91\x91\xA3\x97\x91\x91\xA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F\x9F\x99\xAD\xE5\xEB\x00V\xDB\x8B\x8D\x93\xA3\x9D\xA3\x9F\xAF\x97\x91\x99\x9F\x99\x9F\x99\x99\x99\x8D\x99\x9F\x99\x9F\x99\x9D\x99\x8F\x99\x9F\x99\x9F\x99\x9B\x99\x91\x99\x91\x99\x93
[17:47:23][D][uart_debug:158]: <<< “\x9F\x91\x9D\x8F\x9D\x91\x97\x95\x9F\x95Y\xAD\xAF\x9F\x93\x91\x99\x9F\xA3\x9D\x8D\x95\xAB%\x99\xAD\xE5\xEB\x00o\xEC5\x9D\xE5\xEB\x00”
[17:47:24][W][dsmr:092]: Timeout while reading data for telegram
[17:47:24][V][dsmr:142]: Header of telegram found

When I add “receive_timeout: 1000ms”, I don’t see the time-out messages, but the rest remains the same.

I have tried it with an ESP8266 nodemcu and ESP32 Vroom. Results are the same.
I’m trying to read a Landis Gyr E350 meter. I tried data pin directly to the RX pin and setup as by drawings displayed here: https://github.com/daniel-jong/esp8266_p1meter

Yaml file:


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: RX
  baud_rate: 115200
  rx_buffer_size: 1500
  debug:
    direction: RX
    after:
      delimiter: "\r\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

dsmr:
#  request_pin: RX
#  request_interval: 15s
#  receive_timeout: 1000ms
  
sensor:
  - platform: dsmr
    energy_delivered_tariff1:
      name: Energy Delivered Tariff 1
#      state_class: total_increasing
    energy_delivered_tariff2:
      name: Energy Delivered Tariff 2
#      state_class: total_increasing
    energy_returned_tariff1:
      name: Energy Returned Tariff 1
    energy_returned_tariff2:
      name: Energy Returned Tariff 2
    power_delivered:
      name: Power Consumed
    power_returned:
      name: Power Returned
    electricity_failures:
      name: Electricity Failures
    electricity_long_failures:
      name: Electricity Long Failures
    voltage_l1:
      name: Voltage L1
    voltage_l2:
      name: Voltage L2
    voltage_l3:
      name: Voltage L3
    current_l1:
      name: Current L1
    current_l2:
      name: Current L2
    current_l3:
      name: Current L3
    power_delivered_l1:
      name: Power Delivered L1
    power_delivered_l2:
      name: Power Delivered L2
    power_delivered_l3:
      name: Power Delivered L3
    power_returned_l1:
      name: Power Returned L1
    power_returned_l2:
      name: Power Returned L2
    power_returned_l3:
      name: Power Returned L3
    gas_delivered:
      name: Gas Delivered

Where can I find the debug codes? Does anyone knows what’s going wrong?

Thanks,
Jasper

Does anyone know how to find an answer on this query?

I fixed it by following this: mmakaay/dsmr-reader-for-esphome: A smartmeter project, made for ESPHome (hardware + ESPHome config) (github.com)

thanks mmakaay

I’ve tried about every config available to create esp8266 DSMR reader. My P1 is model MT382, the “old P1 smart meter”. My esphome config:

logger:
  baud_rate: 0
#  level: DEBUG

uart:
  rx_pin: GPIO13
  baud_rate: 9600
  data_bits: 7
  parity: NONE/EVEN #doesn't make a difference
  stop_bits: 1
  rx_buffer_size: 1500
  debug:
    direction: RX
    after:
      delimiter: "\r\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);

dsmr:
#  crc_check: false
  max_telegram_length: 1500
#  gas_mbus_id: 1
#  uart_id: 0
  request_pin: GPIO5
  request_interval: 20s
  receive_timeout: 8s


sensor:
  - platform: dsmr
    energy_delivered_tariff1:
#      name: ${friendly_name}_energy_delivered_tariff1
      name: dsmr_energy_delivered_tariff1


I’m using the nodemcu dev board and the schematic of mmakaay, with optocoupler for request_pin

Whatever I do, I’m getting the following log output:

[21:34:36][I][app:102]: ESPHome version 2022.10.0 compiled on Oct 24 2022, 21:33:45
[21:34:36][C][status_led:019]: Status LED:
[21:34:36][C][status_led:020]:   Pin: GPIO2
[21:34:36][C][wifi:502]: WiFi:
[21:34:36][C][wifi:360]:   Local MAC: 3C:61:05:D0:A8:BE
[21:34:36][C][wifi:361]:   SSID: [redacted]
[21:34:36][C][wifi:362]:   IP Address: 10.222.15.141
[21:34:36][C][wifi:363]:   BSSID: [redacted]
[21:34:36][C][wifi:365]:   Hostname: 'nodemcu-p1-reader-141-d0a8be'
[21:34:36][C][wifi:367]:   Signal strength: -70 dB ▂▄▆█
[21:34:36][C][wifi:371]:   Channel: 1
[21:34:36][C][wifi:372]:   Subnet: 255.255.254.0
[21:34:36][C][wifi:373]:   Gateway: 10.222.14.138
[21:34:36][C][wifi:374]:   DNS1: 0.0.0.0
[21:34:36][C][wifi:375]:   DNS2: 0.0.0.0
[21:34:36][C][logger:275]: Logger:
[21:34:36][C][logger:276]:   Level: DEBUG
[21:34:36][C][logger:277]:   Log Baud Rate: 0
[21:34:36][C][logger:278]:   Hardware UART: UART0
[21:34:36][C][uart.arduino_esp8266:102]: UART Bus:
[21:34:36][C][uart.arduino_esp8266:104]:   RX Pin: GPIO13
[21:34:36][C][uart.arduino_esp8266:106]:   RX Buffer Size: 1500
[21:34:36][C][uart.arduino_esp8266:108]:   Baud Rate: 9600 baud
[21:34:36][C][uart.arduino_esp8266:109]:   Data Bits: 7
[21:34:36][C][uart.arduino_esp8266:110]:   Parity: NONE
[21:34:36][C][uart.arduino_esp8266:111]:   Stop bits: 1
[21:34:36][C][uart.arduino_esp8266:113]:   Using hardware serial interface.
[21:34:36][C][dsmr:275]: DSMR:
[21:34:36][C][dsmr:276]:   Max telegram length: 1500
[21:34:36][C][dsmr:277]:   Receive timeout: 8.0s
[21:34:36][C][dsmr:279]:   Request Pin: GPIO5
[21:34:36][C][dsmr:282]:   Request Interval: 20.0s
[21:34:36][C][dsmr:286]:   energy_delivered_tariff1 'dsmr_energy_delivered_tariff1'
[21:34:36][C][dsmr:286]:     Device Class: 'energy'
[21:34:36][C][dsmr:286]:     State Class: 'total_increasing'
[21:34:36][C][dsmr:286]:     Unit of Measurement: 'kWh'
[21:34:36][C][dsmr:286]:     Accuracy Decimals: 3
[21:34:36][C][version.text_sensor:021]: Version Text Sensor 'kat_p1_reader ESPHome Version'
[21:34:36][C][version.text_sensor:021]:   Icon: 'mdi:new-box'
[21:34:36][C][wifi_info:013]: WifiInfo Mac Address 'kat_p1_reader Mac Wifi Address'
[21:34:36][C][status:034]: Status Binary Sensor 'kat_p1_reader Status'
[21:34:36][C][status:034]:   Device Class: 'connectivity'
[21:34:36][C][captive_portal:088]: Captive Portal:
[21:34:36][C][web_server:125]: Web Server:
[21:34:36][C][web_server:126]:   Address: 10.222.15.141:80
[21:34:36][C][mdns:100]: mDNS:
[21:34:36][C][mdns:101]:   Hostname: nodemcu-p1-reader-141-d0a8be
[21:34:36][C][ota:089]: Over-The-Air Updates:
[21:34:36][C][ota:090]:   Address: 10.222.15.141:8266
[21:34:36][C][ota:093]:   Using Password.
[21:34:36][C][api:138]: API Server:
[21:34:36][C][api:139]:   Address: 10.222.15.141:6053
[21:34:36][C][api:143]:   Using noise encryption: NO
[21:34:36][C][wifi_info:009]: WifiInfo IPAddress 'kat_p1_reader IP Address'
[21:34:36][C][wifi_info:011]: WifiInfo SSID 'kat_p1_reader SSID'
[21:34:36][C][wifi_info:012]: WifiInfo BSSID 'kat_p1_reader BSSID'
[21:34:45][D][uart_debug:158]: <<< "(\eV\neT\x13YEvdRkrv\x16VVeV\x1F%\x1F\v\r\x13#\x1DF\x1D^\x15}\x176.*\x15\x13\x19\x1F\x19\x1F\x19\x15\x19\x1F\x19\x0F2\r\x19\x1D2\r\x19\x19\x19\x172\x1D2\eZ\x14V\x1DJ\x1F\v\x1DF\x0FF\x1D^\x0F*\x1D2\x11F\x1D6.VR\x14!%N=\'i6,2{F\e^\x13\x15\r\x13\x11F\x1D\x1E&+R\x14!%N=\'i6l2{F\x1D^\x1F\x13\x13\x1F\x19#\r\x19\x11VR\x14!%N=\'i6l2{F\e"
[21:34:45][D][uart_debug:158]: <<< "^\x1D*\x1F\x0F:F\x15\x11\x1A+R\x14!%N=V{6,l6kr2{vmvvVR%N=\'i6,2\v2{vmvv\x166{&+R\x14+9=\'i6l2\v2{vmvvv6{v6%!Q\x059=V{6,\x122{6{vmV,,l{v6%!Q%N=V{6,l6K6krv-R%N=V{6Ll6k\x126kr-%N=V{6,l6k\x126{v-%N"
[21:34:46][D][uart_debug:158]: <<< "=o9="
[21:34:55][D][uart_debug:158]: <<< "(\eV\neT\x13YEvdRkrv\x16VVeV\x1F%\x1F\v\r\x13#\x1DF\x1D^\x15}\x176.*\x15\x13\x19\x1F\x19\x1F\x19\x15\x19\x1F\x19\x0F2\r\x19\x1D2\r\x19\x19\x19\x172\x1D2\eZJV\x1DJ\x1F\v\x1DF\x0FF\x1D^\x0F*\x1D2\x11F\x1D2\x17VR\x14!%N=\'i6,2{F\e^\x13\x15\r\x13\x11F\x1D\x1E&+R\x14!%N=\'i6l2{F\x1D^\x1F\x13\x13\x1F\x19#\r\x19\x11VR\x14!%N=\'i6l2{F\e"
[21:34:55][D][uart_debug:158]: <<< "^\x1D*\x1F\x0F:F\x15\x11\x1A+R\x14!%N=V{6,l6kr2{vmvvVR%N=\'i6,2\v2svmvv\x166{\x1EVR\x14+9=\'i6l2\v2{vmvvv6{v6%!Q%N=V{6,\x122{F4vmV,,l{v6%!Q%N=V{6,l6K6krv-R%N=V{6,l6k\x126kr-%\x0E=V{6,l6k\x126{v-%N"
[21:34:56][D][uart_debug:158]: <<< "=o9="
[21:35:05][D][uart_debug:158]: <<< "(\eV\neT\x13YEvdRkrv\x16VVeV\x1F%\x1F\v\r\x13#\x1DF\x1D^\x15}\x176.*\x15\x13\x19\x1F\x19\x1F\x19\x15\x19\x1F\x19\x0F2\r\x19\x1D2\r\x19\x19\x19\x172\x1D2\eZJV\x1DJ\x1F\v\x1DF\x0FF\x1D^\x0F*\x1D2\x11F\x1D.*+R\x14!%N=\'i6,2{F\e^\x13\x15\r\x13\x11F\x1D\x1E&+R\x14!%N=\'i6l2{F\x1D^\x1F\x13\x13\x1F\x19#\r\x19\x11VR\x14!%N=\'i6l2{F\e"
[21:35:05][D][uart_debug:158]: <<< "^\x1D*\x1F\x0F:F\x15\x11\x1A+R\x14!%N=V{6,l6kr2{vmvvVR%N=\'iF1\'4$4vmvv\x166{&+R\x14+9=\'i6l2\v2{vmvvv6{v6%!Q%N=V{f,\x122{6{vmV,,l{v6%!Q%N=V{6,l6K6krv-R%N=V{6,l6k\x12fkr-%N=V{6,l6k\x126{v-%N"
[21:35:06][D][uart_debug:158]: <<< "=o9="
[21:35:15][D][uart_debug:158]: <<< "(\eV\neT\x13YEvdRkrv\x16VVeV\x1F%\x1F\v\r\x13#\x1DF\x1D^\x15}\x176.*\x15\x13\x19\x1F\x19\x1F\x19\x15\x19\x1F\x19\x0F2\r\x19\x1D2\r\x19\x19\x19\x172\x1D2\eZJV\x1DJ\x1F\v\x1DF\x0FF\x1D^\x0F*\x1D2\x11F\x1D*\x13+R\x14!%N=\'i6,2{F\e^\x13\x15\r\x13\x11F\x1D\x1EL+R\x14!%N=\'i6l2{F\x1D^\x1F\x13\x13\x1F\x19#\r\x19\x11VR\x14!%N=\'i6l2{F\e"
[21:35:15][D][uart_debug:158]: <<< "^\x1D*|\x0F:F\x15\x11\x1A+R\x14!%N=V{6,l6kr2{vmvvVR%N=\'i6,2\v2{vmvv&6{.VR\x14+9=\'i6l2\v2{vmvvv6{v6%!Q%N=V{6,\x122{6{vmVL,l{v6%!Q%N=V{6,l6K6krv-R%N=V{6,l6k\x126kr-%N=V{6\fc24\'f4v-%N"
[21:35:16][D][uart_debug:158]: <<< "=o9="
[21:35:25][D][uart_debug:158]: <<< "(\eV\neT\x13YEvdRkrv\x16VVeV\x1F%\x1F\v\r\x13#\x1DF\x1D^\x15}\x176.*\x15\x13\x19\x1F\x19\x1F\x19\x15\x19\x1F\x19\x0F2\r\x19\x1D2\r\x19\x19\x19\x172\x1D2\eZJV\x1DJ\x1F\v\x1DF\x0FF\x1D^\x0F*\x1D2\x11F\x1D&\x11VR\x14!%N=\'i6,2{F\e^\x13\x15\r\x13\x11F\x1D\x1E&+R\x14!%N=\'i6l2{F\x1D^\x1F\x13\x13\x1F\x19#\r\x19\x11VR\x14!%N=\'i6l2{F\e"
[21:35:25][D][uart_debug:158]: <<< "^\x1D*\x1F\x0F:F\x15\x11\x1A+R\x14!%N=V{6,l6kr2{vmvvVR%N=\'i6,2\v2{vmvv\x166{.VR\x14+9=\'i6l2\v2{vmvvv6{v6%!Q%N=V{6,\x122{6{vmV,,l{v6%!Q%\x0E=V{6,l6K6krv-R%N=V{6,l6k\x126kr-%N=V{6,l6k\x126{v-%\x0E"
[21:35:26][D][uart_debug:158]: <<< "=o9="

Can somebody give me a hint. I’m desperate.

I’ve fixed the random bytes by inverting the uart pin:

uart:
  baud_rate: 115200
  rx_pin:
    number: RX
    inverted: true
  rx_buffer_size: 1500
1 Like

Thanks for posting your fix @michaelnet97 , this helped me as well!

2 Likes

Just for the record. I had the same issue and adding "inverted:true" to the uart section fixed the problem. Down below is a working esphome yaml config using inverted uart signal and debugging enabled:

uart:
  rx_pin: 
    number: GPIOxx
    inverted: true    
  baud_rate: 115200
  rx_buffer_size: 1700
  debug:
    direction: RX
    after:
      delimiter: "\r\n"
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);