-
Notifications
You must be signed in to change notification settings - Fork 279
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
Support V2 API in Hue Essentials #1015
Comments
Hue Essentials 3.0 will use the V1 API with diyHue for now. Only gradient light control in the colour picker and entertainment will use V2 API (and unsupported on remote API). All the other parts of the app still use V1 API. Other V2 functionality will not work until this issue is resolved. Once resolved, I can enable the V2 API in Hue Essentials for diyHue after testing. |
Was closed automatically due to GitHub linking it to a (private) commit of mine. But this is still an issue. |
Hi Thomas, To understand correctly i need to clone the "bridge" part from here https://github.com/diyhue/diyHue/blob/master/RemoteApi/remoteApiServer.py#L79-L89 and change these:
|
@Thomas-Vos i implemented something:
only concern i have is why for '/bridge" i route to "api" and not to "/api". I decided to route "/route/" to "/", hope this is ok. |
Feature does not already exist?
I searched and did not find an existing feature request
Summarize feature
Before Hue Essentials can (primarily) use the V2 API, there need to be some changes to diyHue:
The Remote API in diyHue does not support the V2 API. This is due to the current URL endpoint
https://remote.diyhue.org/bridge/
which forces to use the V1 API because locally it is/api/
.To fix this, an additional URL endpoint needs to be added:
https://remote.diyhue.org/route/
This endpoint should locally be
/
. Which means Hue Essentials can use this URL like these examples:https://remote.diyhue.org/route/api/1234
https://remote.diyhue.org/route/clip/v2/
(withhue-application-key
header)Do not remove the
/bridge/
endpoint as Hue Essentials is still using it. This is all in line with the Hue API, only difference is the diyhue.org host.In the v1 api of diyHue, the endpoint
/config
contains two keys in the JSON object:Hue Essentials key
andRemote API enabled
. Hue Essentials uses these two keys to identify that this is a diyHue bridge, and also uses them for the remote api authentication.These need to be added to the v2 API so Hue Essentials does not need to load the V1 API everytime. I would suggest adding them to a special
/resource/diyhue
object. Preferably this would work the same as any other object, which means it is also returned on a call to/resource
.When these features are completed, I can enable the V2 API in Hue Essentials for diyHue. I really need to migrate the app to v2 as Philips Hue does not add anything to the V1 API anymore. To keep diyHue in line with the official hue api, this would be a nice addition.
The text was updated successfully, but these errors were encountered: