The last missing piece here was someone who had made an easy to adapt system of putting a browser to a screen (which is way harder than it sounds, as it so happens). The advantage of resin.io is that someone had already done the hard parts for us, enter resin-wpe. Hardware accelerated, webkit, you can even connect it to touchscreens, if that’s your idea of fun. I setup the project in a cloud9 workspace, and pushed it to resin, which pushed it to the devices. By setting the URL via configuration, we now have the datadog dashboard on the TV.

So just with off the shelf libraries and tools, we have 3 out of the 4 of our metrics for the perfect dashboard TV. All we’re missing is the ditching of the remote: right now we have to manually switch between chromecast and the raspberry pi. So begins our adventure into CEC.

CEC Support and Automation

For those unfamiliar, CEC, or Consumer Electronics Control, is a protocol by which HDMI connected devices can control and command other HDMI connected devices without any other forms of communication. Its primary use is to unify remotes, but it also has applications in cross device control, auto-input-switching, etc. It’s a protocol with the best of intentions, and often the worst of device implementations. But lets try and remain positive.

Raspberry Pi supports CEC out of the box via libCEC. This means with a little tweaking of our Docker image, we can control the TV over bash or Python. Neat!

Chromecast has some useful CEC features. It will turn the TV on and switch to its input when an app is started on it. What it doesn’t do however is ever hand that input back to anyone else when the app closes, which means it requires a remote if you want to use it secondary to any other content provider (It also never blanks its input on inactivity. This wouldn’t be useful here, but it’s still dumb). We’ll need to write our own code to add some sanity here if we want it to work without a remote.