Closed nanaghartey closed 2 years ago
Hi there, thanks for your message! At the moment the library does not support adding new lights, you would need to do that with the official app. I looked into the official Hue documentation though, and it seems like it would be a pretty fun and straight forward feature to add.
May I ask for your specific use case for this request? It's always good to understand the greater context around feature requests. 🙂
Thanks for your prompt response!
Okay, well noted.
For my use case, I want a way to allow users add separate lights to their bridge without using the official app, even if they have to do it manually by providing the serial numbers of bulbs. I believe this would be a useful feature. For now, I direct users to install the hue app to add lights which few find cumbersome :(
I see, thank you! I can see the process is cumbersome indeed. How about adding the newly found lights to rooms, would you expect to need to be able to do that too?
Yes that would be helpful too. Thanks
Ok, I'm imagining a new method into the Hue
class, something like scanForNewLights()
. That would make a POST request into the endpoint that triggers a scan. It would then return a Future
that would be resolved once another endpoint that tells scan status would confirm the scan has ended (takes some 40 seconds according to the docs). The Future would then return a list of new Light
objects.
The Hue
class could then have another new method, addLightIntoRoom(Light, Room)
, which would do what it says on the label.
What do you think? Unfortunately I haven't got nearly as much time to dedicate to this project as I'd like, so I'd be more than happy to welcome a pull request even... 😉
Version 2.6.0 is now out with these features! Please try. :)
How do I add a new light that didn't come with bridge.
hue.getAllLights()
andhue.getUnassignedLights()
do not list new lights. Is there a way to scan and add a new light. A feature similar to "Add lights" in official Philips Hue android app. Thank you