-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hue] Implement Hue CLIP 2 #13456
Comments
Dead Code in API V1 Just to point out that the API V1 |
Status UpdateThis is to give a brief status update of what I have done so far..
Next StepsNext steps would be as follows..
|
^ I was originally planning to map the CLIP 2 DTO classes onto the old API v1 DTO classes (by having both classes implement the same 'tag' interface as described in the post above). BUT after much experimenting, and with much regret, I am forced to conclude that the old API v1 DTO classes were (sorry to say it) not well structured, and have also accumulated too much 'spaghetti code', so that this mapping approach is simply not a feasible solution. So instead I have written clean new DTO classes with clean new thing handlers for both the bridge and the things. |
Introduction
This issue is a place holder for the planned implementation of API v2 in the Hue binding.
Specifically it requires the following..
Dependency
Any PR arising from this issue will depend on #11842 being merged first.
Approach
I am tending to follow the same approach as I took with the HDPowerView API generation change as follows..
This allows the the OH facing parts of the binding to remain almost unchanged. And the V1 code would remain functionally unchanged too; although the actual code has to be split between the xxx base/abstract class, and the xxxV1 implementation class.
In the case of the HDPowerView migration, we have the good luck that the manufacturer chose to keep the V1 and V2 DTOs fairly similar, with many fields being common, and only a subset of fields having changed names and meanings. However in the case of the Hue migration, I can already see that the DTOs have changed MASSIVELY between V1 and V2, so I can already say that unlike the HDPowerView migration which I was able to write in a week or so, this Hue migration will certainly take a lot longer.
In any case, before I start writing code, I will first write a Class Structure diagram similar to the one I wrote for #12678 (comment) -- this should help to clarify if my above mentioned approach would work (or not)..
Constraints
Two requests from @lolodomo ..
Signed-off-by: Andrew Fiddian-Green [email protected]
The text was updated successfully, but these errors were encountered: