A simple console app that sets Hue lights based on my availability in Outlook
Before you can run the application, you will need to create an application ID within an Azure Active Directory to make use of the Microsoft Identity Platform. This guide from Microsoft should guide you through this process.
This application uses the Secret Manager provided through .NET Core with the following syntax:
{
"appId": <APPLICATION_ID_FROM_AZURE_AD>,
"scopes": "User.Read;Calendars.Read;Presence.Read"
"hueAppId": "<USERNAME_FROM_HUE_API>",
"hueBridgeIp": "<HUE_BRIDGE_IP_ADDRESS>"
}
For the Presence endpoint to be accessed, the scope requires the Presence.Read
scope. Note that this scope is only supported by School or Work Microsoft accounts. For more information about the Presence Graph API endpoint, see Microsoft's Documentation.
To access your Hue Bridge, see Philips Hue Developer Documentation.
This project makes use of the open source Q42.HueApi package from Q42.