Adding the RF controlled Ceiling Extractor Fan... another Broadlink RM story.



My friends have a jet engine in the kitchen..... oops, sorry, I mean a Luxair Flush Ceiling Extractor Fan. Do not let that picture fool you, at that distance it would be as much use as a chocolate teapot!

It uses an RF Remote which has 4 buttons:

  • On/Off
  • Fan +
  • Fan -
  • Light On/Off
so, obviously the Broadlink RM Pro should come to the rescue here. I've had a great deal of success with the RM Pro 3, but we decided to get the RM Pro 4.... because the number is bigger, and so it must be better. Right?

This has to be used by a Homebridge Broadlink RM Pro plugin, This is a great plugin, except it does not have a UI configuration capability. You have to modify the JSON yourself.

First of all, you install the plugin via the UI, and do a reboot.

When it reboots, you should see the RM Pro being found automatically. If it isn't, then you can hard code the device. I've shown how to do that in an earlier article.

If it is automatically found, you'll see a line in the log file like:

[10/3/2021, 2:22:55 PM] [Broadlink RM] [INFO] Discovered Broadlink RM4 Pro (653c) at 192.168.68.124 (a0:43:b0:54:71:f0)

You should now find the the "Learn" and "Scan Frequency" switches appear in the same room as your Homebridge.


Because we are going to use an RF code, this means we will use "Scan Frequency".

You need to look at the Homebridge log file. With the Config UI this is, by default, displayed on the main screen.

You then press "Scan Frequency" in the Home App, and you will now follow the instructions in the log file.

[10/3/2021, 2:21:21 PM] [Broadlink RM] [INFO] Scan RF (scanning) 

[10/3/2021, 2:21:21 PM] [Broadlink RM] [ACTION] Hold down the button that sends the RF frequency. 

[10/3/2021, 2:21:35 PM] [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2)[10/3/2021, 2:21:35 PM] [Broadlink RM] [ACTION] Keep holding that button! 

[10/3/2021, 2:21:36 PM] [Broadlink RM] [INFO] Scan RF (found frequency - 2 of 2)[10/3/2021, 2:21:36 PM] [Broadlink RM] [ACTION] Press the RF button multiple times with a pause between them to get code. 

[10/3/2021, 2:21:39 PM] [Broadlink RM] [INFO] Scan RF (complete) 

[10/3/2021, 2:21:39 PM] [Broadlink RM] [RESULT] Hex Code: b1c07c00a69e06000b0a180b170b180b17170b170b170c170b170b170c0b170b170c16180b0b17170b180b0b170003220d0b170b180b170b17170b170c160c170b170c160c0b170c160c16180b0c16170b180b0c160003230c0b170b180b170b17170c160c170b170b170c160c0b170c160c17170b0c16180b170b0c160005dc00000000000000000000 

[10/3/2021, 2:21:39 PM] [Broadlink RM] [INFO] Scan RF (stopped)

 You will need that RF code.

I had some real difficulties in this case as the code was often way too long, and caused teh fan to turn on, and off, and on, and off, etc, etc because it is a toggle button. Also, the instructions scrolled quite rapidly. Eventually, you get to learn roughly how quickly the instructions come out, and you can time it about right.

When you have the Hex codes for each button, you can start configuring. I personally found it a good idea to try one button at a time.

We also have two accessories here, the fan and the light.

The light was quite simple as it is just a toggle and once you have the hex code, it is the same for both on and off.

                {
                    "name": "Extractor Fan Light",
                    "type": "light",
                    "data": {
                        "on": "b1c07c00a69e06000b0a180b170b180b17170b170b170c170b170b170c0b170b170c16180b0b17170b180b0b170003220d0b170b180b170b17170b170c160c170b170c160c0b170c160c16180b0c16170b180b0c160003230c0b170b180b170b17170c160c170b170b170c160c0b170c160c17170b0c16180b170b0c160005dc00000000000000000000",
                        "off": "b1c07c00a69e06000b0a180b170b180b17170b170b170c170b170b170c0b170b170c16180b0b17170b180b0b170003220d0b170b180b170b17170b170c160c170b170c160c0b170c160c16180b0c16170b180b0c160003230c0b170b180b170b17170c160c170b170b170c160c0b170c160c17170b0c16180b170b0c160005dc00000000000000000000"
                    }
                }

The fan, though, was very different. It is variable speed, but I just has '+' and '-' buttons. When you turn it on, it runs at 33%, then you can do 66% or 100%. But getting their requires some though in logic as you may not always be starting from the same place.

E.g., if you are at 33% and you want to run at 100% you need two ups. That's simple enough. But what if you want 33% and you are running faster? As this device is stateless you do not know exactly where you are. To give you an idea.

If you are running at 33% and you want 66%, you go up one. However...

If you are running at 100% and want 66%, you need to go down one.

Essentially, what you have to do is pretend you are at 100% all the time, and then go from that point.

This means you have to program: 

  • 33% as 2 down. 
  • 66% as 2 down 1 up
  • 100% as 2 down 2 up.
Extra downs are superfluous. i.e., if you are at 33% and you want 66%, it doesn't matter that you send 2 downs as they do nothing.

This then makes the accessory look like this:

 
{
                    "name": "Kitchen extractor fan",
                    "type": "fanv1",
                    "hideSwingMode": true,
                    "hideRotationDirection": true,
                    "stepSize": 33,
                    "alwaysResetToDefaults": true,
                    "defaultFanSpeed": 33,
                    "data": {
                        "on": "b1c0a400a69e06000b0b180a180a180b17170b170b170c170b170b170c0b170b170c16180a0c170c160c16180b00034e0d0b170b170b180b17160c170b170c170b170b170c0b170b170c16180b0b170c160c16180a00034f0d0b170b170b180b17170b170b170c170b170b170c0b170b170c17170b0b170c160c16180a00034f0d0b170b170b170c17170b170b170b170c170b170c0b170b170c16170c0b170c160c16180b0005dc0000",
                        "off": "b1c08c04c49e06000c0a180a180b170b17170b170c160c170b170b170c0b170b170b17170c0b170b170c16180a00034e0c0b180a180b170b17170c160c170b170b170c160c0b170b170c16180b0b170c160c16180b00034d0d0b170b170b170c17160c170b170b170c170b170b0b170c170b17170b0c160c160c17170b00034d0d0b170b180b170b17170b170b170c160c170b170c0b170b170b17170b0c170b170c16170b0005dc0000",
                        "fanSpeed33": [
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000"
                            }
                        ],
                        "fanSpeed66": [
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a400929e06000b0a180a180b170b17170c160c170b170c160c170b0c160c170b17170b0c16180b0c160c1600034f0d0b170b170b170c16180b170b170c160c170b170c0b170b170c16180a0c17170b0c160c160003500c0b170c170b170b17170b170c170b170b170b180b0b170c160c17170b0c16180b0c160c1600034f0d0b170b170b170c17170b170b170b180b170b170b0c170b170c16170c0b17170b0c160c160005dc0000"
                            }
                        ],
                        "fanSpeed100": [
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a200929e0600170b170b170c17170b170b170b180b170b170b0c170c160c16180a0d160c16180a0d150003510b0c170b170b170c16180b170b170b180b170b170b0c160c170c16180a0c160d16180a0c160003500c0c160c170b170b17170b180b170b170b180b170b0c160c170b17180a0c160c17180a0c160003500c0b170c160c170b17170b170b180b170b170b180b0b170c160c16180b0c160c16180b0c160005dc00000000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a400929e06000b0a180a180b170b17170c160c170b170c160c170b0c160c170b17170b0c16180b0c160c1600034f0d0b170b170b170c16180b170b170c160c170b170c0b170b170c16180a0c17170b0c160c160003500c0b170c170b170b17170b170c170b170b170b180b0b170c160c17170b0c16180b0c160c1600034f0d0b170b170b170c17170b170b170b180b170b170b0c170b170c16170c0b17170b0c160c160005dc0000",
                                "pause": 0.1
                            },
                            {
                                "data": "b1c0a400929e06000b0a180a180b170b17170c160c170b170c160c170b0c160c170b17170b0c16180b0c160c1600034f0d0b170b170b170c16180b170b170c160c170b170c0b170b170c16180a0c17170b0c160c160003500c0b170c170b170b17170b170c170b170b170b180b0b170c160c17170b0c16180b0c160c1600034f0d0b170b170b170c17170b170b170b180b170b170b0c170b170c16170c0b17170b0c160c160005dc0000"
                            }
                        ]
                    }
                },

The "pause" statement gives a gap between the hex codes being transmitted, in seconds. In this case, I found that 0.1 of a second was enough.

Once you have rebooted homebridge, and tested the room looks like:



You can choose to hide the "Learn" and "Scan Frequency" switches now if you wish.


Comments

Popular Posts