I am testing HiveMQ Edge for a remote monitoring application. I have it polling a single MODBUS server. I noticed that if for any reason the modbus device re-starts or it looses network connectivity, the connection status in HMQ Edge shows disconnected and will never reconnect. Even though the modbus server is fully functioning and has re-established it’s network connection.
If I stop and re-start the HMQ Edge server, the connection is re-established.
Am I missing a setting that will alow for a connection to be automaticaly re-established?
Welcome to HiveMQ Community! This behavior can depend on specific configurations and the nature of the integration with your Modbus server. Could you clarify if the network disruptions or restarts of your Modbus device are typically short periods?
Did you try to increase the values of “Timeout” and “Max. Polling Errors” parameters? Maybe by increasing these parameters, you might reduce the need for manual restarts of the HiveMQ Edge server whenever there’s a temporary network issue or the Modbus device restarts.
Diego from HiveMQ Team
Yes, they are very short. I wanted to see how HMQ Edge responds to a communications loss with the MODBUS server so I disconencted the network cable from the modbus server then reconnected after a second or two. I also wanted to see what would happen if I power cycled the modbus server. The power cycle test took a little more time, 15 seconds.
Timeout = 5000ms
Max. Polling Errorrs = 10
Polling Interval = 1000ms
I increased Timeout to 15000ms but all this did was increase the time for the HMQ Edge server to send the protocal adapter into “error”.
The behavior I’m seeing though is that once the HMQ protocal adapter detects a problem and goes into “error”. It’s impossible to get the protocal adapter to re-connect to the modbus device without stopping and restarting the entire HMQ Edge server ( by restarting ./bin/run.sh). I’ve tried to use the stop and start commands from the protocal adapter pull down menu but those don’t seem to have any effect.
Hello @pridesleap ,
Thank you for the additional details here!
In order to review deeper the exact behavior of HiveMQ Edge during these periods of connection and disconnection, I would recommend reviewing the standard log outputs. These typically contain identifying details from the broker, citing what was occurring while these MODBUS connections are interrupted.
More specific details on the format of these logs, as well as additional customization options to dive deeper into the logs via logback configuration can be found on our HiveMQ Edge wiki here.
Aaron from the HiveMQ Team
I will investigate the log files and attach to this thread.