Question about lights / groups page
M-Krieger opened this issue · 5 comments
Hi SteveyO,
thanks for your great emulator. It's great for developing for hue during my daily trainride to work.
My issue:
I'm curious about the hue bridge lights url:
http://localhost:8000/api/newdeveloper/lights/
When entering same url for my real hue bridge it serves full json for all bulbs, in the emulator it's only serving the lights id + name. I've written some lines of code (js single page app for hue, as personal control center for home intranet) already and used to work with this structure.
Any reasons your emulator differs from the real hue bridge in that way? Same behaviour also for groups.
When viewing http://localhost:8000/api/newdeveloper/ I can access all properties from lights and groups.
Please tell me, if I'm missing something or there is a reason for this difference.
Anyway thank your for that great tool.
Greetings,
Michael
The older bridge software only returned the name for each light. The emulator still returns this format.
See hue Lights API documentation under 1.1.2: http://www.developers.meethue.com/documentation/lights-api
Returns a list of all lights in the system. As of 1.3 the full light resource is returned from the bridge. As of 1.4 the uniqueid is also returned.
Note: For bridge versions < 1.3 only the name and light identifier are returned.
Hi Michael,
Thanks for the nice comment, and am glad it helps you with your hue development.
Yes, the reason is as described above by mvdwetering.
Version 1.3 of the hue bridge contained a lot of really nice additions such as a Rule Engine, Sensors and the above change also. However, I don't intend of ever changing the Emulator to support 1.3 bridge functionality.
If you really need the full json for light resources you will have to code it yourself from the Emulator source. I could help you, it doesn't look that difficult at a glance. Let me know if so, and I will point you in the right direction.
Steve
Thinking about it again, I may code and commit this myself. Very few users will be using 1.2 bridges, so would be better if the call returned the full lights config.
I will let you know when done.
S
Hi Steve and mvdwetering,
thank you for your replys. Cause I'm always using my hue with 1.3 on the bridge I haven't noticed it.
Of course I would like to see an update of this great tool, but if you don't got time for it it's okay. As mentioned before thank you anyway for that great tool. :)
Michael
Hi Michael,
No problem. It should be fixed now so I will close the issue.
Try the HueEmulator-v0.3.jar
This version will retrieve the full lights config the same as 1.3 bridges and higher, also I fixed some minor little bugs (I noticed a null lightIdentifier and TransitionTime was being retrieved in the json, so these were removed).
S