-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
[bug] zwavejs2mqtt does not reconnect if the serial port (TCP socket) is closed #1246
Comments
@AlCalzone Shouldn't the reconnection be handled by zwave-js once it comes back? |
The driver currently has no way of restarting itself. |
* fix: detect driver failed and restart Fixes #1246 * fix: error check Co-authored-by: AlCalzone <d.griesel@gmx.net> * fix: emit event before destroy Co-authored-by: AlCalzone <d.griesel@gmx.net>
@andyboeh Could you check with master? |
@robertsLando It does reconnect, but reports a bunch of errors about nodes added twice:
Afterwards, events from the devices are reported to Home Assistant, but aren't visible in the control panel or in the log file!? |
Thanks for the feedback @andyboeh will try to fix it in a new PR |
Thanks for the quick fix, much appreciated - I tested it again with the latest master docker container and it is working properly now! |
Great! Thanks for your feedback @andyboeh |
Version
Checklist:
Build/Run method
zwavejs2mqtt version: 4.3.0
zwave-js version: 7.5.0
Describe the bug
In #1167, a problem with detecting a dropped TCP socket connection to the serial device was reported and fixed in zwave-js/node-zwave-js#2601. However, the application needs to handle the lost connection. For now, the state is "Driver: The socket closed unexpectedly". IMHO, zwavejs2mqtt should try to auto-reconnect in this case, as the connection might become available (this could also be a configuration option, like auto-reconnect interval).
It finally reconnects if I go to Settings and click on "Save".
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After 4., the connection should be auto-restored.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: