How to Control iBroadlink RM Mini 3 from RASPBERRY PI or Ubuntu 16.04 LTS

A few days ago I bought an iBroadlink RM mini 3, it is a cheap IR Control that you can use to send IR Signal from a WIFI network. You can control a lot of IR equipment as TVs, STBs, ar-conditioning, heaters and others.

rmmini-3

This product has software for iOS and Android, it is amazing for dummy users. But it enables a connection from your local network to a chinese site. I don’t like this kind of solution that is invasive, but is easy for the customers.

I’ve an old RPI mobel B+, 512mb RAM working with Raspbian Jessy and I started learning how to control my RM mini 3 by a command line. I found some good projects in Github which I’ve used as base for my project.

I took the project Python Broadlink as base and as the result I wrote the following script named EnableBroadlink.sh. If you prefer you can execute line by line, the results are the same.

#!/bin/bash
sudo su
cd /home/pi
mkdir rm3
cd rm3
apt-get update
apt-get -y install python-dev
apt -y install python-pip
apt-get -y install git
git clone https://github.com/mjg59/python-broadlink.git
cd python-broadlink/
python -m pip install pycrypto
python -m pip install netaddr
wget https://bootstrap.pypa.io/get-pip.py
python setup.py install

After a successful installation I got my RM mini 3 working, just using the command in the rm3/python-broadlink/cli folder :

./broadlink_discovery

This command returned the following information:

discovery-1

The following command line was used to send commands to the RM mini 3:

./broadlink_cli --type 0x2712 --host 192.168.88.07 --mac aabbccddeeff

First test, get response from RM mini 3, in this case get the temperature:

broadlink_cli --type 0x2712 --host 192.168.88.07 --mac aabbccddeeff --temp

And the result was:

11.6

It is working! Let’s go to the next step:  Create a file with codes from a TV remote control. Let’s use the RM mini 3 to get the codes and save it in a file.

a) Execute the following command:

./broadlink_cli --type 0x2712 --host 192.168.88.07 --mac aabbccddeeff --learnfile OFFICE-TV.power

At this moment the led is in white color.

b) Point you TV Remote Control to RM mini 3 anc press power.

OFFICE-TV.power

Led is off now and file created. Success!

Now I can use it to turn on and turn off my TV, see the command below:

./broadlink_cli --type 0x2712 --host 192.168.88.07 --mac aabbccddeeff --send @OFFICE-TV.power

I did the same procedure for other TV Remote Control buttons as volume up, volume down, source and others. Everything works.

Enjoy it.

Bye.

Alex.

Advertisements