Hello
I have problems to configure the AddOn Modbus Proxy.
I have 2 Devices, which are connected to HA over modbus-TCP:
- Solvis Heatpump
- Sungrow Inverter with battery
I see from both the values, but sometime, i have errors in my log about modbus
Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:403
Integration: Modbus (documentation, issues)
First occurred: 16:47:40 (442 occurrences)
Last logged: 18:02:03
Pymodbus: SungrowSHx: Modbus Error: [Input/Output] [Errno 32] Broken pipe
Pymodbus: SungrowSHx: Modbus Error: [Input/Output] [Errno 104] Connection reset by peer
Pymodbus: solvisremote: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
I I thought the Modbus Proxy is the Solution. There is in the Configuration one entry “upstreamhost”. Is it the IP from my HA or from one Modbus-Slave (so I understand some discussion).
If it is my HA, what is the way, that the Proxy works?
upstreamhost: 192.168.178.56
upstreamport: 502
listenport: 502
connection_time: 0.1
timeout: 10
loglevel: INFO
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Preparing to run modbus-proxy
Upstream: 192.168.178.56:502
Listen: 502
Timeout: 10
Connection Time: 0.1
Loglevel: INFO
Generated Config
devices:
- modbus:
url: 192.168.178.56:502 # device url (mandatory)
timeout: 10 # communication timeout (s) (optional, default: 10)
connection_time: 0.1 # delay after connection (s) (optional, default: 0)
listen:
bind: 0:502 # listening address (mandatory)
logging:
version: 1
formatters:
standard:
format: "%(asctime)s %(levelname)8s %(name)s: %(message)s"
handlers:
console:
class: logging.StreamHandler
formatter: standard
root:
handlers: ['console']
level: INFO
2023-06-11 18:12:23,853 INFO modbus-proxy: Starting...
2023-06-11 18:12:23,857 INFO modbus-proxy.ModBus(192.168.178.56:502): Ready to accept requests on 0:502
Thank you for your help.