-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All ModbusTCP plugins don't update to a changed IP on the fly #82
Comments
Also where the monitor has been introduced already? |
Yes. Phoneixconnect seems to be the only one that is fixed already. |
The reason is that the generated ModbusTcpConnection classes take the IP in the ctor, so it's only set at startup. Anyhow, luckily the base class has a setAddress() method. It seems to be enough to connect the monitors networkInfoChanged signal to that one (and the already existing reconnect timer will then take care about calling connectToHost() again). |
https://github.com/nymea/nymea-plugins-modbus/blob/master/libnymea-modbus/modbustcpmaster.cpp#L119 If reachable changes in the monitor, i perform a reconnect after setting the IP in the base class, which triggers the connectDevice() method where all properties get updated before actually performing the connection. For example: https://github.com/nymea/nymea-plugins-modbus/blob/master/kostal/integrationpluginkostal.cpp#L322 Not getting what the phoenix connect is doing different? |
ok. right. fine for Kostal. Seems to be missing in alphainnotec and stiebeleltron now only.... |
yeah, we cannot test those currently... |
None of the ModbusTCP generator based plugins handle the case that a device changes IP address on the fly. They will stay disconnected until nymea is restarted.
The text was updated successfully, but these errors were encountered: