Roost Remote: Controlling Arbitrary Smart Devices

I’ve spent the last few years tinkering and slowly building out an app I call Roost Remote to control all the smart devices in my apartment. I used to have to use different apps to control my lights, my sound system, my AC, my tea kettle… and anything else I decided to add to my home. With Roost Remote, everything is in one place, and I can hook it up to new devices in minutes. Even better, I can chain commands together to easily do several things with a single tap, or under certain conditions.

It’s not ready for public consumption, but I thought I’d describe what it can do and how it makes my life easier/more fun. If you’re a developer, the code is publicly available, so you can download and tweak it to reproduce this for your own home.

Device Fragmentation

A few years ago, a friend of mine started buying some smart devices to automate and remotely control things in his home. He was frustrated, though, because each device came with its own app, so if he was trying to, for instance, shut everything down for the night, he’d have to use like 8 different apps. He asked me if I could make an app that could control all the devices from one place.

At around the same time, I’d been working on turning my dumb TV –> smart. It was a lot of fun, since I had to solder together a simple circuit that could mimic the signals my TV remote sent, and control that circuit with a mini computer called a Raspberry Pi (I documented the process here and here).

Being a professional app developer, I of course decided to build an app that would control the Raspberry Pi. And originally, that’s all it did… but I realized that the process I’d gone through to control the TV could be generalized to just about any “Internet of Things” device, thereby achieving what my friend had requested.

So like, what does it need to do?

Well, it needed 4 things:

  • to handle just about any device, including custom ones
  • to be able to create lists of commands from different devices
  • to be easy to extend to new devices
  • to work on the local wifi network, and not worry about authenticating with other services

I had thought of using IFTTT for this, but it’s much more automation focused, and anyway I have no idea how to create a custom applet for my custom TV control.

How does Roost Remote do it?

Well, I’ll write some more in depth articles about this, but the gist of it is, it has the address of a device on the local wifi, and either a link to a server that describes how to interact with that device, or a static description on the server of how to interact with devices of that type.

(Technical note: at the time I created the structure of the device-interaction-descriptions, I didn’t know about Swagger, so my thing doesn’t do that, but I don’t actually know if something like Swagger would even work – but I might eventually look into it, since the concepts seem related.)

Once it knows how to interact with the device, it displays the various options to the user, allowing you to do anything on that list. For my TV, the list is short: turn on/off, and change the video source (to Chromecast, or my N64, or computer input, etc.). For my sound system, it’s considerably longer: play, pause, next song, previous song, add playlist, clear tracks, volume, and so on.

Ok, could you give us some examples?

Funny you should ask!

One of the first things I wanted was to be able to wake up more gently (I am NOT a morning person), so with this app I’ve set up a series of tasks to run when it’s time to get up: first, it starts a classical music spotify playlist on my multiroom sound system, making sure all the speakers are on and at the right volume; then, it turns on the light next to the chair that I take my coffee in; and, finally, it starts the coffee.

Similarly, I have a bedtime routine that turns off all the lights in the apartment, turns on the light on my nightstand, pauses any music that’s playing, powers down various devices, and starts the AC in my bedroom.

These sort of things increase my quality of life by an inordinate amount, oddly. Really, they don’t do that much, but for some reason it just delights me immensely. Not to mention that it’s allowed me to greatly declutter my home screen. All my smart home needs are in one place, and automating is not only possible, but easy.

If you’d like to learn more, or want me to make this a thing, please don’t hesitate to reach out on Twitter or Facebook! Especially if you want this app, since I have no idea if this is something people would actually want. And with any side project it’s really nice to get positive feedback 🙂

1 thought on “Roost Remote: Controlling Arbitrary Smart Devices”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s