How I made my keyboard flash red when the build breaks on CI ๐Ÿšจ

How I made my keyboard flash red when the build breaks on CI ๐Ÿšจ


4 min read

I recently got a Steelseries keyboard. Other than that this keyboard was one of the only RGB keyboards I could find that was supported on Mac, it had an extra draw, which was that it was programmable.

Steelseries offers their GameSense SDK which has a REST API you can use. This sounded simple enough, so I decided to create a dream for myself:

As a developer, when I push up code that breaks the build on CI, I want my keyboard to flash red

So now I had a new side project to waste my time on!

Here's a picture of the keyboard display showing a message for the build status. This one is for successful builds.

Build success on the Steelseries keyboard display

Here's a picture of the display when builds fail.

Build fail on the Steelseries keyboard display

The function keys also flash either red or green, which you can sort of see in the demo video below.

This app leverages Codeship as the continuous integration service. I like Codeship for this purpose because it allows you to configure a web hook for the project and doesn't require you to modify any Yaml files in your source code to get this to work, you can just set it up in the dashboard without making a scene in your team's code. I initially looked at Github Actions and then Circle CI but neither of those had a setup as quick and easy as Codeship's.

I also used ngrok to create a local tunnel so that Codeship had a public URL to hit.

How the Steelseries GameSense SDK works

When you install the Engine software, a server is created on your machine. Steelseries keyboards listen for events on this port, e.g. localhost:<port>.

Steelseries also offers official SDK's for game engines like Unity. There was an unofficial Node.js client, which I tried first, but unfortunately it didn't run and threw a bunch of errors when implementing the example code, so I needed to build my own solution.

Demo time

If this sounds interesting, watch this demo to see it in action.

Get the code

If you like what you see, get the code on Github. The readme includes a tutorial on how you can set this up for yourself. Feel free to fork it. If you add any cool features, I'd love to see them!