Closed winfriedp closed 1 year ago
Declaring 2 modbus devices that connect to the same modbus hardware triggers 2 independent TCP connections.
A single modbus device supports multiple client connections. Can't the FHEM software connect to the same port as CCGX?
I think the following configuration should be enough:
devices:
- modbus:
url: 192.168.66.57:502 # solaredge inverter 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 for both FHEM and CCGX
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: DEBUG`
Thanks for your quick response. That was the solution. I misunderstood the configuration. With your config works my setup. I'm happy and thanks again!
Description
Two master clients (FHEM and CCGX) are to connect with the Solaredge inverter over modbus-proxy, but only one does. Either one or the other, but not both. One client connection results always in a ConnectionRefusedError. I have tried different combinations of connection_time and timeout values without success.
What I Did
This is my mproxy-conf.yaml:
Here the syslog output: