-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Support GCM encryption for Gree devices #92
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #92 +/- ##
==========================================
+ Coverage 94.93% 95.74% +0.81%
==========================================
Files 7 8 +1
Lines 651 729 +78
==========================================
+ Hits 618 698 +80
+ Misses 33 31 -2 ☔ View full report in Codecov by Sentry. |
Tests do not pass yet though...
@engrbm87 Are you comfortable to test this branch with your HA to confirm? While I have a bit more work to do for tests to pass, I think this should be functional now. |
Nice work, I noticed one thing still missing. The initial binding timeout. It is still waiting for 120 seconds. Another thing I noticed in the bind function, you have included the cipher_type attribute. Can I know the use for this attribute. If I understand correctly, the binding process that happens during discovery will attempt both Cipher versions and store the one that works. |
Hi! I was doing some work to include GCM encryption support and I see here it almost done (and much better implemented). |
Testing this PR if you are up for it please. Otherwise I will aim to finish up and merge this week. |
Yup, wanted to get the cipher stuff out of the way, I'll look at this ridiculous timeout in the next day or two. |
Co-authored-by: Rami Mousleh <[email protected]>
@engrbm87 @angelitoo776 I'm getting ready to release this into main, perhaps you could do some quick testing and confirm. The bind timeout for V2 has been adjusted down to 10 seconds now too. |
Hello @cmroche , thanks for the updated bind timeout. One thing I noticed during testing is that the |
This is by design. The goal is to stop the lock-step approach to device comms over the socket. Since networking is inherently unreliable this should lead to a more robust overall design. That said, the issue is one I have not seen likely because of my ideal network conditions. BUT, I think it would be reasonable to mark the device as unavailable until the first state update, or to block in the binding process until there is an initial state. |
@engrbm87 Does the negative temperature resolve itself once an update is received, or is it persistent? I believe it should resolve once the update comes in, since the correction is computed on the incoming state update from the device. |
I just noticed PR# 121041. I updated my test component based on that and now the temperatures are showing correct. I still think the coordinator should wait until the response is processed during initial setup. |
# [2.1.0](v2.0.0...v2.1.0) (2024-08-05) ### Features * Support GCM encryption for Gree devices ([#92](#92)) ([7122cdd](7122cdd))
🎉 This PR is included in version 2.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Adds support for GCM encryption used on some (newer) Gree devices. Since it's not clear yet how to identify these devices by their announce information, the older AES ECB key will be tried first, then attempt the AES GCM key.
Changes: