MODBUS: unable to read binary sensor value, entity status not available

Hi everyone, I need help to solve a problem regarding the reading of the sensor value of the modbus iologik moxa e2210 device.
The input is binary and I can read its value using software such as ‘AV reporter modbus communication tester’, but when I try to load the sensor in home assistant, the associated entity is always “not available”.
I attach configuration.yaml and iologik moxa table.
Thanks everyone for the help.

configuration.yaml

 binary_sensor:    
  - platform: modbus
    scan_interval: 10
    inputs:
      - name: test
        hub: moxaorto
        slave: 1
        address: 10001
        input_type: coil

I’m watching to debug log for modbus and everything looks ok…
So, why isn’t the correct status reported on the home assistant dashboard?

2021-01-27 09:50:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=binary_sensor.test, old_state=<state binary_sensor.test=off; friendly_name=test @ 2021-01-27T09:50:16.823159+01:00>, new_state=<state binary_sensor.test=unavailable; friendly_name=test @ 2021-01-27T09:50:26.834605+01:00>>
2021-01-27 09:50:26 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140516954943552] Sending {"id": 2, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "binary_sensor.test", "old_state": {"entity_id": "binary_sensor.test", "state": "off", "attributes": {"friendly_name": "test"}, "last_changed": "2021-01-27T08:50:16.823159+00:00", "last_updated": "2021-01-27T08:50:16.823159+00:00", "context": {"id": "5aaeca969388b3a6b290872b107ecfc6", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "binary_sensor.test", "state": "unavailable", "attributes": {"friendly_name": "test"}, "last_changed": "2021-01-27T08:50:26.834605+00:00", "last_updated": "2021-01-27T08:50:26.834605+00:00", "context": {"id": "f723a97fecc28155efece223d624a7f6", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2021-01-27T08:50:26.834605+00:00", "context": {"id": "f723a97fecc28155efece223d624a7f6", "parent_id": null, "user_id": null}}}
2021-01-27 09:50:26 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [140516873991072] Sending {"id": 16, "type": "event", "event": {"event_type": "state_changed", "data": {"entity_id": "binary_sensor.test", "old_state": {"entity_id": "binary_sensor.test", "state": "off", "attributes": {"friendly_name": "test"}, "last_changed": "2021-01-27T08:50:16.823159+00:00", "last_updated": "2021-01-27T08:50:16.823159+00:00", "context": {"id": "5aaeca969388b3a6b290872b107ecfc6", "parent_id": null, "user_id": null}}, "new_state": {"entity_id": "binary_sensor.test", "state": "unavailable", "attributes": {"friendly_name": "test"}, "last_changed": "2021-01-27T08:50:26.834605+00:00", "last_updated": "2021-01-27T08:50:26.834605+00:00", "context": {"id": "f723a97fecc28155efece223d624a7f6", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2021-01-27T08:50:26.834605+00:00", "context": {"id": "f723a97fecc28155efece223d624a7f6", "parent_id": null, "user_id": null}}}
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Running transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x1 0x0 0x1
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] RECV: 0x0 0x2 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.framer.socket_framer] Processing: 0x0 0x2 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.factory] Factory Response[ReadCoilsResponse: 1]
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Adding transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Getting transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Current transaction state - IDLE
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Running transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x5 0x0 0x1
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] RECV: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.framer.socket_framer] Processing: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.factory] Factory Response[ReadCoilsResponse: 1]
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Adding transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Getting transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_1) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Current transaction state - IDLE
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Running transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x5 0x0 0x1
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] RECV: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.framer.socket_framer] Processing: 0x0 0x1 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.factory] Factory Response[ReadCoilsResponse: 1]
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Adding transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Getting transaction 1
2021-01-27 09:50:26 DEBUG (SyncWorker_4) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Current transaction state - TRANSACTION_COMPLETE
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Running transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x1 0x0 0x5 0x0 0x1
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] RECV: 0x0 0x2 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.framer.socket_framer] Processing: 0x0 0x2 0x0 0x0 0x0 0x4 0x1 0x1 0x1 0x0
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.factory] Factory Response[ReadCoilsResponse: 1]
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Adding transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Getting transaction 2
2021-01-27 09:50:26 DEBUG (SyncWorker_3) [pymodbus.transaction] Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMP

I take it you are trying to read the top value of that table? (CH0)

have you tried

address: 0

The address is 0 and not the reference of 10001

Yes, you’re right.
Your suggestion was the first config i deployed; in that case i had no availability error but the status of sensor never change, it’s always off even if the input is on (1).
Here is the link for user’s manual iologik moxa

Tried several time with different combination of input strings but nothing, i can’t get the input status in home assistant. Please help me.

I have the same issue. I can read it as a normal sensor. But when I want to read is as a binary sensor the sensor is unavailable. Did you mange to fix this?