Modbus tcp No response received after 3 retries

I need help trying to figure out how to make this work, I am trying to connect to my transfer switch to get power readings in homeassistant. here is my YAML

modbus:
  - name: modbus_hub
    type: tcp
    host: 192.168.1.10
    port: 502
    
    delay: 0
    message_wait_milliseconds: 30
    timeout: 15
    sensors:
      - name: Source N Line--Neutral L1--L0
        unit_of_measurement: V
        slave: 1
        address: 40002
        input_type: input
        data_type: uint16
        device_class: voltage
        unique_id: voltage_n1
        state_class: measurement
     
logger:
  default: warning
  logs:
    homeassistant.components.modbus: debug
    pymodbus: debug

My logs=

2026-04-18 14:40:11.248 ERROR (MainThread) [homeassistant.components.modbus] Pymodbus: modbus_hub: Error: device: 1 address: 40002 -> Modbus Error: [Input/Output] No response received after 3 retries, continue with next request
2026-04-18 14:40:26.281 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x4 0x9c 0x42 0x0 0x1
2026-04-18 14:40:41.282 DEBUG (MainThread) [pymodbus.logging] Repeating....
2026-04-18 14:40:56.283 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x4 0x9c 0x42 0x0 0x1
2026-04-18 14:41:11.286 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x4 0x9c 0x42 0x0 0x1
2026-04-18 14:41:26.287 ERROR (MainThread) [pymodbus.logging] No response received after 3 retries, continue with next request

I am able to connect to the transfer switch and receive data using the ModbusTools program on my computer


I had trouble getting connected with this as well until I edited the device and selected “3” for unit

my actual transfer switch shows this

I see no settings for this in homeassistant but then I have no idea if it is an issue. I see that what is being sent by modbustools is differrent than what is being sent by the homeassistant integration. I have no idea what I am doing so any help would be very much appreciated

For troubleshooting purposes, try the protocol wizard.
https://community.home-assistant.io/t/protocol-wizard-no-more-yaml-run-time-addition-and-control-of-devices-and-registers-on-the-fly/970009

Thanks for your reply, I tried it but no joy so far. I was able to connect to the device via TCP and add the card, but so far everything I try I get a Read Failed message. I have the manual for my device


I am fairly certain that I should be able to read the register address of 40002, and that as it is “RO” the type would be input, although I have tried holding and auto as well.

40002 is data type WORD so UInt16 should be correct. also looking at that picture the bit order leads me to believe Byte Order = Big Endian and Word Order = Big (but I tried all configurations)
I have no idea what “Size” is referring to so I am really not sure what to put there, I tried several numbers. and I tried raw mode both enabled and not.
Any Ideas?

Ok, I am still unable to get the Modbus integration to work, but I did get it working using Protocol Wizard. The “no unit ID” in Modbus kept nagging at me so i did some research and found out that unit ID and Slave are the same thing. I tried to adjust my YAML to include slave but in the Modbus integration the slave variable is in the entity configuration part, this didnt seem to work even changing it to 3 like the unit ID on my transfer switch. Then I tried Protocol Wizard again and this has “Slave ID” ( * Slave ID (usually 1)) as you setup the device. as soon as I changed this to 3 i was up and running getting good reads. Not sure how it all correlates, but my device shows 40002 as the first register, I had to put 1 as the address so 40002 = 1, 40003 = 2, 40004 = 3 ect ect. so thank you partach