-
Notifications
You must be signed in to change notification settings - Fork 103
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
Obtaining a key for devices alternative method #71
Comments
Please check this: #64 (comment) |
I think users are confused and try to extract the encryption key from their mobile devices even if they currently don't have to I think the readme file is misleading. Please find the proposed changes to the file in order to avoid customer confusion. This would also solve RobHofmann#64 RobHofmann#69 RobHofmann#71 . Best Regards ;]
I think users are confused and try to extract the encryption key from their mobile devices even if they currently don't have to I think the readme file is misleading. Please find the proposed changes to the file in order to avoid customer confusion. This would also solve #64 #69 #71 . Best Regards ;]
hey. it seems this is a much simpler method to get the required parameters without debugging via adb. |
Thank You! |
Hey, it looks like this solution doesn't work anymore, or I'm having some other issue. When I use above python script it looks like this:
It's strange cause as you can see devices have been detected but without their names and then there is some problem with the script. I'm using Sinclair AC. Gree+/EWPE apps works fine. In HA logs we can see some weird issues:
Does anyone have a similar problem? |
Are you sure your connection is alright? You are getting a timeout to both the HVAC as to GitHub. |
There is another version of encryption #165 |
Thank you guys, I can confirm that this solution is working for me. |
solved, can be closed |
I have 2 Inventor ACs with CS532AE modules.
Both modules were synced with the Gree+ app. In fact it is the same app as Ewpe app.
Tried to obtain keys using the adb backup, but faced issues with an empty backup.
Then tried to access SQLite db on a rooted device and couldn't connect to it.
After that i tried a logcat method from Post
It worked just fine with latest app version available at this moment (1.8.3.10).
But after getting the key, component was still failing with this error:
I was really disappointed and started trying everything until I get any response from module.
As an alternative way I decided to test it outside of home assistant.
For that I used the python script from referenced repository
https://github.com/tomikaa87/gree-remote
It requires https://pypi.org/project/cryptography/ to be installed (it was a bit tricky for me)
after that I just navigated to the folder contained this script and executed it with the following parameters :
python gree_test.py -b 192.168.1.255 -command search -k %key_from_logcat %
and got the following result:
As you can see - it provided 2 different keys for 2 ACs
First AC I connected to app had the same key in script output as the key I got from the logcat
Second AC had a different key.
My Issue was that I started configuring using the second AC and it's key in fact was different.
More interesting below )))
If I run this script even without providing the key, it still gives me the same output as above.
python gree_test.py -b 192.168.1.255 -command search
I don't know, maybe it is related to my modules or to firmware version, but it looks like it is possible to get keys without hacking Android app.
Needs to be tested on other devices.
Small Update.
I was able to reproduce this error again just by changing one character in a key.
It looks like it is related to wrong key value and has nothing common with mac address formatting.
For one AC I have mac address in the following format : 'FF:FF:FF:FF:FF:FF' (uppercase in single quotes )
for the second it have ff:ff:ff:ff:ff:ff (lowercase no quotes) both are working without issues.
The text was updated successfully, but these errors were encountered: