node-zwave-js
node-zwave-js copied to clipboard
[Bug]: zwavejs2mqtt does not reconnect if the TCP (ser2net) serial port was drop
Checklist
- [X] I am not using Home Assistant. Or: a developer has told me to come here.
- [X] I have checked the troubleshooting section and my problem is not described there.
- [X] I have read the changelog and my problem is not mentioned there.
Deploy method
Docker
Zwavejs2Mqtt version
6.10.0
ZwaveJS version
9.3.0
Describe the bug
This is a similar issues as zwave-js/zwavejs2mqtt#1246. Once the TCP serial connection drop, it will nerve reconnect until manual restart zwavejs2mqtt or press the SAVE button in the setting menu (another method to restart) also make the TCP serial port reconnect.
I had tested with v4.3.1 and found the issues was resolved before. But it is happening again on v5.x.x and v6.x.x of zwavejs2mqtt again.
To Reproduce
- Connect the Z-Wave dongle via ser2net
- Stop ser2net
- Wait for the lost connection in zwavejs2mqtt
- Restart ser2net
Expected behavior
After 4., the TCP serial port connection should be auto-restored.
Additional context
No response
@dick902 Could you upload logs please? I need to see the errors that are thrown
@dick902 Could you upload logs please? I need to see the errors that are thrown zwavejs2mqtt_2022-05-26.log
Pls. find attached file as my log file in debug level. Log file seems show nothing about the TCP serial connection had interrupted. In the control panel at not showing anything the TCP serial connection had interrupted. In this log file, I had restart ser2net service at Line 11779, and the connection had broken here.
I think the problem so is that zwavejs ins't catching the close event or isn't reconnecting
@dick902 could you also upload zwavejs driver logs please?
cc @AlCalzone
I think the problem so is that zwavejs ins't catching the close event or isn't reconnecting
@dick902 could you also upload zwavejs driver logs please?
zwavejs_2022-05-26.log zwavejs2mqtt_2022-05-26.log
cc @AlCalzone
Pls. find attached files. Seems also not had anything related TCP serial disconnected
I'm seeing the same issue - everything works fine, ser2net machine restarts properly but zwavejs never notices it was gone so it never receives anything from the zwave-stick again. Maybe a periodic status-poll from the stick would be enough to trigger a tcp-closed and reconnect (ie. a keepalive function)?
We need to wait for @AlCalzone to come back from his parental leave in order to fix this
Having recently moved to a remote zwave stick I am experiencing this same issue. The last comment is that AlCalzone is away - do we know for how long and when this issue might be fixed?
👉🏻 https://github.com/zwave-js/node-zwave-js/issues/5129
is there any ETA on this one being looked at?