Modbus heatpump issue configuration Esphome

I have a heat pump boiler with modbus protocol but I can’t communicate with it, I attach my configuration: esphome side:
`esphome:

  name: esphome-web-f96b62
  friendly_name: ESPHome Web f96b62

esp8266:
  board: esp01_1m

# Enable logging
logger:

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

ota:


wifi:
  ssid: "XXXXXXXXXXXX"
  password: "XXXXXXXXXXXXXX"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "XXXXXXXXXXXX"
    password: "XXXXXXXXXXXX"

captive_portal:

uart:
  id: mod_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 9600
  stop_bits: 1
  #baud_rate: 115200
  
modbus:
  id: modbus1
  uart_id: mod_bus
  #send_wait_time: 200ms
  
modbus_controller:
  id: vlb
# the Modbus device addr
  address: 0x01
  modbus_id: modbus1
  update_interval: 5s
  #setup_priority: -10  

sensor:
  - platform: modbus_controller
    modbus_controller_id: vlb
    name: "maxa"
    id: maxa
    register_type: holding
    address: 2001
    value_type: U_WORD`

configuration.yaml:

modbus:
  - name: modbus1
    type: tcp
    host: 192.168.1.6
    port: 502

these are the moddbus addresses of the machine

error no response…

I know it’s been a while since you posted, but I managed to connect using an ESP32 with an RS485 module and set up the following configuration in case someone else needs it.

uart:
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 9600
  parity: EVEN
  stop_bits: 1
  data_bits: 8

modbus:
  id: modbus1
  

modbus_controller:
  - id: heat_pump_modbus
    address: 0x01  ## address of the ModBUS slave device on the bus
    modbus_id: modbus1
    setup_priority: -10
    update_interval: 10s
    command_throttle: 2ms
1 Like

thanks for the reply, I only saw it now, I’ll try over the weekend, I wanted to ask you again, I have to replace this part of the code you sent with my parameters, in the sense: I have to leave (sensor:) etc. ?