Video: Improving a GenServer, My IoT Lightswitch

GenServer is the typical Actor abstraction in Erlang and Elixir. I’ve used one for talking to my Elgato Keylights in the lightswitch project. I made it sort of dumb.

It was a quick job so I want to improve it in a few ways.

  • Make it not need to pull the new state from lights before sending commands.
  • Pull state in the background occasionally to keep relatively up-to-date.
  • Always fetch status after sending commands.
  • If there is time, improve the lighting on the keybow to represent the state of the lights.

Spoiler, most of it got done during the stream :)

4K HD 720 low