Modbus addressing

Hi,

I have made a setup according to the following topic:

The modbus connection I want to obtain is with the following device:

Here I want to read the data at address 3x251, but I get no data at all. Can someone check if my code is correct and especially the addressing?

This is my code:

esphome:
  name: esp-modbus
  friendly_name: esp-modbus

esp8266:
  board: d1_mini

# Enable logging
logger:
  baud_rate: 0
  level: VERBOSE

# Enable Home Assistant API
api:
  encryption:
    key: ""

ota:
  password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: ""
    password: ""

captive_portal:

uart:
  id: mod_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 19200 
  parity: Odd
  stop_bits: 1

modbus:
  flow_control_pin: 5
  id: modbus1
  uart_id: mod_bus
  send_wait_time: 500ms

modbus_controller:
  - id: epever
    address: 53
    update_interval: 10s
    modbus_id: modbus1
    setup_priority: -10

sensor:
  - platform: modbus_controller
    modbus_controller_id: epever
    name: "Ultralink"
    id: ultralink
    register_type: holding
    address: 251
    unit_of_measurement: "%"
    value_type: U_WORD

And this is the response I get:

[08:19:27][C][modbus_controller:275]: ModbusController:
[08:19:27][C][modbus_controller:276]:   Address: 0x35
[08:19:27][C][modbus_controller:278]: sensormap
[08:19:27][C][modbus_controller:280]:  Sensor type=3 start=0xFB offset=0x0 count=1 size=2
[08:19:27][C][modbus_controller:284]: ranges
[08:19:27][C][modbus_controller:286]:   Range type=3 start=0xFB count=1 skip_updates=0
[08:19:27][V][modbus_controller:035]: Sending next modbus command to device 53 register 0xFB count 1
[08:19:27][V][modbus:199]: Modbus write: 35.03.00.FB.00.01.F1.8F (8)
[08:19:27][V][modbus_controller:486]: Command sent 3 0xFB 1
[08:19:27][V][modbus_controller:035]: Sending next modbus command to device 53 register 0xFB count 1
[08:19:27][V][modbus:199]: Modbus write: 35.03.00.FB.00.01.F1.8F (8)
[08:19:27][V][modbus_controller:486]: Command sent 3 0xFB 1
[08:19:28][V][modbus_controller:035]: Sending next modbus command to device 53 register 0xFB count 1
[08:19:28][V][modbus:199]: Modbus write: 35.03.00.FB.00.01.F1.8F (8)
[08:19:28][V][modbus_controller:486]: Command sent 3 0xFB 1
[08:19:28][V][modbus_controller:035]: Sending next modbus command to device 53 register 0xFB count 1
[08:19:28][V][modbus:199]: Modbus write: 35.03.00.FB.00.01.F1.8F (8)
[08:19:28][V][modbus_controller:486]: Command sent 3 0xFB 1
[08:19:29][D][modbus_controller:029]: Modbus command to device=53 register=0xFB countdown=0 no response received - removed from send queue
    register_type: read
    address: 251 # or 250

Hi nikito7,

Thank you for your feedback.

Read is a value of 4, should be holding for a value of 3.
Other than that, I’ve given it a try to no avail.

I also once connected to the device via a normal USB RS485, that connection works perfectly.

3x251

3x000 read hex 04

4x000 holding hex 03