Your own personal theme song

@torbjornvatn torbjornvatn, Senior Platform Engineer
Everybody should have their own personal theme song

Recap

In my last post “Welcome to Unacastle” I described different ways we could greet someone who enters our humble Unacastle. None of them are particularly elegant, ubiquitous or fun, so I wanted to find some other way to showcase proximity based greetings.

The solution revealed it self after we had a meeting with a couple of the guys at Writeup. They are a Norwegian proximity focused startup with the tagline:

Create your own proximity message service with iBeacons

They gave us one of their beacons to play around with (the white one to the right)

writeup beacon

and when I discovered that Writeup allows you to specify a webhook that will fire upon interaction, I got an :bulb:

What if I could make our dashboard TV in the hallway play a personalized theme song when we get into the office in the morning!

Make it work

The first thing I had to do was to create some kind of service that would receive the webhook triggered by the Writeup app. As I belive in polyglotting when developing side projects like this, I deployed a small Clojure/Compojure app on Heroku. When it gets triggered by the webhook it looks like this. (INFO: Account id: 96 is me trigging the beacon)

The dashboard TV is powered by a Raspberry Pi, and I figured out that it can play mp3s using the TV’s speakers. So all I had to do now was to write a small node.js app that connects to the Clojure app via a websocket so it can get notified when the latter receives a beacon-interaction-webhook call. It goes a little something like this (the Raspberry is a bit slow, hence the long asciinema)

The last thing we needed to sort out was what songs to play and map them to our ids. We ended up with a quite interesting collection of tunes, e.g:

  • :notes: Imperial March :notes:
  • :notes: Every day I’m Hustlin’ :notes:
  • :notes: My Heart Will Go On :notes:

###Update: Here’s Kjartan entering the Unacastle from the hallway.

And this is what Andreas’ personal theme song sounds (and looks) like.

Hello, Tomas

In the last post introducing our employees you met [Jarle](/2017/03/02/hello-jarle/), and it is now time for me to introduce Tomas Jansso...… Continue reading

Hello, Jarle

Published on March 02, 2017