Read YTL5300/DTS353F2 with modbus -> Modbus CRC Check failed

I’m trying to read the data from a modbus (RS485) power meter YTL DTS353F2. Whatever config I’ve tried, no success.

I’m using the same hardware as the esphome documentation (Modbus Controller — ESPHome)

Register matrix can be found here: https://www.elektramat.nl/media/wysiwyg/Specsheet/Modbus_register_matrix.pdf

modbus:
  id: modbus1
  uart_id: uart_modbus

uart:
  - tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 9600
    id: uart_modbus
    #parity: even
    data_bits: 8
    stop_bits: 1
    debug:

modbus_controller:
  - id: modbus1_01
    address: 0x0001 # the Modbus device addr
    modbus_id: modbus1
    update_interval: 5s

sensor:
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L1 Voltage"
    register_type: holding
    address: 0x000E
    unit_of_measurement: "V"
    value_type: U_WORD

Result is

[10:14:45][D][uart_debug:114]: >>> 01:03:00:0E:00:01:E5:C9
[10:14:45][W][modbus:096]: Modbus CRC Check failed! F020!=0E
[10:14:45][D][uart_debug:114]: <<< 01:03:00:0E:00:01:E5:C9
[10:14:45][D][modbus_controller:034]: Modbus command to device=1 register=0x0E countdown=0 removed from queue after send

Parity: even
Baud_rate: 1200

And/or:

  value_type: FP32

Thanks for your reply. Tested it buy no difference.

Even with the AB wires disconnected, I see this result.

>>> 01:03:00:0E:00:01:E5:C9
<<< 01:03:00:0E:00:01:E5:C9

What could cause this echo?

Bad wiring

Rs485 adapter

RX/TX were crossed.

From ESP to RS485 board, RX => RX and TX => TX is the right way. On RS485 board, TX light and RX light should not light up at the same time (then rx/tx are crossed).

Now it’s working:

modbus:
  id: modbus1
  uart_id: uart_modbus

uart:
  - tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 9600
    id: uart_modbus
    parity: even
    data_bits: 8
    stop_bits: 1

modbus_controller:
  - id: modbus1_01
    address: 0x0001 # the Modbus device addr
    modbus_id: modbus1
    update_interval: 10s
    setup_priority: -10

sensor:
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L1 Voltage"
    register_type: holding
    address: 0x000E
    unit_of_measurement: "V"
    value_type: FP32
    accuracy_decimals: 1
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L2 Voltage"
    register_type: holding
    address: 0x0010
    unit_of_measurement: "V"
    value_type: FP32
    accuracy_decimals: 1
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L3 Voltage"
    register_type: holding
    address: 0x0012
    unit_of_measurement: "V"
    value_type: FP32
    accuracy_decimals: 1
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal Grid Frequency"
    register_type: holding
    address: 0x0014
    unit_of_measurement: "Hz"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L1 Current"
    register_type: holding
    address: 0x0016
    unit_of_measurement: "A"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L2 Current"
    register_type: holding
    address: 0x0018
    unit_of_measurement: "A"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L3 Current"
    register_type: holding
    address: 0x001A
    unit_of_measurement: "A"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal Total Active Power"
    register_type: holding
    address: 0x001C
    unit_of_measurement: "kW"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L1 Active Power"
    register_type: holding
    address: 0x001E
    unit_of_measurement: "kW"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L2 Active Power"
    register_type: holding
    address: 0x0020
    unit_of_measurement: "kW"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal L3 Active Power"
    register_type: holding
    address: 0x0022
    unit_of_measurement: "kW"
    value_type: FP32
    accuracy_decimals: 3
  - platform: modbus_controller
    modbus_controller_id: modbus1_01
    name: "Laadpaal Energy Consumed"
    register_type: holding
    address: 0x0100
    unit_of_measurement: "kWh"
    value_type: FP32
    accuracy_decimals: 3
    state_class: total_increasing
    device_class: energy
2 Likes