image credit: picjumbo.com

Moodlight

Last weekend I participated in my first hackathon, TADHack Global: London. (TAD stands for Telecom App Development but luckily it was open to anyone and everyone.) When I arrived on Saturday I sat down at a random table and introduced myself. A presenter welcomed everyone and after we watched few introduction videos from the sponsors they just said “Start your hacks, the deadline is noon tomorrow!”

At that point I turned to the others at our table and said “Well I guess we’re a group! Anyone have any ideas?” This was also the first hackathon for most of my team and we had all met for the first time only a few minutes ago. Telecoms was completely new to me and full of acronyms I didn’t understand so I decided instead of looking at the technology, I would just think more generally about digital communication.

I had seen the Facebook Social VR demo recently where people could interact in VR by the use of avatars. The most interesting element of the interaction was that these avatars could express emotion. I was a bit less impressed when I found out those emotions were triggered by buttons and not generated through something more advanced like voice recognition, facial muscle tracking or neurotech but the concept still got me curious.

Building full 3D avatars would take far too long but I liked the idea of focusing on emotions. Someone else on my team suggested that we try to use some of the IoT (internet of things) devices that were available for us like the Phillips Hue lightbulbs. Mixing those ideas together, I had a “lightbulb moment” so I pitched it to the rest of the team.

“What if we could light a room with different colours based on the emotion of a conversation?”

It wasn’t practical, and we had no idea who would want such a thing, but we all thought it would be quite fun and achievable so we set to work.

the_hack_01

By noon on Sunday we had a working prototype of what we called the Moodlight. We could type messages into Riot (a Matrix chat client) and have them sync through to a Slack channel. A custom Slackbot on the channel would then send all of these messages (via Slack’s RTM API and rtmbot) to a python client running on my laptop. Once there, we used Algorithmia to run sentiment analysis which would output a value representing the negative or positive emotion of the message. That value (from -1 to 1) was then translated into a hue value between red and blue (65000-45000) and sent through a local network connection to the Phillips Hue light via their API.

A post from Thomas, one of my teammates, goes into much more detail including the source code. It was fun typing messages like “happy happy happy” and “angry sad death pain” and then seeing the light change colour but I wanted to figure out a practical use aside from just novelty.

slack_screenshot_01

Twitch.tv is a network where you can watch people play video games. Next to the game screen you can also watch a webcam view of the gamer as they play. Many channels are live with a chatroom so that viewers and the gamer can interact. Just like a sporting event these games can be very exciting to watch with emotions running high so I thought this would be the perfect market for the Moodlight.

moodlight_game_neutral

If a gamer was doing well or failing badly, the people in the chat room would very likely react to this. The Moodlight could then take this emotion and visualise it with colourful lighting around the gamer, blue for positive and red for negative. The theatrical lighting would make the webcam feed more entertaining and it would also allow the gamer to understand the overall sentiment of their fans without having to take their eyes off the game.

moodlight_game_positive

“Bringing chat room emotions into the real world with theatrical lighting.”

moodlight_game_negative


After two days of hacking away our team presented the project and won “best hack” with the Moodlight. You can watch our presentation as well as all of the others in the video below.

At the moment the code only works with Riot and Slack as we didn’t have time to look for connections to Twitch.tv (if they’re even possible). The algorithm itself is also quite basic and reacts to each message individually. It can be set to work with the average sentiment but we found this was less exciting as it would level out over time. This could of course be improved by limiting the number of recent messages used in the average to find a nice balance.

I really enjoyed TADHack and I’ll be on the lookout for interesting hackathons in the future.

A big thanks to everyone on the Moodlight team, TADHack, IPCortex for organising the London location and IDEA London for hosting!

Photo: ipcortex
Team Moodlight: Astrid de Gasté, Ryan Lintott, Tomas Zezula, Istvan Hoffer, Jing Chan

Comments are closed.