Skip to content
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

BMCT-SLZ: fix z2m crash if device is not reachable on startup #6806

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

slugzero
Copy link
Contributor

@slugzero slugzero commented Jan 2, 2024

I noticed that in some cases z2m crashes right after startup, which is caused by an uncaught exception when there is no route to the device. So we better catch everything.

@Koenkk
Copy link
Owner

Koenkk commented Jan 2, 2024

This shouldn't be necessary, can you provide the debug log of the crash?

See this on how to enable debug logging.

@slugzero
Copy link
Contributor Author

slugzero commented Jan 2, 2024

I agree, this should not be necessary. For other errors (UNSUPPORTED_ATTRIBUTE, MAC no ACK) the error was caught properly. If you'd like to dive deeper into this, I shared the full log privately: https://github.com/slugzero/z2m-logs/blob/main/z2m-20240102.log

However, for that particular device, I'd like to add these additional catch statements anyway: They also suppress some unnecessary error messages during configuring. Since the device must be configured to behave either as roller shutter or switch, one of the read commands always returns UNSUPPORTED_ATTRIBUTE.

@Koenkk Koenkk merged commit 4968ced into Koenkk:master Jan 2, 2024
2 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jan 2, 2024

I see, then this can be merged indeed!

@slugzero slugzero deleted the bmct-slz branch January 2, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants