Demo.mp4
In the philipsHueService.cs you would need to populate philipsHueBrigeIp with ip of your bridge which could be found on https://discovery.meethue.com/ if it's connected to your local network.
private static string philipsHueBridgeIp = "";
You would need to generate a username that would be used on all the endpoints. You could use https://{philipsHueBridgeIp}/debug/clip.html as a playground to set up the user. Once you press the button on your bridge and call the endpoint below on the playground you would get the username generated.
You would populate the philipsHueService.cs generatedUsername with the returned result. If you need more information go to https://developers.meethue.com/develop/get-started-2/
private static string generatedUsername = "";
Model-View-ViewModel (MVVM) is a UI architectural design pattern for decoupling UI and non-UI code. With MVVM, you define your UI declaratively in XAML and use data-binding markup to link it to other layers containing data and commands. The data binding infrastructure provides a loose coupling that keeps the UI and the linked data synchronized and routes user input to the appropriate commands.
When using the MVVM pattern, an app is divided into the following layers:
- The model layer defines the types that represent your business data.
- The view layer defines the UI using XAML markup.
- The view-model layer provides data binding targets for the view.
The algorithm used to change the background colour by mapping the Kelvin values to an RGB value could be found here https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html