Junction is Finland’s biggest hackathon, it was organised to coincide with Slush, the biggest startup conference in the Nordics. Callstats.io took part at the Junction hackathon (in Helsinki November 6th - 8th) by sending Juho, our data scientist, to evangelize WebRTC APIs. Below is Juho’s story from the hackathon.
Evangelizing WebRTC
Having gone to the hackathon early on Friday evening I was, initially, unable to find hackers that would use WebRTC. To change that, I needed to put in some leg work and talk with the teams and spread the gospel of WebRTC and callstats.io. Luckily, I bumped into my friends from Aalto University that were putting together a one-button home automation system.
Their idea was that home automation system user interfaces are too complex and, thus, there should be a system with only a single button to make the user interface as easy as possible to use. One thing led to another and eventually they promised to implement something WebRTC-based if I joined their team RöRö (pronounced as: RoeRoe).
Our amazing RöRö-team: me (on the left), Olli Niskanen, Sampsa Laapotti, Joonas Nissinen and missing from the picture: Sten Hägglund. Thanks guys for the amazing weekend!
I joined the team and the hack outcome of the weekend indeed was a one-button home automation system with WebRTC. In short, pressing the button turns on disco mode at your home. Essentially, disco lights are turned on, cheesy music starts playing and the system starts recording video over a WebRTC stream. See the video below for people’s reactions of pressing the button.
RöRö-button technical setup
For a more detailed explanation of the setup of the system see the figure below and follow the steps counterclockwise.
- When user presses bt.tn
- it sends a message to the bt.tn server in Ireland
- which sends an HTTP request to our cloud server in Frankfurt
- which sends another HTTP request through a reverse SSH tunnel to the laptop of Joonas
- which starts playing music, starts a WebRTC conference to our server, and forwards the HTTP request over WLAN to Air Station
- which forwards the message over Ethernet to Cozify home automation controller
- which then turns on the lights.
The technical setup of the RöRö-button home automation system
To make it intuitive for the user, we made pressing the button a second time turn everything off. Being engineers and short on time, we managed to create the most complex way of turning on lights, audio and video surveillance. But most of the technical complexity was hidden from the user with the use of a one-button user interface. The only hint that there is a complex system running behind the scenes was the seemingly long delay (usually at least 3 seconds) between pressing the button and the disco mode turning on.
We based our WebRTC video stream recording on Muaz Khan’s RecordRTC since it seemed to be the most straight-forward way of doing the trick. If you want to see the ugly details, please see our GitHub repo.
Wrap up
Hacking at Junction with a laid-back yet skilled team was a lot of fun. I’ll definitely attend Junction next year as well. With this hack, we won the Junction Cozify track! Yay! Now we’ll have to figure out what WebRTC stuff we could develop with the Cozify prize devices.
Juho celebrating the Junction victory
During the hackathon Juho also had time to update the documentaton for our demo app and we the Github repo has been made publicly available for anyone to download and re-use as they see fit. Check it out and tell us what you think of it!