Important Only get the RM4C Mini connected to your wifi network - DO NOT allow it to connect to the cloud. The following worked for me:
Install the Broadlink app from the Android Play store (I presume an iOS equivalent is available)
Make an account with Broadlink - this is unfortunately necessary because you can’t seem to use the app without one
Exit out of the app completely (for me, that’s pressing the square icon on the Android menu bar at the bottom of the screen, then swiping that app window upwards)
Connect the RM4C Mini to power, and press the reset until the blue light starts to flash quickly (multiple times a second)
Press the reset again for longer (>10 seconds) until the blue light starts to flash more slowly (about once per second).
The RM4C Mini is now a wifi access point. Connect your phone to the access point (it will probably have Broadlink in the name). It may take a little bit of time for the access point to appear in your wifi list.
Once connected, start up the Broadlink app. I was asked for a bunch of information again (country etc), and had to login again. There was then a complaint that it can’t connect to the internet, but ultimately it goes through a ‘home screen’, and it will inform you (potentially not immediately) that it has found a compatible device.
Choose to setup the device, and enter your home wifi name and password. Watch as it sets up the device, then exit the app again.
Find out the IP address of the RM4C Mini on your network using your wifi router’s management pages. Mine was 192.168.1.120 .
At this point, I also blocked the RM4C Mini from accessing the internet, again using the wifi routers management pages.
Many thanks for sharing the history.
I was able to connect the RM4 Pro using Broadlink’s app and I made sure not to add the device into the app after it connected to my wifi network.
I then disconnected the RM4 Pro from the cable and waited at least 10 seconds.
Next, I reconnected the cable and tried to run the next step in terminal:
It’s possible that I have the python-broadlink module installed for both python 2 and python 3, which means that I wouldn’t have got the error you’re showing. If that’s the case, I need to update the guide!
OK. You’ve helped me plenty already
I’ll try to find another way, and if I don’t find one, I’ll try the MQTT solution in your explanation.
Many many thanks
Hi @hafniumzinc
I want to try your full MQTT solution.
Can you suggest which Mosquitto package I should install for your solution?
On the Raspberry pi’s “add/remove software” I see a few Mosquitto packages:
MQTT version 3.1/3.1.1 client library
MQTT version 3.1/3.1.1 client library, development files
MQTT version 3.1/3.1.1 client C++ library
MQTT version 3.1/3.1.1 client C++ library, development files
Next step, learning remote codes.
I’m seeing this error in Terminal 1:
pi@raspberrypi:~/broadlink-mqtt $ python3 mqtt.py
[2020-08-21 16:59:53,757] DEBUG Connected to 'RM4' Broadlink device at '192.168.1.6' (MAC 89:c6:b9:a7:df:24) and started listening for commands at MQTT topic having prefix 'broadlink/'
[2020-08-21 16:59:53,764] DEBUG Connected to MQTT broker, subscribing to topic broadlink/#
[2020-08-21 17:01:53,995] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
[2020-08-21 17:03:54,091] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
[2020-08-21 17:05:54,104] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
[2020-08-21 17:07:54,226] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
[2020-08-21 17:07:55,133] DEBUG Received MQTT message broadlink/bedroom/bedroom_fan/low record
[2020-08-21 17:07:55,133] DEBUG Recording command to file /home/pi/broadlink-mqtt/commands/bedroom/bedroom_fan/low
[2020-08-21 17:08:00,467] ERROR Error
Traceback (most recent call last):
File "mqtt.py", line 198, in on_message
record(device, file)
File "mqtt.py", line 254, in record
ir_packet = device.check_data()
File "/usr/local/lib/python3.7/dist-packages/broadlink/__init__.py", line 631, in check_data
check_error(response[0x22:0x24])
File "/usr/local/lib/python3.7/dist-packages/broadlink/exceptions.py", line 97, in check_error
raise exception(error_code)
broadlink.exceptions.StorageError: The device storage is full
[2020-08-21 17:09:54,234] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
[2020-08-21 17:11:54,351] DEBUG Sending RM temperature 0.0 to topic broadlink/temperature
Thanks for this info
Does it mean I’m stuck till they fix the problem?
Or will I be able to use the workaround described in the second link?
Try the following lines in the Python interactive shell:
First find your device and enter learning mode
import broadlink device = broadlink.discover() devices.auth() device.enter_learning()
Now the LED indicator should be white, press the button now. After that, run:
packet = devices.check_data() print(packet.hex())
This should show the IR packet in hex format.