Hi,
I’m new with HA, so I’m still learing it but step by step is going better now I have an issue and I stuck on it.
I have home server on Ubuntu, with VirtualBox for HAOS, into the server I have connected USB → RS485 converter which hostOS recognized like /dev/ttyUSB0, and I can connect with my device without any issue there. I have share /dev/ttyUSB0 into the VM with HA, and now in HA I can see it like /dev/ttyS0 (as host OS recognized it like ttyUSB0, I can share only it like a ttyS0 - I can’t share USB with HA).
In HA I added configuration like that:
configuration
modbus:
- name: reku
type: serial
baudrate: 9600
bytesize: 8
method: rtu
parity: N
port: /dev/ttyS0
stopbits: 1
message_wait_milliseconds: 30
sensors:- name: “Temperatura Czerpnia”
slave: 10
address: 16
input_type: input
scan_interval: 60
unit_of_measurement: °C
scale: 0.1
precision: 1 - name: “Temperatura Nawiew”
slave: 10
address: 17
input_type: input
scan_interval: 60
unit_of_measurement: °C
scale: 0.1
precision: 1 - name: “Temperatura Wywiew”
slave: 10
address: 18
input_type: input
scan_interval: 60
unit_of_measurement: °C
scale: 0.1
precision: 1 - name: “Temperatura za FPX”
slave: 10
address: 19
input_type: input
scan_interval: 60
unit_of_measurement: °C
scale: 0.1
precision: 1 - name: “Temperatura PCB”
slave: 10
address: 22
input_type: input
scan_interval: 60
unit_of_measurement: °C
scale: 0.1
precision: 1 - name: “Strumień nawiew”
slave: 10
address: 256
input_type: holding
scan_interval: 60
unit_of_measurement: m3/h
scale: 1
precision: 1 - name: “Strumień wywiew”
slave: 10
address: 257
input_type: holding
scan_interval: 60
unit_of_measurement: m3/h
scale: 1
precision: 1
- name: “Temperatura Czerpnia”
HA can communicate with device but it is almost not full communication - some data are lost and then in sensor it has status “unavailable”.
In the next minute some other values are “unavailable”, etc.
Log of HA:
logs
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Temperatura Czerpnia with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Temperatura Nawiew with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Temperatura Wywiew with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Temperatura za FPX with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Temperatura PCB with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Strumień nawiew with int is not valid, trying to convert
2022-01-06 14:36:07 WARNING (MainThread) [homeassistant.components.modbus.validators] Strumień wywiew with int is not valid, trying to convert
2022-01-06 14:36:08 ERROR (SyncWorker_0) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2022-01-06 14:36:13 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
2022-01-06 14:37:11 ERROR (SyncWorker_2) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:38:10 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:38:23 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
2022-01-06 14:39:13 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
2022-01-06 14:39:20 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:41:10 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:41:15 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
2022-01-06 14:43:07 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:44:10 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
2022-01-06 14:45:10 ERROR (SyncWorker_2) [homeassistant.components.modbus.modbus] Pymodbus: reku: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
I’m sure that the connection hostOS > device is working fully ok, I’m not sure about hostOS > VM sharing the COM port, but in other VM that way of sharing this port is working so it shouldn’t be an issue here too.
I tried to change message_wait_milliseconds (or remove - use default) and scan_interval (use different interval for different values, and etc), nothing help.
What did I wrong?