core: Modbus register 0 [Errno 104] Connection reset by peer - reopen
The problem
Reopen of issue #49749. I had reported this back in April; fixes had gone in, but in the mean-time I’d been running the old modbus integration from 2021.1.4 as a custom component. Today I had a chance to load up the current dev branch and do some testing. The issue still exists.
Once encountered the socket becomes closed and is never retried.
I have a development environment loaded up and will work on debugging this issue and create a PR. Please assign to me.
What is version of Home Assistant Core has the issue?
2021.7.1
What was the last working version of Home Assistant Core?
2021.1.4
What type of installation are you running?
Home Assistant Container
Integration causing the issue
modbus
Link to integration documentation on our website
https://www.home-assistant.io/integrations/modbus/
Example YAML snippet
modbus:
name: hub1
type: tcp
host: 192.168.1.5
port: 502
sensors:
- name: OldWell
scan_interval: 10
unit_of_measurement: Amp
address: 0
data_type: uint
scale: 0.00061036
offset: -20
precision: 3
input_type: input
- name: NewWell
unit_of_measurement: Amp
address: 1
data_type: uint
scale: 0.00061036
offset: -20
precision: 3
input_type: input
Anything in the logs that might be useful for us?
2021-07-08 06:36:21 DEBUG (SyncWorker_0) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-07-08 06:36:21 ERROR (SyncWorker_0) [homeassistant.components.modbus.modbus] Pymodbus: Modbus Error: [Input/Output] [Errno 104] Connection reset by peer
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (12 by maintainers)
I changed the scan intervals to 3 seconds and 7 seconds to avoid the scans happening at the same time all the time, and I have not encountered the error yet. Though I expect it to eventually happen. I’m going to have to give this a break for the day 😃.