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

Don't consume data when processing Device_annce message. #42

Merged
merged 1 commit into from
Jun 12, 2019

Conversation

Adminiuga
Copy link
Collaborator

When receiving ZDO Device Announcement message (ZDO req 0x0013) leave data intact to allow successful deserialization later, since latest changes in Zigpy we enforce strict data length for proper deserialization.
Here's an example of the error:

2019-06-11 21:47:07 INFO (MainThread) [zigpy_deconz.zigbee.application] New device joined: 0x9ce9, f0:d1:b8:00:00:05:13:93
2019-06-11 21:47:07 INFO (MainThread) [zigpy.application] Device 0x9ce9 (f0:d1:b8:00:00:05:13:93) joined the network
2019-06-11 21:47:07 DEBUG (MainThread) [zigpy.application] Skip initialization for existing device f0:d1:b8:00:00:05:13:93
2019-06-11 21:47:07 ERROR (MainThread) [zigpy_deconz.zigbee.application] Failed to parse message (b'9313050000b8d1f08e') on cluster 19, because Data is too short to contain 1 bytes

as you can see in b'9313050000b8d1f08e' it has only the IEEE 9313050000b8d1f0 and capability bitmap 8e, but misses NWK since it was consumed earlier, so the whole deserialization fails.

@Adminiuga Adminiuga requested a review from damarco June 12, 2019 02:03
@damarco damarco merged commit 5f616d9 into zigpy:master Jun 12, 2019
@Adminiuga Adminiuga deleted the fixes/device-annce-deser branch June 21, 2019 16:03
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