It’s easy to get desensitised to monitoring alerts if there are too many of them and then you get stuck in a rut of failure fatigue. Emails are not a great option and even other software tools can get ignored or closed if they produce too much noise. Wall-boards and LEDs help but people can become conditioned to these too.
Where I work, we have these fancy motorised desks so that you can easily change between a seated and standing position. For a recent hackathon, I decided to take advantage of this to improve our awareness. 😀
It’s time to take things to the next level and get physical. It’s very hard to ignore a problem when the height of your desk is changing!
The plan was to hook into the TFS API and detect build/release failures as I’d done before. However, instead of displaying the alerts on-screen, this time a problem would trigger the motor controller on the desk and move it up and down.
The following sketch shows the high-level design. Some python running on a Raspberry Pi would detect failures and then use the GPIO to control some relays, and in turn the desk.
The desk motor controller box has the up and down buttons connected via an RJ45 connector. There’s a secondary socket that can be used to do the same, without disconnecting the stock controls. A Cat5 Ethernet patch cable was cannibalised and wired into some relays. The GPIO of the Pi was connected to the relays (via some on-board transistors and fly-back protection diodes).
The prototype is shown in the following image. The network cable disappears to the right and is plugged into the motor control unit mounted on the underside of the desk.
This setup allows the desk to be controlled through software. Some python code on the Pi energises both relays for a couple of seconds each. This short-circuits the button lines and moves the desk up and down.
Apart from tidying up the hardware and mounting it under the desk, there are some other things that could be improved.
Why stop at just build and release failure alerts? This could be used to tell people when a server has gone down (by lowering the desk) or if you practice agile scrums then it could remind you that your daily stand-up meeting it about to start (by going up). It could even be used to highlight who hasn’t filled in their time-sheet. 😀
The connection to the motor controller is a bit crude, but then it was done in a rush at a hackathon. There are probably more elegant solutions.
There are official USB cables and even Bluetooth adapters that connect to the RJ45 socket, although they’re not cheap or easy to get hold of. These are to support the desktop and mobile apps, and there are also some buttons with pre-set heights.
These may have a more sophisticated communication protocol, rather than simply emulating buttons. Perhaps something like RS-232⁄485 or even just a feedback mechanism that doesn’t rely on pure timing.
There is reverse-engineered software for Linux on GitHub but this appears to control the stock USB HID. The cable contains a PIC micro-controller so it’s unclear what is happening between it and the motor controller. The pre-set buttons seem to be passive so there may be some easier further enhancements.
In any case, this was a fun project that provided much amusement in the office. I’m not sure if it will see wider adoption though. 😀