Modbuss coil status address

Hello how can i tell the address of the relay staus in MODBUS RTU?

assuming i need to read the holding register , below settings does not work

modbus syntax had changed since 2021 , and i cannot get it to work normally unless i use in older version 0.117

kindly advise

  1. What is the address refer to ?
  2. What is the address for the holding resiter ?
    - name: SW008
      slave: 3
      address: 7
      write_type: coil  
      verify:
          input_type: holding
          address: FF
          state_on: 1
          state_off: 0   


address: 255

You need check manual

which manual ?

255 is ff…

but there is address for the slave and address for the holding ,

so basically this does not work…

in the legacy design i simply used


  - platform: modbus
    coils:
    #====================================Module #1=============================
   # First Floor
      - name: Switch01
        slave: 10 
        coil: 0
      - name: Switch02
        slave: 10 
        coil: 1
      - name: Switch03
        slave: 10
        coil: 2
      - name: Switch04
        slave: 10
        coil: 3

which does NOT WORK at all here…
here it is very simply ONLY slave address and coil number

It may not be anything you’re doing wrong, since I upgraded to the latest versions of HA my Modbus integration has stopped working, might be best to roll back a couple of versions and test on that, I’m going to wait a week first.

the thing is the working version is

Home Assistant 0.118.5

newer will have the same problem,
so i am trying to understand if i am the only user who is using modbus…

any newer version has this issue ,yet no mention for modbus changes in release notes…

also it does not make sense that syntax has significant changes…

I am using Modbus via several means, Modbus via ESPhome and Thingsboard IOT gateway are still working, Modbus via HA integrated Modbus driver is not working.
Getting back to your issue, have you tried CAS Modbus Scanner to test your points? I don’t use any coils in my setup, only registers and inputs.
My code that worked before upgrade to version core-2022.4.5

  - name: PW11
    close_comm_on_error: true
    delay: 5
    timeout: 5
    type: tcp
    host: 192.168.5.169
    port: 502
    sensors:
      - name: PW11 Meter 2 Line Voltage
        unit_of_measurement: V
        slave: 3
        address: 0
        count: 2
        input_type: input
        data_type: float
        precision: 2   
        
  - name: EW11 Solar Test
    close_comm_on_error: true
    delay: 5
    timeout: 10
    type: tcp
    host: 192.168.5.173
    port: 502
    sensors:
      - name: EW11 Solar Test Voltage
        unit_of_measurement: V
        slave: 1
        address: 0
        count: 1
        input_type: input
        data_type: int
        scale: 0.01
        precision: 2

Seems you are using MODBUS TCP… i am using RTU

Correct, Do you have the modbus datasheet for your device as that should list all the registers? otherwise use CAS modbus scanner to poll the coils, once you can confirm with CAS then its a matter of copying the addresses, there is the possibility you may need to offset by one.

1 Like

what do you mean ?
why it is working on old version but not on new version?

device is set for address 0x03…

so this is quite strange…

So no one is using modbus rtu with new HA??

I do that:
Modbus RTU / RS485 with:
Home Assistant 2023.1.1
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230104.0 - latest