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

Pad short uuid with 0's #274

Merged
merged 1 commit into from
Dec 28, 2022
Merged

Pad short uuid with 0's #274

merged 1 commit into from
Dec 28, 2022

Conversation

Jc2k
Copy link
Owner

@Jc2k Jc2k commented Dec 28, 2022

In CoAP we are seeing squished UUID's like 45E5011ECB4000A80FF2603DE. These need padding to 32 chars with leading 0 before normalising.

E.g. 45E5011ECB4000A80FF2603DE should become 00000004-5E50-11EC-B400-0A80FF2603DE.

Via https://community.home-assistant.io/t/homekit-accessory-protocol-hap-over-coap-udp-was-nanoleaf-essentials-bulb-via-thread-coap/335167/346?u=jc2k

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Base: 66.70% // Head: 66.70% // No change to project coverage 👍

Coverage data is based on head (a1fa41c) compared to base (c878746).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #274   +/-   ##
=======================================
  Coverage   66.70%   66.70%           
=======================================
  Files          71       71           
  Lines        6701     6701           
=======================================
  Hits         4470     4470           
  Misses       2231     2231           
Flag Coverage Δ
unittests 66.70% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohomekit/uuid.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Jc2k
Copy link
Owner Author

Jc2k commented Dec 28, 2022

@bdraco fairly small fix for a thread device I want to get into next beta tag, but shared function with ip and ble so thought I better give you a heads up.

@Jc2k Jc2k merged commit 82005eb into main Dec 28, 2022
@Jc2k Jc2k deleted the fix_uuid_padding branch December 28, 2022 23:24
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.

None yet

2 participants