homebridge-broadlink-rm icon indicating copy to clipboard operation
homebridge-broadlink-rm copied to clipboard

Cannot connect to my bridge, does not auto discover or find when host IP and MAC are specified

Open KE55ARD opened this issue 1 year ago • 18 comments

I cannot connect the Broadlink RM plugin (in HOOBS) to my BroadLink RM 4 Pro.

I've tried a whole bunch of different config options including setting the Host information, and nothing seems to connect according to the log.

My current config I've managed to get to is:

{ "platform": "homebridge-broadlink-rm-pro", "name": "Broadlink RM", "hideScanFrequencyButton": true, "hideLearnButton": false, "hideWelcomeMessage": true, "hosts": [ { "address": "x.x.x.x", "mac": "x:x:x:x:x:x", "isRFSupported": false, "isRM4": true } ] }

KE55ARD avatar Aug 13 '23 10:08 KE55ARD

To be honest I don't think it's paying any attention to my config, as it still launches with the welcome message in my log, and says: BroadlinkRMNo accessories have been added to the "undefined" platform config.

KE55ARD avatar Aug 13 '23 11:08 KE55ARD

You're right :-) The platform needs to be EXACTLY "BroadlinkRM", anything else will not work: https://broadlink.kiwicam.nz/#platform-options

kiwi-cam avatar Aug 13 '23 20:08 kiwi-cam

Indeed I saw that, issue is whenever I change the platform to "BroadlinkRM" in the config, it refreshes and reverts back to "homebridge-broadlink-rm-pro" :/

KE55ARD avatar Aug 14 '23 09:08 KE55ARD

I even just Uninstalled the plugin entirely from HOOBS, rebooted the Pi, and re-installed it and named it BroadlinkRM from the popup during the install process and I ended up with the following config: { "platform": "homebridge-broadlink-rm-pro" }

So I changed it to: { "platform": "BroadlinkRM" }

And it still reverted back.

KE55ARD avatar Aug 14 '23 09:08 KE55ARD

Ok I think I've gotten myself closer to figuring this out. I've gone and found the config file on the Pi and edited myself, and discovered it has 2 separate platform configs:

"platforms":[{"platform":"BroadlinkRM",{"platform":"homebridge-broadlink-rm-pro"}]

When I choose to edit the configuration in HOOBS it's clearly allowing me to only see/edit the second, and hence renaming it correctly reverts because there are then 2 of the same name. If I add options manually into the BroadlinkRM platform and restart the bridge, I start to actually see things take effect in the log!

KE55ARD avatar Aug 14 '23 09:08 KE55ARD

Apologies for spamming this thread, but I just added a hosts and accessories section to the config manually and it seems to be working, but trying to use the Learn button it creates throws the following error:

BroadlinkRM[ERROR] Learn Code (Couldn't learn code, device not found)

KE55ARD avatar Aug 14 '23 10:08 KE55ARD

Apologies for spamming this thread, but I just added a hosts and accessories section to the config manually and it seems to be working, but trying to use the Learn button it creates throws the following error:

BroadlinkRM[ERROR] Learn Code (Couldn't learn code, device not found)

I'm having the same issue

rpungello avatar Aug 16 '23 18:08 rpungello

BroadlinkRM[ERROR] Learn Code (Couldn't learn code, device not found)

Suffering from the same issue. Any idea?

armisoft avatar Aug 24 '23 15:08 armisoft

Has anyone had any luck with this? I'm seeing the same error: [9/25/2023, 1:26:36 PM] [BroadlinkRM] [ERROR] Learn Code (Couldn't learn code, device not found)

I've confirmed the device is unlocked, and have tried automatic detection as well as manual setup.

HomeBridge is running on an M1 Mac mini, on the same network/subnet as the Broadlink Pro RM4.

config.json

{
    "bridge": {
        "name": "Homebridge 318C",
        "username": "0E:C7:03:7E:31:8C",
        "port": 51191,
        "pin": "514-75-647",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "platform": "BroadlinkRM",
            "name": "BroadlinkRM",
            "hosts": [
                {
                    "address": "192.168.0.70",
                    "mac": "e8:16:56:25:ce:e0",
                    "isRFSupported": true,
                    "isRM4": true
                }
            ],
            "logLevel": "debug",
            "_bridge": {
                "username": "0E:68:B2:8A:63:81",
                "port": 45152
            }
        }
    ]
}

brad-agencyroot avatar Sep 25 '23 17:09 brad-agencyroot

Still not managed to get any further with this myself. Been stuck with a BroadLink that's doing nothing due to this plugin bug...

KE55ARD avatar Sep 26 '23 08:09 KE55ARD

I'm having the same issue, i think? What's interesting is that in the log it shows the plugin "adding RF support to device [mac address] with type 5213"

But then it says device not found when i try to use learn. I've tried auto and specifying host info. Ensures lock was off. Even deleted the device from my broadlink acct, started a new acct, and readded the device quitting the app once it was connected to the network but before it was added to my acct and a room since i saw that recommended on an old post.

Will watch to see if anyone else has any luck (or if anyone sees I'm doing something else wrong since this is a first go for me)

realkubb avatar Sep 28 '23 08:09 realkubb

Hello, I have 5 rm4mini and they work perfectly for me with the following configuration…        {            "platform": "BroadlinkRM",            "name": "Broadlink",            "hideWelcomeMessage": true,            "hideScanFrequencyButton": true,            "hideLearnButton": true,            "hosts": [                {                    "address": "10.0.0.20",                    "mac": "xxxxxxx",                    "isRFSupported": false,                    "isRM4": true                },                {                    "address": "10.0.0.21",                    "mac": "xxxxxxx",                    "isRFSupported": false,                    "isRM4": true                },                {                    "address": "10.0.0.22",                    "mac": "xxxxxxx",                    "isRFSupported": false,                    "isRM4": true                },                {                    "address": "10.0.0.23",                    "mac": "xxxxxxx",                    "isRFSupported": false,                    "isRM4": true                },                {                    "address": "10.0.0.24",                    "mac": "xxxxxxx",                    "isRFSupported": false,                    "isRM4": true                }            ],            "accessories": [                {                    "name": "IR Living",                    "host": "10.0.0.20",                    "type": "learn-code",                    "scanFrequency": false                },                {                    "name": "IR Comedor",                    "host": "10.0.0.21",                    "type": "learn-code",                    "scanFrequency": false                },                {                    "name": "IR Mir y Gastón",                    "host": "10.0.0.22",                    "type": "learn-code",                    "scanFrequency": false                },                {                    "name": "IR Luli",                    "host": "10.0.0.23",                    "type": "learn-code",                    "scanFrequency": false                },                {                    "name": "IR Facu",                    "host": "10.0.0.24",                    "type": "learn-code",                    "scanFrequency": false                }GastónEl 28 sept 2023, a la(s) 05:23, realkubb @.***> escribió: I'm having the same issue, i think? What's interesting is that in the log it shows the plugin "adding RF support to device [mac address] with type 5213" But then it says device not found when i try to use learn. I've tried auto and specifying host info. Ensures lock was off. Even deleted the device from my broadlink acct, started a new acct, and readded the device quitting the app once it was connected to the network but before it was added to my acct and a room since i saw that recommended on an old post. Will watch to see if anyone else has any luck (or if anyone sees I'm doing something else wrong since this is a first go for me)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

ggroel avatar Sep 28 '23 11:09 ggroel

Hi, same issue here with a RM4 Pro. Running Homebridge on a Pi, the plugin configuration looks a lot like @brad-agencyroot 's. I also noticed that the plugin successfully catches the mac address of the device while using auto-discovery (it can even fetch the type number: 5213). No luck when it comes to the error at hand though :

[ERROR] Learn Code (Couldn't learn code, device not found)

Using auto-discovery or specifying a host in the configuration doesn't change the outcome.

glenoxyde avatar Oct 03 '23 20:10 glenoxyde

I'm having the same issue, I have an RM4 Pro. The plugin cannot auto discover it and even if I specify the IP/MAC addresses, it still won't work.

What I have tried/made sure of:

  • Device is unlocked in the Broadlink app settings
  • I even tried to completely reset the RM4 Pro and tried to make it work right after making the WiFi setup
  • I have downgraded the plugin to older versions
  • I have run the plugin from a Raspberry Pi and a Mac, each time of course being on the same network as the RM4 Pro
  • I have specified the hosts object/array with IP/Mac addresses, doesn't help at all

I don't know anymore how to troubleshoot this, even in debug/trace mode the logs don't say much.

mutaben avatar Oct 11 '23 08:10 mutaben

Hello, I have 5 rm4mini and they work perfectly for me with the following configuration…

    {
        "platform": "BroadlinkRM",
        "name": "Broadlink",
        "hideWelcomeMessage": true,
        "hideScanFrequencyButton": true,
        "hideLearnButton": true,
        "hosts": [
            {
                "address": "10.0.0.20",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.21",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.22",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.23",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.24",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            }
        ],
        "accessories": [
            {
                "name": "IR Living",
                "host": "10.0.0.20",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Comedor",
                "host": "10.0.0.21",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Mir y Gastón",
                "host": "10.0.0.22",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Luli",
                "host": "10.0.0.23",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Facu",
                "host": "10.0.0.24",
                "type": "learn-code",
                "scanFrequency": false
            }

Gastón

El 28 sept 2023, a la(s) 08:30, Gastón Groel @.***> escribió:

Hello, I have 5 rm4mini and they work perfectly for me with the following configuration…

    {
        "platform": "BroadlinkRM",
        "name": "Broadlink",
        "hideWelcomeMessage": true,
        "hideScanFrequencyButton": true,
        "hideLearnButton": true,
        "hosts": [
            {
                "address": "10.0.0.20",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.21",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.22",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.23",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            },
            {
                "address": "10.0.0.24",
                "mac": "xxxxxxx",
                "isRFSupported": false,
                "isRM4": true
            }
        ],
        "accessories": [
            {
                "name": "IR Living",
                "host": "10.0.0.20",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Comedor",
                "host": "10.0.0.21",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Mir y Gastón",
                "host": "10.0.0.22",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Luli",
                "host": "10.0.0.23",
                "type": "learn-code",
                "scanFrequency": false
            },
            {
                "name": "IR Facu",
                "host": "10.0.0.24",
                "type": "learn-code",
                "scanFrequency": false
            }

ggroel avatar Oct 11 '23 11:10 ggroel

Thank you @ggroel but it doesn't really help unfortunately, your configuration is specific to you and for instance you have disabled RF everywhere, whereas RF is exactly what I want to do in my case.

mutaben avatar Oct 11 '23 16:10 mutaben

I think I was able to isolate the issue within the dependency used to discover devices also forked by @kiwi-cam (https://github.com/kiwi-cam/broadlinkjs-rm)

I ran the lib by itself and here are my findings in my specific case:

  • I call the discover() method to initiate the process
  • Very quickly, the device responds (first message received through the onMessage binding) after the initial socket is created in discover()
  • Device creation succeeds, mac address is successfully retrieved
  • Device type is also found (0d21011, 0x5213) matching an "Broadlink RM4 Pro" in the rm4PlusDeviceTypes array
  • All assertions in addDevice method are okay
  • After that, the authenticate() method on the previously created Device is called
  • The socket.on('message', (response) => { ...}) callback in setupSocket() is never called, so I think either the message sent in authenticate() fails, or the RM4 Pro just stops responding for some reason

I would be happy to debug more and get to the bottom of it. I only have a non-working device so I can't compare with a functioning right behaviour.

mutaben avatar Oct 11 '23 19:10 mutaben

For anyone else here struggling with this issue. I've managed to find a solution!

Which is simply to revert the firmware on the Broadlink hub to this version using the manual software update via url in device properties.

KE55ARD avatar Feb 29 '24 13:02 KE55ARD