Home automation with a Broadlink RM Mini 3 and Google Home

Kat Hempstalk
5 min readSep 2, 2017

NB: There is now a better way of using the RM Mini 3 with Google Home — simply install the Broadlink ihc app, hook up the RM Mini into the app, then go into the Google Home app and link the device. If you still want to try hard mode, feel free to keep reading.

I recently purchased a Google Home device and have been since been looking at ways of using it to automate more things around my house. I came across this reddit thread which suggested using the Broadlink RM Mini 3 (aka Blackbean) device as a universal remote (IR blaster). At $25NZ delivered (at the time of purchase) I figured it wouldn’t hurt to try it out.

I bought this one off AliExpress: http://s.aliexpress.com/bEZfaYJb

Took about a week to get to New Zealand. The reddit thread suggests a complicated way of setting up the device with about half a dozen different Android Apps in the mix. After much trial and error I found a simpler way.

I used (all free):
- If This Then That (https://ifttt.com/)
- Stringify (https://www.stringify.com/)
- RM Bridge (http://rm-bridge.fun2code.de/)

Interestingly, you may only need one of the first two (IFTTT/Stringify) depending on whether you are ok with prefixing your command to Google Home as “Ok Google, tell Stringify …” (then just use Stringify), or whether you are just performing a single action (IFTTT) or multiple (Stringify). You’ll definitely need the RM Bridge app though.

Setting up RM Bridge

RM Bridge is the app that talks to the actual Broadlink RM Mini 3. I did the initial device setup using the Broadlink App — which just hooks up the device onto the Wifi network. I ended up deleting the Broadlink app as it had some weird permission requests and kept trying to install stuff on my phone. In short: I didn’t trust it. The RM Bridge app doesn’t rely on the base Broadlink App, so after you’ve done the device setup you can just remove it.

RM Bridge is a small HTTP server that runs on your phone that can talk to the Mini device. There isn’t default support for the Mini 3 but there’s a workaround here: http://fun2code-blog.blogspot.co.nz/2016/07/rm3-mini-workaround.html

In order to use the workaround you’ll need to know the MAC address of the RM Mini 3 on the network. I found this by looking at the active devices on my router.

The RM Bridge app gives you an IP:port to talk to the app on. On the code learning page you can add codes — you type a name for the code, hit “learn code” and then punch the button on the remote. If successful it will return you a URL that you can pop in a browser on your local network and have it fire the code.

This gave me a code that looked like this:
http://myphoneiphere:port/code/TVonoff

Unfortunately this will only work on the local network. IFTTT/Stringify require a publicly accessible URL, so it meant I had to look up my IP (http://whatsmyip.org) and also port forward the port on my router to the RM bridge port on my phone. I enabled the auth on the RM Bridge app too, because if I’m making this accessible to the outside world I’d like to make sure it’s not easy for malicious people to get to it.

Finally, my URL was:
http://mypublicip:port/code/TVonoff

Setting up Stringify

Stringify is an app that lets you bind multiple actions to a condition, a little bit like IFTTT (which only allows you to bind a single action to a condition). I wanted to be able to turn on my TV and sound system together, so I had multiple actions to do — one RM bridge call for each. Stringify actually lets you hook up to the Google Assistant directly, so I didn’t strictly need IFTTT in the loop, but you have to start with “Ok Google, tell Stringify <x>” and I wanted to be able to say “Ok Google, turn the TV on” not “Ok Google, tell Stringify to turn the TV on”. Less is more.

I created a new flow, adding 4 items: first an “IFTTT” as my “when condition”, followed by a “Maker” call (web URL with GET call using RM bridge links), a two second timer, and a second “Maker” call. The idea was that when IFTTT triggers, the TV turns on (using the public URL), and two seconds later the sound system turns on too. The reason I put a delay in there is that I didn’t want the RM Mini to try and execute two codes at once.

My flow for the TV

Setting up IFTTT

If This Then That (IFTTT) is a popular tool for executing a single action when a condition occurs. The advantage with using this tool is that I don’t have to prefix my command to Google Home with “tell Stringify…”. If you are OK with that, you can swap the IFTTT step in Stringify for a Google Assistant condition and you’ll have a working system. You will need to link your Stringify account with the Google Assistant if you do this, it will guide you through this when you add the Assistant to the flow for the first time.

In IFTTT I set up a simple action so that when I said “Turn the TV on” to the Google assistant it would trigger the Stringify flow I had set up earlier.

Stringify flow

If you have just one action to perform (i.e. one Maker URL call) you can just use the IFTTT app — no need for Stringify . One thing to note is that the Maker/Web URL call is called “Webhooks” in IFTTT now.

Now when I say “Turn the TV on” — after a few seconds delay both the TV and the sound system comes on. Good times.

Edit: one small catch: the RM bridge app likes eating the battery on my phone — not surprising as it’s running a web server I guess. If you have an always-on server on your network, there’s this webhook server that might help. Also this python library, and the home assistant app that you could try.

--

--

Kat Hempstalk

Machine Learning, AI and Data Expert. By day I work training machines to think, by night I plot to take over the world. All views expressed here are my own.