Control your home’s heating, cooling and more via IR with Google Home and RM3 Mini

Google Home has been available in ‘straya for a couple of months now, and it works well at controlling new “smart” wifi LED bulbs and power points. What if you want to use it to voice-control your other appliances – the ones that are not wifi-enabled and are too dumb to talk to Google?

unnamed

Edit 23/2/18 – many months after I first wrote this how-to, Broadlink have released a new app that integrates (sort-of) with Google Home directly via the cloud, with no additional hardware needed.

Called “ihc” on the Android appstore, this app finds your Broadlink emitters, and can be told about your home’s devices. You can teach the on / off command states for each device, and then have to create a “Scene” for each command state. Next, create an account with Broadlink, and then go to the Google Home App -> Home Control -> Devices, press “+”, pick “Broadlink Smart Home” from the list of cloud providers, log in, and your scenes will appear as new devices. To call them, you have to say to Google “Activate <scene name> on”.. If this is too cumbersome, you can make shortcuts under “More Settings” in the Home app.

The plusses for this method are no need to port-forward, do dynamic DNS, register accounts at IFTTT, or use Android hardware. The negative is that the devices themselves are not exposed to Google (only the scenes), so you have to name the scenes carefully to prevent more than one being activated by the same command, (“fan light on” and “fan on” both get called when you say “Turn the fan on”), and you also have to make up shortcuts to operate each device, because Google does not know what kind of device it is. Devices that are exposed natively, such as TPLink LED lights, can be controlled in bulk as “lights”, but scenes, such as what Broadlink does, can’t be treated this way,

End edit

This walk-through will show you the step-by-step way to get any IR-controlled appliance to be voice-controlled by Google Home. All you need is a cheap IR-blaster called the RM3 Mini, plus an Android phone/tablet/TV box as a local server, and a number of free web-services.

 

screenshot_2017-09-11_15-25-31__10794-1505107563-220-220

In summary, you get to teach the RM3 Mini the IR codes once for each button you want to use on any IR remote, and you then make an action for that button using IFTTT on the web – you call the action with a Google Home voice command, and it’s sent through the web and the Android local bridge to the IR blaster.

Untitled

You’ll need the following hardware:

Google Home (GH) smart speaker, setup and connected to your Google account
Broadlink RM3 Mini (RM3), currently $38.50 delivered next-business-day, and USB power for it
A spare Android (‘Droid) phone/tablet/TV box with wifi that can be left on 24/7

You’ll need access to the following:

A wifi router that you have admin rights to (GH, ‘Droid and RM3 connect to the Internet via the router)
An iOs or Android device (for GH/RM3 Wifi pairing) and a tablet/notebook/PC (for copy-pasting commands)
The original remotes for the appliances you want to control.

You’ll need to setup the following free software / webservices:

An IFTTT account (responds to GH commands by sending text to RM3 via your router)
The RM3 Mini iOS or Android app (to connect the RM3 to your Wifi once only)
A dynamic DNS that gives a permanent IP address mapping to your router’s external IP
The RM Bridge Plugin on a spare ‘Droid

Lets get started!

For all these steps, I am assuming that you know your router’s wifi login SSID and password, have admin access to the router, and that all the devices (PC / Phone / tablet + GH + RM3) are going to be connected to the same router/network in your home. If you have a router with multiple wifi access points, put all these things on one AP by themselves, for better security, as they will be exposed to the web. Links in bold will open in a new tab to pages elsewhere that cover setup of individual devices.

 

Step 1 – prerequisites:

Get your Google Home connected to your Google account

Make an account at IFTTT. Connect your GH to IFTTT Google Assistant.

Setup dynamic DNS for your router. If you have a static external IP, you could skip this step.

Download and install the RM Bridge Plugin to the spare ‘Droid

Download and install the RM3 iOS or Android app on a phone or tablet (or scan QR code on it’s box).

 

Step 2 – connecting RM3 to your Wifi:

Open the e-Control RM3 app on your wifi-connected phone/tablet. You don’t need to create an account or sign in, so skip that prompt. Plug the RM3 into a USB power port and wait for it to blink rapidly blue.

Choose “add devices” from the app “+” menu, and give it your wifi password when prompted, then press “configure”. The RM3 should stop blinking when it’s successfully connected. Press “eRemote” on this screen to select the RM3 you just added.

Now update the RM3 firmware (press the cog, then settings, device info, firmware update). The app is not needed any more after this point, and can be uninstalled unless you want to pair more RM3s to your wifi.

 

Step 3 – setup the local bridge: Open the RM Bridge app on the spare ‘Droid, start the server, press the three dots to enter settings, and tick the option to make it run at boot, and specify a username/password if you want (this makes any outside sites/queries require the user/pass to manage it’s command codes). The app’ll display the IP and port number you can use to access it remotely.

Make sure the ‘Droid doesn’t turn off it’s wifi when sleeping (Android Settings-Wifi-Advanced). Test that you can get to RM Bridge by putting the webaddress:port number from RM Bridge’s opening screen in another local device’s browser – it should return a blank page with “invalid request” at the top if it’s working. FYI, the app stores all the raw codes, and lets you refer to the commands by using just a shortcut URL, as you’ll see later on.

 

Step 4 – Configure the router:  Now, go to the Wifi Clients page of your router and find the entries for the RM3 and ‘Droid running RM Bridge, it should look something like this:

You need to reserve the IP addresses of the RM3 and the ‘Droid running RM Bridge as static IPs, so that they won’t change if they get powered-off. In the screenshot below, the first line is the ‘Droid and the next two are RM3s.

Now go to the port-forward page of the router. Setup the port-forward for the RM Bridge port on your external IP to the ‘Droid’s local IP and port. This way, requests sent to your router’s external IP / dynamic DNS IP and RM Bridge’s port number will be forwarded on to the internal IP:port held by the ‘Droid.

Step 5 – Find the RM3 online and make it ready to learn codes: Open a browser, click here go to fun2code.de and do Step 1. Paste in your external IP / dynamic DNS name and port number for RM Bridge, and then fill in the section below with the RM3 name and mac address (from your router’s client list), type RM2 in the “Type” box, and press “Add manually”. Your RM3 should appear in the dropdown where you can select it in Step 2.

Step 6 – Teach the codes: Type in the name of the first IR command you want to learn, point the old remote at the top of the RM3, press “Learn Code” in the browser, then press the button on the old remote that you want to learn – the RM3’s led should turn white during the “learn code” period, and the server prints a response below if successful. Press the Test button – RM3 should respond with a white led flash, and the device should operate just as if you had used it’s remote.

In the screenshot above, I’ve named the button for turning-on a Samsung aircon, and the returned info includes that as part of the URL so you can identify this function. This website doesn’t store your details, and is used only to generate and display the codes for your RM Bridge. Copy the contents of “Shortcut URL” and leave this page for now.

Step 7 – build the webservice for the learned code: In a new tab, open IFTTT, click “My Applets”, then “New Applet”, and then click the blue “+this”. You can also get to New Applet from your username on the top-right.

Type “google” or “ass” in the box, click on “Google Assistant” (you should have configured this once beforehand, see here).

Choose “Say a simple phrase”, the left-most option.

Fill in the fields for what you want to say to your GH, and press “Create trigger”.

Now click the blue “+THAT”

Type “web”, click “Webhooks” (if you haven’t used this before, it’ll prompt you to click “Connect” first).

Then click “Make a web request”.

Paste the Shortcut URL from your fun2code.de results, as in the screenshot below:

Method is GET, and Content Type is Application/JSON. If you enabled the password option in RM Bridge, you need to modify the URL to make it in the form of http://username:password@ipaddress:port/code/xxxxx

Press “Create action”, then “Finish”, and you are done here. If you need to revisit the commands, press the cog on the top-right of your applet to edit it.

Step 9 – test it out: Give GH your command phrase and wait for the response – it can take 3-4 seconds (this delay comes from IFTTT, as the response from testing the codes at fun2code.de is instant. Again, the RM3 should blink white as it sends the command, and your device should respond.

Step 10: Repeat steps 6->9 for additional remote buttons you want to learn, making a new IFTTT recipe for each one.

Once you get the hang of this, the fastest way to do this is teach all your device IR codes in a batch at fun2code.de, then go to the “Manage Codes” page, which displays all the IR codes stored by your RM Bridge, and build all your IFTTT applets in one hit by copy/pasting from just those two pages.

Update 21/09: I’ve tried this with the Broadlink RM Pro RF and IR blaster, and it works just as well learning the codes at Fun2Code.De for an RF-controlled Arlec fan.

Simple devices like heaters and lights may use the same IR command for on/off (you can tell by comparing the text strings when you teach their codes), so you could get away with only one command recipe to switch them.

However, some aircon remote controllers send a command that is a snapshot of the current remote state (power+temperature+mode+fan speed) rather than a simple “power” command. You’ll know if yours is one of these, as testing the “On” command will not power the unit off when you trigger it a second time. For those, you will have to teach the On and Off commands separately at fun2code.de, and make separate IFTTT recipes for each On and Off press of the button.

Troubleshooting

If Google says “I don’t know what to do with that” in response to your command, give it some time to sync with IFTTT.

If the applet fails to run (click it’s cog and then the View Activity link to see it’s log), try editing and saving it again, to prompt a sync. If the log says “there was an problem with the webhooks service”, the RM Bridge is not externally accessible/responding, or you have enabled authentication and not included the username/password in your Webhooks URL.

If Fun2code.de returns “404/error” on the top-right when you are adding the RM3, it can’t get to the RM Bridge, so check RM Bridge is running, server is started, and you can get to it from another device on your network. If that’s all fine, try to get to it from a device outside your network (eg a phone browser connected to your Telco, not wifi). if that fails, there is a problem with your port-forward or your dynamic DNS (if configured).

If Fun2code.de says “failed to study code”, update the firmware in the RM3. If you have already done this, try repositioning the remote / RM3 so that there are no other IR sources interfering (nearby TV, bright sun etc). You have only a 4-5 second window to press the remote button after pressing “Learn Code”.

 

About: admin


56 thoughts on “Control your home’s heating, cooling and more via IR with Google Home and RM3 Mini”

  1. Nice tutorial! I get an error though whenever I create a webhooks action: Tag ‘{%’ was not properly terminated with regexp: /\%\}/ Any ideas how to fix this?

      1. I get this same error when pasting in the fun2code command url. The test works fine but when trying to paste into the ifttt applet it gives that error. There isnt even an { in the code?
        Thoughts?

    1. Found the fix to this. Make sure you give the code name. Then you get the shorter URL and past that. This error comes when you try to paste the large URL

  2. Great tutorial.
    Do you know how to make it work with the Broadlink TC2 switches?
    I cannot learn codes because these are indeed in the rm pro.

  3. HI,

    Thank you very much for the tutorial. I’m having one issue. The shortcut URL works perfectly when I click ‘test code’ on fun2code.com, but when I create it in ifttt, it responds with applet skipped in the log. The Google home responds to the query, but the rm mini 3 does not do the action.

    Thanks for the help.

      1. Thanks Michael, turns out that my ISP hyperoptic closed all ports unless I had a static IP. which they want to charge me an additional £5 a month for. ☹️

        They gave me a 7 day trial, and it now all works correctly.

      2. Hi, i’m having the same issue. The test code works within the network but when disconnected from the LAN it won’t run – obviously the problem with IFTTT. Can you give me a quick pointer of where I’m going wrong? I’m assuming somewhere in the dynamic DNS? My ip4 address is the same as RMLink. I’m using DYNU and just setting up Manage Dynamic DNS Service and that’s all… sorry for the dumb question – great tutorial, learning lots!

        1. Try connecting to the RMBridge via your external IP itself from outside your network – that will eliminate the DNS as an issue. If you can’t get to it, check ports are open, RM bridge is running.

  4. Hi, thanks for the tutorial! I keep getting the “Error learning code: mac:xx:xx:xx:xx:xx:xx not rm2” message that I’ve seen some other users get with other models. On the code learning page I can either access the device by adding it manually or by loading devices, but as soon as I try and learn any codes I get that error. I’ve updated the firmware on the device to v20028 which is the latest at this time. Any advice?

  5. is there a way to set up scenes? like if i say “movie time” the rm pro will turn on my tv, apple tv, and fan idk. or its just simple commands?

  6. Thanks so much for the work you have put into this post about controlling our homes heating and cooling via google home and RM3 mini.I actually like what you’ve acquired here, certainly like what you are stating and the way in which you say it.I really just love your blog.

  7. I can’t get this to work when I do test it works but when I ask Google she says ok but it doesn’t work.

    1. Most likely IFTTT can’t get to your Android. Check you can get to the IP address of the Android from outside your network via your external IP and port number, as it should respond with a blank page with “invalid request”. You need to check your port forward / dynamic DNS is working if it does not respond with that page.

    2. Mick, did you get this working?
      I’ve got the same problem and I’m almost sure it’s caused by incorrect setting of the port forwarding.

      I don’t know what port to redirect from.

  8. Hi. Great tutorial! Is there a way to connect Google home to a RM pro, to be able to use it for a RF signal? Thanks.

  9. No still no joy trigger works but there’s something wrong with ifttt part Google thinks she’s done job but has not.

  10. Thank you for the great tutorial! I managed to get everything working!
    However, I now want to add another RM3mini device for another room. Is it not possible to just port forward as well to the additional RM3 device with it’s own IP? (Using the same RM Bridge).
    If you don’t mind, could you help me with how I should go about setting up another RM3 mini?

      1. Thanks for the reply Michael!

        But when I type in the info on the RM Bridge learning page and hit add manually, it say the “mac (address) is error”

        Can’t understand what is the issue

    1. Mike! Search “what’s my IP” on the internet and whatever comes up make sure too use your external IP in place of the other in your short URL for learned codes. IFTTT/Webhook cannot access your internal IP. I hope that’s all it was for you. & I know I’m late but someone else might have that issue. 🙂

  11. Hi Mick, if IFTT is working, the Assistant will send a response (which you programmed. I think what is happening is an error with your code learning (or you havent yet set up your Dynamic DNS).

    In the code learning page, under step 1, did you enter the dynamicdns address? You will need to setup duckdns and then use that to input into that field (like xxx.duckdns.org for example)

    I made the mistake of simply putting the router IP for testing and had the same problems you are having.

    As a side note, after setting up duckdns, I installed the app on the same bridge android device as well to update it as well.

  12. I have tried and tried to get this to work. I am almost certain that my problem is with the port forwarding. When I type the IP and port into a browser on a device lined to the local WiFi I get the correct response of “invalid request”. When I try from an external I get IP address “took too long to respond”. Also when I set off the IFTTT that gives “unable to make web request: error: ESOCKETTIMEDOUT”
    What on earth could I be doing wrong? I have fixed IP from ISP. I have set my droid up to be fixed IP.
    I have tried this on 2 different routers at 2 different locations.
    I would be very grateful for any help or suggestions.

  13. I am getting the ERROR: HTTP/404 on the right corner of rm-bridge.fun2code.de/ . but as far as i can test the port forwarding is working as i can access the rm plugin server documentation , by typing the ddns address even when I access from a cellphone connected via the telco documentation .

    any tips ..

    thanks

  14. thank you Michael my first error was i was using the wrong app {rm plugin} . And after using the right app [rm bridge] , still have the http/404 but reentering the details device name . mac address , device type .. solved the problem …

  15. I’ve been following these instructions but with a Broadlink RM Pro. I’ve got as far as trying to learn an RF code on rm-bridge.fun2code.de. When I click the “Learn Code” button the red LED on the Broadlink lights up, but when I press the button on my RF remote (which is less than 2 feet from the Broadlink) I get no response – the red LED stays lit for about 25 seconds before going out again. I never get the option to test the code. I’ve tried a Frequency Scan but it didn’t seem to help. Any ideas?

  16. I have the Broadlink RM PRO+ with serial no RM3322…
    It works fine with both eControl and IHC (using firmware v52). However I can’t find a way make it work with RM Bridge.
    I set it up as type 10026 (instead of RM02) on the rm-bridge.fun2code.de site, it seems it comes with both “Frequency Scan” and “Learn Code” buttons. However I receive this when pressing “Learn Code:
    Error learning code: mac:34:ea:34:xx:xx:xx not Rmpro+
    Similar message when pressing Frequency Scan:
    mac:34:ea:34:xx:xx:xx not Rmpro+
    (I replaced the MAC address with x)
    Basically RM Bridge keeps telling me that my device is not an Rmpro+ device.
    I also tried with type RM02, then it keeps telling me “not RM02”.
    I tried with both RM Brigde versions: 1.3.0. and 1.3.2
    I now doubt my device is supported at all…
    Just one addition: RM Bridge keeps a cache of the devices added manually on the fun2code website. You should stop the app, clear the cache on the android to get it forgotten.

  17. My ISP (Optus Mobile Broadband) uses carrier NAT thus my router has a private IP. I’m assuming the DDNS won’t work unless I have a public IP?

      1. Thanks for the quick reply. Mp IP is 10.189.79.xxx which I believe is in the private range. Guess I’ll keep looking for another way. Cheers

  18. Hello
    i’m having a had time setting up my Broadlink RM Pro
    The website doesnt seems to see it as a RM2

    I have the
    Error learning code: mac:XX:XX:XX not rm2

    why is not learning the codes from it

    I also have the RM Mini and it works just fine
    it learns all the codes from it

    so please tell me why the Bigger pro one is not working

  19. Ok i got it working

    I stopped the app RM Bridge on my phone
    then run an app clean master ( to clean up the temps files)

    then restarted the app RM Bridge and clicked to learn on the website and there it was even doing a frequency scan now

    its working fine now

  20. I would like to change the input of my tv
    but the RM only learns 1 code at a time
    How do i make it learn

    mutiple press on the same button is the possible

      1. can you please explain i only found an app called stringify
        how can i make it work with broadlink and google home

  21. Hello,
    I’m getting “Error sending code: rm2 check data failed” error on Step 3 of the Learning code part. Any ideas??

      1. Have not had this error code, before, sorry. If the IR data is corrupted, this may be resolved by moving your RM3 to a place with less IR sources.

  22. Main issue with the RM Bridge is it *only* support the RM devices… all of the other devices are out in the cold. Whilst poking around with RM Plugin for Tasker, I noted that it has a HTTP Bridge which lets you control all of the supported devices (hint, lots more than RM Bridge does) including interrogating them and controlling them properly. It also has an Alexa Bridge (alas, no Google Assistant plugin.. but at least you can utilise the HTTP Bridge with basic user/pass… not sure I would trust exposing it to the internet though…. hmmmm

  23. Interesting and helpful article, exactly what I was looking for but there is a problem
    What if you have neither ios or android devices? is there a way to configure the RM3 from a PC?

    my eventual control will be mostly triggered from IFTTT, do the RM3 commands have to go via an android/ios phone? even if I had one, it wouldn’t be in the house when I wanted the commands to be broadcast.

    1. You could use HomeAssistant on a PC, for a much higher power use than a random ‘Droid, but setting that up is a whole pile of hurt…

  24. Just stopped working as of 2 days ago. Is it just me? I am no getting messages such as
    {“code”:2,”msg”:”mac:12:34:56:78:90:AB not rm2″} when manually trying to access the URL.
    Anyone troubleshoot this yet?

  25. Hello i use the RM PRO for a while now but i would like to setup one in the kitchen and one in my bedroom. is there a way to setup multiple RM PRO or RM BEAN since the android app only controles one ip adresse… is there a way thanks

  26. stopped working also for me. And, as far as I’m into that, this is not ALWAYS the case, it works somtimes. Gets me crazy to try to find what is the problem.
    Ordered a new RM3 mini, will try to install it and see whether it’s about new possible firmware update.

  27. It could be the router, BUT nothing has changed in my home setup last year, and it looks like broadlink
    (the Company) could have messed things up due to some internal ***hit since I’m in the EU.

    Will try to see what is the reason…

Comments are closed.