michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
409 stars 114 forks source link

How to get infromtaion on lights #223

Closed samengEljest closed 4 years ago

samengEljest commented 4 years ago

Hello,

I am kind of confused. Is there a way to send a command to get information about the lights?

I am making a program where i want to save the current state of the lights on startup (color and brightness). While the program is running i am changing some stuff on the lights. But when i close down the program I want to reset the lights so they look exactly the same as when i first started.

Is this possible?

Thanks!

michielpost commented 4 years ago

Yes, this is possible. You can find informtion about the Hue API here: https://developers.meethue.com/develop/hue-api/ Every API call has a corresponding method in the Q42.HueApi HueClient.

To get all the lights for example, you can use GetLightsAsync