ZeroOne3010 / yetanotherhueapi

A Java library for controlling Philips Hue lights. Available from the Maven Central.
MIT License
68 stars 21 forks source link

Get state ... question ? #52

Closed timothycuenat-lam closed 2 years ago

timothycuenat-lam commented 2 years ago

Hello, Thanks for the API. It's easy and simple to use. My question is how do you get the state of each light ? I don't see another way instead of creating a Thread in which a loop turns and get the state of each light.

If you could directly create a system with listerns it could be very great ! Thank you in advance

ZeroOne3010 commented 2 years ago

Hi there! I understand you would like to listen to events from the system and react to them? Up until recently the Bridge has not made that possible, but nowadays there actually exists an interface for that. Unfortunately I have not had the time to update this library to support those so-called Server-Sent Events yet, as it comes with quite big changes to the Hue API. But there's already the issue #48 open for it.

timothycuenat-lam commented 2 years ago

Ok, thanks ! 😄

ZeroOne3010 commented 2 years ago

I'll go ahead and close this issue, as the matter is already tracked in that other issue I mentioned. 😊