[DNM] Gree Integration rewrite#373
Conversation
- Change config flow to: be multi step and allow setting the device features; allow to reconfigure an entry - Separate HA and Device API logic: device API is now declarative and handles device behaviour. HA entities expose the device - Implement a coordinator - Async device communication - More error handling
- Move consts around - Proper error report on config_flow - Proper translations on config_flow - Configuration of timeout - Fetch device info during binding
|
@RobHofmann I was adding the temperature step back, but I'm not sure of its utility. |
|
@p-monteiro |
|
Hi @domialex, that's fine. I'm more interested in the real use case for it. Should it be locked to integers? I don't think any device supports half degrees or even 0.1 steps, as is the lower limit for the current slider... |
|
@ChillingSilence, Your device doesn't really want to play along with the fetch_device_info() for getting the firmware version, etc. I allow binding to occur even with an error in fetch info; let's see if the binding fails now. Please try again in alpha.81 and provide the log, even if the bind is successful |
|
@p-monteiro Hope this helps, using 5e3c35f, tried auto-add, then manually adding with IP+MAC, then manually specifying the encryption key on Auto Encryption Version. |
|
That's some really odd behaviour there @ChillingSilence. Just so we are on the same page:
|
|
@ChillingSilence ahh, alright. I was under the assumption it was working in the "master" version, and I was actually losing my head, because nothing is functionally different here. So if that is not the case, we shall move to another kind of troubleshooting. I'm not sure the device information is very useful for Gree. I have the same model ID and version as you. However, my firmware is in the range v1.XX and yours is at v3.XX Netcat shows no output, correct? Or does it error? I think I read somewhere that Gree uses MQTT in some units, so maybe newer firmwares dropped the legacy UDP protocol we are using here. I will dig around. Can you send the complete model of your indoor unit? |
|
Ahh my apologies @p-monteiro I had only just tried it now with the master version so didn't know it wasn't behaving there otherwise. My bad. Netcat shows now output, correct. No errors, just, nothing. I have 2x Gree Kingfisher GWH24ATEXF units. I can confirm they work on the WiFi, and I can disconnect my phone to use 4G and still control them... So they're talking somehow. I wonder if I can packet capture from the router 🤔 |
|
@ChillingSilence, packet capture would be the best way if you actually know how to do it. I'm not good at it. |
|
It looks like it's still doing stuff on UDP port 7000? All the five packets are pretty much the same Is this helpful as a starting point thought @p-monteiro ? |
|
@ChillingSilence It's performing the normal Also, I would prefer not to pollute this PR with this since it is unrelated to it. Open a new issue, and we can continue discussing there. |
Adds a binary sensor that shows if there is a fault reported by the device
|
@RobHofmann I'm down to get this merged into a different branch and published as an alpha/beta version. Fixes can then be made against that. I'll let you decide whatever you deem fit for the project. Remember, this is a breaking update. Refer to the original PR message (#373 (comment)) |
This workflow uses the version from the manifest to automatically create a tag and a release. Also prevents two consecutive releases with the same version
Use proper types V2 decrypt and verify combined Debug trimmed garbage (may be useful)



Caution
This PR changes the domain of the integration, so current users will lose their device configs!
The config schema also changed, so verify your YAML if you use it to configure the devices.
This no longer overwrites the official integration.
This PR introduces a rewrite of this integration. The main goal of this was to better align the integration with the Home Assistant (HA) development workflow with two main changes:
Breaking changes
Features
DataUpdateCoordinatorGreeDeviceabstraction for device logicRestoreEntitysupport inClimateEntityImprovements
Fixes
Known problems:
As you can see, there are a lot of changes, and I understand if this does not go through as is.