-
Notifications
You must be signed in to change notification settings - Fork 145
[DNM] Gree Integration rewrite #373
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
base: master
Are you sure you want to change the base?
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... |
|
@meirlo The thing is, at first glance, the subdevices API does not provide some of the parameters that you want (they came empty in the status pack, but it needs to be further investigated), so maybe the official app sends commands to both the subunit and the main unit when you change the mode on the subunit. If that's the case, it can actually be easier to make the subunits override the main one, or just omit the properties altogether. I just pushed a commit, please try it, and check if the main device can be discovered, added and it works. Ignore the subunits for a moment hehe |
|
This might need some architectural changes in the way we communicate with the device (possibly to communicate with the main and sub devices for getting and setting the status) |
|
@meirlo Another thing, in a VRF system all units are the same as the main one right? So the capabilities of them all are the same. |
|
I'm getting an error when trying to add the entity without the sub unit For the second question, the indoor units are not always identical. For example, my living room ac is a different one than the rest. Can you please elaborate which parameters are missing? |
|
@meirlo I'm having a hard time debugging the issue, sorry. Please try the latest version and provide the full debug log, not only the exception. |
…RF) in a config entry
|
I've been using this for some time now to control my AC without any problem. It would be nice to have more people trying out the latest commit to find bugs or missing features so this can be merged, including people with VRF. |
…key and version in the future
…lder for future review
|
I`ve installed your code, everything works- the 1-st is GEH18AAXF-K6DNA1 and the second is GWH12AVCXD-K6DNA1A. Both with FW 1.31. |
|
I tried your code as well but I am not able to connect the devices any longer. With the "original" version it worked fine. It says that it was not able to obtain the encryption key. The "original" code is capable of doing this (encryption version = 2). I also picked the encryption keys from the logs from the original version but it did not help. The devices are also no auto discovered anymore. None of the 3 devices is found. The original integration was able to find these but adding still required manual input. |
|
@chkr1011 Sorry, I didn't have much time lately to continue this code, apart from minor tweaks. Can you provide more information about your case, if it is the latest code, what kind of setup you have (normal or VRF), and if possible, the logs from the integration (enable debug mode before searching or adding a device). Hopefully, next month I'll be able to take a deeper look into the issues. |
|
Here is what I get when trying to discover the devices: To me this looks like that the integration is not trying encryption version 2 when auto discovering devices. The following log is from the manual config flow: For the manual config flow I filled IP, MAC, Encryption Version 2 and the Encryption Key as well. These were working properly with the original version. The device is a Vaillant Vai5. I don't know which regular gree model this is. But no VRF. |
|
@chkr1011 Thanks for the logs, will take a look when I can. I think the original code did discovery using V1 only and V2 was only used for binding/communicating, will investigate. |
|
I |
[DO NOT MERGE]
⚠️ATTENTION ⚠
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 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:
Other changes that are present in this PR:
I want full feature parity with the current integration and iron out some bugs before this is ready to merge (if you so wish). Currently missing and wishlist:
As you can see, there are a lot of changes, and I understand if this does not go through as is.
I am creating the PR mainly to gather feedback and track progress since most features are now present in this PR.
Don't treat this PR as blocking. I am tracking new changes and integrating them as they are committed.
Also, since this is a big rewrite, I wonder if we should use it to bump the major version (4?) and possibly change the domain to not replace the official integration (as I saw in the bug reports that it might impose some problems).