-
Notifications
You must be signed in to change notification settings - Fork 113
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
Issue getting device encryption key! #220
Comments
Had the same issue, didn't have the key. Thought it was a long shot and added: encryption_version:2 To the climate.yaml and BOOOM works now! I see you already have that in your climate.yaml, so won't solve your issue but still, I'll leave this comment here, might help someone else who has encryption key issues |
most likely this problems |
I read your issue and it does seem similar, however I previously had this device connected and working. It just stopped functioning after a few days, and now won't connect at all. |
I just wanted to thank you for this because my Gree integration stopped working after updating the firmware of my Gree unit. I thought the encryption key had been reset and was having the hardest time trying to figure out what the new key was but it turns out the old key still worked, I just needed to add "encryption_version: 2" to my climate.yaml for that unit. |
thank you ! this should be added in the doc! i just installed mine and it works without anything else! thank you! |
Same problem here with any
|
same here, new unit, new wifi module very likely:
climate.yaml:
|
Ok rewriting this post. I had the same issue as you and solved it. So everything worked and then all of a sudden 2 AC's didnt work anymore (the 3rd kept working). Turned out that this was due to those 2 AC's connecting to my RE230 TPlink wifi extender. What happened is that the extender spoofed the MAC addresses, so it changed the addresses from C0:39:37:XX:XX:XX (which indeed is a GREE MAC address https://macaddress.io/macaddress/C0:39:37) to 46:e0:6d:XX:XX:XX. So once I updated the info in the climate.yaml it all worked again. So you just need to make sure that the AC's don't connect to a wifi extender that spoofs the MAC, or at least make sure that they ONLY connect to that extender and not directly to the router (getting a different mac address). So use different SSID's to make sure the AC is not switching every time between router and extender and thus also switching MAC addresses. So to be clear, I had assigned the MAC addresses to a static DHCP address in the router but since the TPLINK extender changed the MAC addresses, the router didn't bind them anymore to the 'static' IP I gave them and thus the IP's changed too.... And of course if the device is not anymore on the same IP as in the yaml file it won't work anymore. Hopefully this helps somebody else too. So 1) make sure that the AC is still on the same IP as specified in your climate.yaml and if that's not the case then 2) make sure that you gave your AC a 'static' DHCP address in your router and that 3) the MAC address wasn't changed by for example a wifi extender. |
Interesting. I too am running tp-link hardware. My base station is in the house and out in the workshop is the wireless access point with a different ssid than the house. I will have to check to see if the Mac is being spoofed by the AP, or if it is trying to do something stupid like double NAT for those wireless devices in the same network range. |
Describe the bug
When attempting to connect to my unit, I am getting an error message in the debug logs that it was unable to get device encryption key. As a result, none of the features for the AC refresh to show status or allow me to change modes / temps / etc.
This was previously working and stopped with a recent update.
Configuration
name: First AC
host: 192.168.1.168
port: 7000
mac: "F4:91:1E:F8:49:35"
target_temp_step: 1
encryption_version: 2
uid: 1000116
temp_sensor: sensor.shop_temperature
lights: input_boolean.first_ac_lights
xfan: input_boolean.first_ac_xfan
health: input_boolean.first_ac_health
sleep: input_boolean.first_ac_sleep
powersave: input_boolean.first_ac_powersave
eightdegheat: input_boolean.first_ac_eightdegheat
air: input_boolean.first_ac_air
max_online_attempts: 1
disable_available_check: true
Platform:
Logs
2024-11-14 10:27:55.763 INFO (MainThread) [custom_components.gree.climate] should_poll()
2024-11-14 10:27:55.764 INFO (SyncWorker_4) [custom_components.gree.climate] update()
2024-11-14 10:27:55.764 INFO (SyncWorker_4) [custom_components.gree.climate] Retrieving HVAC encryption key
2024-11-14 10:27:55.765 INFO (SyncWorker_4) [custom_components.gree.climate] Fetching(192.168.1.168, 7000, 10, {"cid": "app","i": 1,"pack": "Jtod3XIt89K1stGOa2REUoInsM4W2wr1NUZ4HfiGx6vTLC8J2Uxne8WksqHCUsiK2rKjB4SjLqJU+JiIKaCQlK3d2AW+f1R7bQ==","t":"pack","tcid":"f4-91-1e-f8-49-35","uid": 0, "tag" : "la9S5mDBzjhaPo2m4Obvxw=="})
2024-11-14 10:27:55.765 INFO (SyncWorker_4) [custom_components.gree.climate] 3
2024-11-14 10:28:03.772 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:28:03.773 INFO (SyncWorker_11) [custom_components.gree.climate] set_hvac_mode(): heat
2024-11-14 10:28:03.773 INFO (SyncWorker_11) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:28:03.773 INFO (SyncWorker_11) [custom_components.gree.climate] Starting SyncState
2024-11-14 10:28:03.774 INFO (SyncWorker_11) [custom_components.gree.climate] Could not connect with device.
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): off
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:03.774 INFO (MainThread) [custom_components.gree.climate] current_temperature(): None
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] target_temperature(): None
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] fan_mode(): None
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] swing_mode(): None
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] name(): First AC
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] should_poll()
2024-11-14 10:28:03.775 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): off
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] current_temperature(): None
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] target_temperature(): None
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] fan_mode(): None
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] swing_mode(): None
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] name(): First AC
2024-11-14 10:28:03.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:05.775 INFO (SyncWorker_4) [custom_components.gree.climate] Error getting device encryption key!
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): off
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] current_temperature(): None
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] target_temperature(): None
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] fan_mode(): None
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] swing_mode(): None
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] name(): First AC
2024-11-14 10:28:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
CONTINUED:
2024-11-14 10:28:55.764 INFO (MainThread) [custom_components.gree.climate] should_poll()
2024-11-14 10:28:55.765 INFO (SyncWorker_12) [custom_components.gree.climate] update()
2024-11-14 10:28:55.765 INFO (SyncWorker_12) [custom_components.gree.climate] Retrieving HVAC encryption key
2024-11-14 10:28:55.765 INFO (SyncWorker_12) [custom_components.gree.climate] Fetching(192.168.1.168, 7000, 10, {"cid": "app","i": 1,"pack": "Jtod3XIt89K1stGOa2REUoInsM4W2wr1NUZ4HfiGx6vTLC8J2Uxne8WksqHCUsiK2rKjB4SjLqJU+JiIKaCQlK3d2AW+f1R7bQ==","t":"pack","tcid":"f4-91-1e-f8-49-35","uid": 0, "tag" : "la9S5mDBzjhaPo2m4Obvxw=="})
2024-11-14 10:28:55.766 INFO (SyncWorker_12) [custom_components.gree.climate] 3
2024-11-14 10:29:05.775 INFO (SyncWorker_12) [custom_components.gree.climate] Error getting device encryption key!
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] hvac_modes(): [<HVACMode.AUTO: 'auto'>, <HVACMode.COOL: 'cool'>, <HVACMode.DRY: 'dry'>, <HVACMode.FAN_ONLY: 'fan_only'>, <HVACMode.HEAT: 'heat'>, <HVACMode.OFF: 'off'>]
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] min_temp(): 16
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] max_temp(): 30
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] target_temperature_step(): 1.0
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] fan_list(): ['Auto', 'Low', 'Medium-Low', 'Medium', 'Medium-High', 'High', 'Turbo', 'Quiet']
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] swing_modes(): ['Default', 'Swing in full range', 'Fixed in the upmost position', 'Fixed in the middle-up position', 'Fixed in the middle position', 'Fixed in the middle-low position', 'Fixed in the lowest position', 'Swing in the downmost region', 'Swing in the middle-low region', 'Swing in the middle region', 'Swing in the middle-up region', 'Swing in the upmost region']
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] hvac_mode(): off
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] temperature_unit(): °C
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] current_temperature(): None
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] target_temperature(): None
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] fan_mode(): None
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] swing_mode(): None
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] name(): First AC
2024-11-14 10:29:05.776 INFO (MainThread) [custom_components.gree.climate] supported_features(): 425
The text was updated successfully, but these errors were encountered: