Scott Hanselman

Mirroring your Presence Status from the Microsoft Graph in Teams to LIFX or Hue bias lighting

May 22, 2020 Comment on this post [4] Posted in Open Source | Win10
Sponsored By

During the Microsoft Build keynote last week - that you can watch free online here - we snuck in a LOT of detail and easter eggs. We planned the whole thing out like a live stage play (I have a background in theatre) and one of the things that mattered to me was lighting.

If you're going to watch something you for an extended time you'll need a little visual interest. Ya gotta mix it up! So I partnered with LIFX and Isaac Levin to accomplish two things:

  • Can we change room lighting to match Teams/Skype/Slack/Whatever presence status?
  • Can we change room lighting to match the Windows Theme/Background accent color?
    • If I'm not mirroring my pretense status, pull the accent color out and change the light.

Here's what it looked like in the keynote:

Purple light and Purple background
Green light and green background

The PresenceLight app is open source and up on Github by Isaac Levin and you can get it on the Windows Store free or in Chocolatey, WinGet, or download a nightly build.

So what's needed? We need an API to pull presence from and an API to push our chosen color to. So that's the Microsoft Graph that includes presence APIs. On the lighting side, using LIFX as an example, they have a great clean LIFX HTTP API.

RANDOM: If you're looking for my wallpapers from the BUILD keynote, I've put them up here.

Here's what the app looks like. You can auth against Phillips Hue, Yeelight or LIFX. The code for LIFX, as an example, is very clean.

PresenceLight

Check out Isaacs detailed blog post about PresenceLight with code samples and explanations! The LIFX folks also set up a 10% off coupon "BUILD" for use on their online store. I'm sure they'll sell out, but the LIFX Beam that I have is $99 refurbished.


Sponsor: This week's sponsor is...me! This blog and my podcast has been a labor of love for over 18 years. Your sponsorship pays my hosting bills for both AND allows me to buy gadgets to review AND the occasional taco. Join me!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
May 29, 2020 13:25
I was mighty jealous of your light setup during your presentation (and needs to be a way to change the Skype ringtone to be your rendition of it as well ;) ) I feel I need more lights in my WFH office now :)
May 29, 2020 13:47
Really cool app. Just downloaded it.
May 31, 2020 19:21
Hey Scott, totally unrelated but asking you here since you have a direct-line to the top- are you guys going to do anything to right the whole stealing-AppGet-without-compensation-or-credit situation? It's absolutely disgraceful behavior for Microsoft and a stain on everything you guys have done with open source the last decade.

https://keivan.io/the-day-appget-died/

https://devblogs.microsoft.com/commandline/winget-install-learning
Sam
June 03, 2020 16:04
Your presentation was really amazing! The lighting was, in fact really cool. I will definitely be downloading the app and changing the lighting in my home office :)

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.