Repository: https://github.com/Footage-Firm/meeting-room-traffic-lights

With two-dozen Oscars to present during the Academy Awards, there are a great many acceptance speeches. To keep speakers within a reasonable time limit, play-off music is famously used to tell folks to wrap it up — and it nearly always does the trick!

All too often, I have been stuck in a dragging meeting at work wishing that someone would start the play-off music. For our third annual “Innovation Day” at Storyblocks, my coworker and sometimes-boss Aaron Silverman had the idea to create traffic lights for our meeting rooms to tell people the meeting is ending. Having previously written a blog post on gathering meeting metrics using the Google Calendar API, this idea fit very well with my general displeasure at meetings and my desire to stomp them out at Storyblocks — or at least make them more tolerable.

Storyblocks stats from the “meetrics” project

The idea is simple: Put smart RGB light bulbs in each of our meeting rooms, then connect each bulb up to Google Calendar and change the color based on meeting time. If there is no meeting, the bulb is off. If there is currently a meeting in the room, the bulb is green. If the meeting is almost over, the bulb turns orange. When the meeting is over, the bulb turns red.

Our hastily-drawn demonstrative. Note the crude timeline to the right.

Materials

LIFX Mini Color bulbs

INJUICY bulb stands

Meeting Rooms defined as bookable resources in Google Calendar

2.4 GHz ONLY network (mixed networks don’t work well).

AWS

Coding up the app

Process

We wanted a system that would be simple, inexpensive, flexible, and reliable. To achieve that, we knew that we wanted little-to-no infrastructure and bulbs that could be controlled remotely over the internet. Cursory internet research showed that others had success controlling LIFX bulbs via their API and their bulbs were relatively cheap at about $30 per bulb (even cheaper on Ebay), so we ordered some along with simple stands that fit our office aesthetic. After that, our game-plan was to write up a simple Typescript application to be deployed on AWS Lambda using the dead-simple serverless module.

Code

The application was coded to allow automatic configuration of rooms and bulbs. If our company changed any room names or added any rooms, we wanted it to be as simple as changing the name of a light bulb or purchasing a new one. Also, if any other groups wanted to use our system, they shouldn’t have to touch the code other than deploying it.

// Handler.ts (syncBulbs function) const lights = new MeetingTrafficLights()



const lifxNetwork = new LifxBulbNetwork()

lights.addNetwork(lifxNetwork)



const calendarService = new CalendarService()

lights.setCalendar(calendarService)



return await lights.syncBulbs()

The code works by polling Google Calendar to get the list of all meeting rooms in an organization, querying the LIFX API to get the list of bulbs, then mapping rooms to bulbs before setting bulb colors. It will attempt to match bulb labels to room name automatically (so you don’t have to touch the code), but you can optionally override the pairings. For each mapped room/bulb pair, it then checks if a meeting is currently in-progress, almost finished, or finished, and sets the corresponding color.

/// MeetingTrafficLights.ts if (currentMeeting) {

logger.debug('Meeting in progress. Setting color to Green.', {room, bulb})

await bulb.setColor(Color.GREEN)

} else {

logger.debug('No meeting. Turning bulb off.', {room, bulb})

await bulb.powerOn(false)

}

The app runs every minute during normal business hours Monday through Friday (to save energy and cut down on Lambda executions).

// serverless.yml functions:

syncBulbs:

handler: bin/Handler.syncBulbs

name: sync-bulbs

description: Sets light bulb colors for meeting rooms during weekday business hours (12-24 GMT).

events:

- schedule:

rate: cron(* 12-23 ? * 2-6 *)

Technical Difficulties

Our biggest issue by far was WiFi. The bulbs that we used can only communicate on a 2.4 GHz network, and our office WiFi had the same SSID for each band. It was quite common for a bulb to initially connect successfully and then be completely unable to reconnect after turning off. For our demo, it was easy enough to coast on the initial connection, but we knew that we’d need a dedicated 2.4 GHz network before staking our reputations on a real implementation.

Additionally, connecting to the Google Calendar API is not the most straightforward process. We used a service account that was setup for the Meetrics project (see instructions in that blog post or in this repo), but it still took a good couple hours of experimenting with the googleapis module to get it right.

Live Demo

The live demo

Our demo went well! The Innovation Day judges were able to move meetings around on Google Calendar and see the bulbs change color. We also showed how easy it was to add a bulb without making any code changes. People were excited to see the bulbs “rolled out to production” in the coming weeks.

After Innovation Day, we were able to do live tests of a bulb in one of our meeting rooms called “The Studio” and see what effects, if any, it had. The first runs were definitely biased by the novelty of the addition to the meeting room, but there did seem to be a natural increased awareness of meeting schedule. Once the bulb turned red, people picked up their hustle to get out.

Live testing of one bulb in “The Studio”

Results

At the very least, we won the “Cultural Award” at Innovation Day and got our working prototype out the door for live experimentation in our company’s meeting rooms. We will see if the bulbs continue to work in spite of WiFi issues and live users who don’t like being told when to end their meetings.

Feel free to implement your own traffic lights using our open-sourced code at Footage-Firm/meeting-room-traffic-lights! The links to necessary materials and instructions are included in the README.

Happy hacking, and DOWN WITH ALL THE MEETINGS (some are ok).