In part 1 of this 2 series post, I will detail how I took an IR controllable humidifer and integrated it into my home-automation system. I will list the steps I took and the code needed. In Part 2 I will discuss how I actually brought this integration into Home-Assistant and set up Voice control with Amazon Alexa.
We recently purchased an Electrolux humidifier (Ultrasonic humidifier EHU-3715D). We were keen to try it out. When we opened it, my other half was busy setting everything up, and she threw me the remote control to put batteries in. What she didn’t realise was that after 15 minutes, not only had I just put the batteries in, but I had imported it into node-red and then brought it into Home-Assistant, complete with Alexa voice control.
This was accomplished with the help of my Broadlink RM3 mini. For those of you not familiar with the broadlink IR products, this should provide a nice introduction into this very cost effective method of controlling appliances with IR. Just to note, at the time of writing this, they’ve just released a Broadlink mini 4, but i was using the 3rd generation. I don’t expect there to be any difference in the steps taken.
You can find the Broadlink Mini I used here
Broadlink RM3 Mini
First, open up Node-red and install the following palette: node-red-contrib-broadlink-control
This should then reveal the following nodes:
There are two we need to be concerning ourselves with. Firstly, we need the discover node and the RM node.
We will use the discover node to check that we are actually able to connect to the Broadlink Mini, and then we will use the RM node to actually begin interacting with the Mini in both a learning and sending capacity.
Press the inject on the top line and then check the debug node, if you’ve set your broadlink mini up correctly and it’s on your network this is the result you should be seeing:
Ok so far so good. Now we need to look at the bottom flow to start learning some codes. The function node looks like this:
The configuration Node (RM Broadlink Mini) looks like this:
It’s important to note that you need to set the Action to Learn. If you have more than one Broadlink on your network you need to make sure that you’re using the correct device by comparing the device ID you received earlier from the discover node. Deploy the flow once ready.
Next, we hit the inject node and check the debug output to see what to do next. If everything’s set up correctly, you should see the debug asking you to send an IR signal within 30 seconds. Once you receive this, point and shoot with the remote control that you’re looking to learn and wait for the capture results.
You have now captured that IR signal in the correct format needed. Make a note of this complete payload and the corresponding button that generated in on the remote control. Now repeat with the rest of the buttons that you wish to learn.
Once finished, we now need to set up a broadcast node. We need to make sure that the Broadcast mini has line of sight with the appliance to be controlled (in this instance the humidifier).
The nodes will look like this:
The Broadlink Broadcast node will look like this:
I found it easier to set the msg from payload which gave me full control of exactly what I was sending, and makes it neat and easy to repeat and add more commands to the flow.
Now for the actual message, you need to copy the IR signal you recorded earlier and combine it with the following code (remembering to close brackets at the end of the IR code).
At that point, I deployed the flow, and tested the inject. Everything worked perfectly. I pressed the inject once, the humidifer turned on, I then pressed it a second time and the humidifier switched itself back off.
I then repeated the process with several other IR commands that I had previously captured and within minutes i had managed to fully replicate the remote control so that I had full control via node-red.
Once you reach this point, then the fun really starts. Once in node-red you’re able to swap out the inject node for any number of automation inducing possibilities.
I can trigger the humidifer to come on at a certain time of the evening, from a telegram request, from an incoming tweet or email. It can respond to humidifer readings from my Xiaomi Aqara humidity sensors. The possibilities are endless.
Look at Part 2 where I integrate Amazon’s Alexa and Home-Assistant for further control.
I came across this tutorial and was very interested to try it out.
I have 3 RM3 Minis.
The discovery section was problem free. All 3 Minis were identified.
The problem started with the learning process.
I set it up as you said, except for the ‘Catalog’ field in ‘Edit rmdevice node’
I do not know what this should be.
I set it to /config/www
The RM Mini white LED turns on and responds to a command from the remote control.
The response is:
This is the payload: [object Object]
My system consists of a RPi3 with Hassio and the node ed add-on installed.
What am I missing?
Hi Pierre, firstly, apologies for the delay in coming back to you. Comment notifications had been somehow disabled. I am looking for the ‘catalogue’ field that you’ve mentioned, but I am unable to see it. Where are you seeing ‘catalogue’ ?
When I generate a payload I receive the array of numbers separated via commas… i.e. “This is the payload: 38,0,216,0,…….19,18,19,0,13,5”. What node are you using? I am using node-red-contrib-broadlink-control (vers 1.0.6).
Everything seems to work other than every time I generate a code from the remote for the power button the return payload values are different every time and when using node red to trigger sending the code it does nothing. Why am I getting different codes every time I run the learn function?
Not seen that behaviour before. May I ask what remote or what is it you’re trying to actually control?