Skip to content
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

Group "0" Not Properly Reported When Queried #172

Closed
shbatm opened this issue Feb 12, 2018 · 6 comments
Closed

Group "0" Not Properly Reported When Queried #172

shbatm opened this issue Feb 12, 2018 · 6 comments

Comments

@shbatm
Copy link
Contributor

shbatm commented Feb 12, 2018

Group "0" is a special group which contains all of the Hue lights attached to a particular bridge. It does not show up when you query /api/username/groups but does report out if you query /api/username/groups/0:

{"name":"Group 0","lights":["1","2","3","4"],"type":"LightGroup","state":{"all_on":false,"any_on":false},"recycle":false,"action":{"on":false,"bri":254,"hue":47258,"sat":253,"effect":"none","xy":[0.1424,0.0824],"ct":153,"alert":"none","colormode":"xy"}}

This is not yet implemented in your code, and causes an error when other software attempts to query the groups by calling groups and then groups/0.

This may also be related to #76, if the Echo is querying the groups and not getting a response back for "0" (All Hue Lights) it will not add the scenes.

@shbatm
Copy link
Contributor Author

shbatm commented Feb 12, 2018

More explanation from the API on Groups:

Group "0" is "A special group containing all lights in the system, and is not returned by the ‘get all groups’ command. This group is not visible, and cannot be created, modified or deleted using the API."

@mariusmotea
Copy link
Owner

Hi,

Never saw any example so far with output from group 0, i was believed this is used just to set some values to all lights. Can you confirm the output you provided is correct ?
Marius.

@shbatm
Copy link
Contributor Author

shbatm commented Feb 12, 2018

Yes, the above JSON was a dump from my actual bridge /api/username/groups/0 call will no lights on.

Here is all lights on, different colors:

{"name":"Group 0","lights":["1","2","3","4"],"type":"LightGroup","state":{"all_on":true,"any_on":true},"recycle":false,"action":{"on":true,"bri":254,"hue":47258,"sat":253,"effect":"none","xy":[0.1424,0.0824],"ct":153,"alert":"none","colormode":"xy"}}

And here is just some lights on:

{"name":"Group 0","lights":["1","2","3","4"],"type":"LightGroup","state":{"all_on":false,"any_on":true},"recycle":false,"action":{"on":true,"bri":254,"hue":47258,"sat":253,"effect":"none","xy":[0.1424,0.0824],"ct":153,"alert":"none","colormode":"xy"}}

@mariusmotea
Copy link
Owner

ok, i will implement.

mariusmotea added a commit that referenced this issue Feb 12, 2018
@mariusmotea
Copy link
Owner

I made a simple implementation, but still i'm not sure how the values from the state are generated on real bridge. I guess they may be the last values applied directly to this group, but so far i never saw any application that apply xt, ct or bri to all lights.

@shbatm
Copy link
Contributor Author

shbatm commented Feb 12, 2018

Thank you for the quick turnaround. I doubt there's much use for the state values being reported specifically, but the report out of the group in general allows discovery of the "All Hue Lights" group in my case. There is definitely use for the All Lights use when turning everything off, but it looks like this is handled already elsewhere in the code. If I find something that requires a more specific use for the state being reported through the /api/username/groups/0 call, I will re-open.

For your reference, my use is based on the https://github.com/studioimaginaire/phue repo, specifically studioimaginaire/phue#100 which is used in the https://github.com/exking/udi-hue-poly repo.

@shbatm shbatm closed this as completed Feb 12, 2018
mheijnemans01 pushed a commit to mheijnemans01/diyHue that referenced this issue Jan 31, 2019
* fix internal webgui on/off bug

* Fix wrong modelid issue mariusmotea#171

* Update bulb model

Hue Bulb lights update version to have good green color.
I noticed that my Hue bulbs doesn't have a good green color when i tried to choose it on hue app but my light strip had a good green color.
It appear that there are differences between hub bulbs model LCT015 and LCT001.

* Add report for group 0 mariusmotea#172

* Update README.md

* Update README.md
grywnn pushed a commit to grywnn/diyHue that referenced this issue Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants