michbeck100 / pv-monitoring

Contains configuration and Grafana dashboard for monitoring PV inverters
Apache License 2.0
43 stars 11 forks source link

modbus-proxy timout #10

Closed rucksman closed 9 months ago

rucksman commented 9 months ago

Ich verwende aus Deinem Konstrukt nur den modbus-proxy. evcc läuft seit längerer Zeit eigenständig. Nun will ich - statt evcc direkt mit dem Wechselricher über Modbus sprechen zu lassen - den modbus-proxy vorschalten. Sprechen soll der Proxy mit einem Huawei Wechselrichter. Leider funktioniert es aber nicht. Ich bekomme immer ein timeout.

Nur der Vollständigkeit halber für die folgenden Ausgaben: Die 187 ist die IP Adresse des Servers, auf dem die Docker Container laufen, 225 ist der Wechselrichter.

Ausgabe des Proxy. 2023-11-25 14:50:30,683 ERROR modbus-proxy.ModBus(192.168.22.225:502): write_read error [1/2]: IncompleteReadError('0 bytes read on a total of 6 expected bytes') 2023-11-25 14:50:30,683 INFO modbus-proxy.ModBus(192.168.22.225:502): closing connection... 2023-11-25 14:50:30,684 INFO modbus-proxy.ModBus(192.168.22.225:502): connection closed 2023-11-25 14:50:30,684 INFO modbus-proxy.ModBus(192.168.22.225:502): connecting to modbus... 2023-11-25 14:50:30,709 INFO modbus-proxy.ModBus(192.168.22.225:502): connected! 2023-11-25 14:50:46,705 ERROR modbus-proxy.ModBus(192.168.22.225:502): write_read error [2/2]: IncompleteReadError('0 bytes read on a total of 6 expected bytes') 2023-11-25 14:50:46,706 INFO modbus-proxy.ModBus(192.168.22.225:502): closing connection... 2023-11-25 14:50:46,707 INFO modbus-proxy.ModBus(192.168.22.225:502): connection closed 2023-11-25 14:50:46,707 INFO modbus-proxy.Client(192.168.22..187:56830): closing connection... 2023-11-25 14:50:46,708 INFO modbus-proxy.ModBus(192.168.22.225:502): connecting to modbus... 2023-11-25 14:50:46,709 INFO modbus-proxy.Client(192.168.22.187:56830): connection closed 2023-11-25 14:50:46,732 INFO modbus-proxy.ModBus(192.168.22.225:502): connected!

Ausgave von evcc:

[site  ] ERROR 2023/11/25 15:50:14 battery 1 power: read failed: read tcp 192.168.22.187:48736->192.168.166.187:5020: i/o timeout
[site  ] ERROR 2023/11/25 15:50:30 battery 1 soc: read failed: read tcp 192.168.22.187:33972->192.168.166.187:5020: i/o timeout

Hattest Du das Problem auch, und wie hast Du das gelöst? Eine Idee? Ich habs direkt auch aus Node-Red versucht, aber auch hier immer ein timeout. die Verbindung des Proxy zum Wechselrichter funktionert aber offenbar. Nur nach dem Senden eines requests kommt sofort ein timeout.

michbeck100 commented 9 months ago

Ich kann leider keinen Support für modbus-Proxy selbst leisten. Das hier wäre das richtige Projekt für deine Frage: https://github.com/tiagocoutinho/modbus-proxy

Es kann auch sein dass evcc eine eigene Implementierung für deinen Wechselrichter nutzt. Vielleicht geht modbus TCP so einfach nicht.