On Monday and Tuesday, the 21st and the 22nd of November, our company organized an event. A Hackathon.
What’s a Hackathon?
“A hackathon (also known as a hack day, hackfest or codefest) is a design sprint-like event in which computer programmers and others involved in software development, including graphic designers, interface designers, project managers, and others, often including subject-matter-experts, collaborate intensively on software projects.” – Wikipedia.
This means nothing other than:
Let’s meet all together and develop a little project in the shortest time possible.
In advance we collected project ideas for the hackathon and selected one of them. Furthermore we defined goals to be reached during the hackathon. The idea was to develop a C#/.NET client for the Osram Lightify API. Osram Lightify are special lamps produced by Osram, which can be controlled using the Osram Lightify API.
Steps we got through
As a very first step, we decided to create a little project plan. After planning what exactly we wanted, we started the project.
We first had to research how the Osram Lightify API works. This wasn’t that much work, because Osram released a documentation about their API. Then we wanted to make sure the lamps are working. We had to set up the Gateway, which is connected to the internet and communicates with the lamps. To be able to configure the gateway we needed a smartphone to install and run the so called ´Lightify´ App on. After the gateway was set up, we installed the lamps by plugging them in. Because these lamps were already used before, we needed to factory reset these lamps. Resetting the lamps will be done by turning them on and off in a specific rhythm, which differs based on the type of the lamp. After finishing with all the preparations we started developing the C# client.
The client we implemented sends HTTP requests to the Lightify Server. The server then redirects the commands via the corresponding gateway to the lamps. That’s the way how these lamps can be controlled. We also wrote some integration tests, so we can make sure that our code works as expected. Our client exposes functions to turn lamps on and off, dim them, set the color etc. you can also execute these function for groups.
The code is licensed under Apache 2 license and is available on GitHub.