-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Everything unavailable when z2m restarts/crashes #87
Comments
I have now tried so several things, but do not get this behavior readjusted, then z2m always sends all available states on a new connection.
The websocket connection is completely reinitialized, as with an adapter restart, that would make no difference.
No this is only because I suppress the log when an adapter is running and reconnects. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
I assume from your other issues (#148) that you are using the MQTT connection type here. |
I have not been able to get a good log for this, but I'm still confident it has something to do with the websocket connection reconnecting. All the other devices have the same available timestamp as this light, which is roughly 10 seconds after websocket reconnected. Here's a log with the time range https://pastebin.com/XNcRB09a |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Issue still persists. |
Sorry, but no matter what I try, I do not get the problem readjusted. |
What else I could offer is the connection via mqtt, can you test that? |
Yes, I was just thinking about that yesterday evening. |
I get a message for each change of availability on my Zigbee devices. |
What does a message like this look like? I could not find one in my logs. |
I get errors via MQTT. |
Ok... that was of course not with me. |
I looked at the log, but what's totally weird is that it's banging at the JSON.Pars() in the websocket even though you have MQTT enabled?!
Can you test the current git version? |
@Eistee82 are you by any chance online in Discord today? |
I have already found you ;) |
I want to try this later. Does the PR mean it's fixed? |
No, the PR was for the problem of @Eistee82 |
I've been using 2.10.1 for a few days now and the issue has since been resolved using mqtt instead of websocket. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
What happened?
It looks like z2m crashed and restarted. When this happens every device is marked as unavailable and only sometimes return to available.
What did you expect to happen?
Maybe it makes more sense to automatically restart the adapter when there's a connection loss instead of endlessly trying to reconnect?
Also as you can see in the third screenshot of the logs it seems like iobroker.zigbee2mqtt behaves different than a restart when the connection ist lost which seems to be the reason the devices do not always turn back to being available.
How to reproduce it (minimal and precise)
Wait for z2m to restart for example be connection loss of the adapter.
Adapter version
2.4.4
Log
Disconnect:
Eventually z2m works again and iobroker.zigbee2mqtt reconnects:
This is what it looks like when manually restarting iobroker.zigbee2mqtt:
The text was updated successfully, but these errors were encountered: