kiwi-cam / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
300 stars 95 forks source link

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

Open KE55ARD opened 1 year ago

KE55ARD commented 1 year ago

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 commented 1 year ago

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.

kiwi-cam commented 1 year ago

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

KE55ARD commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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)

rpungello commented 1 year ago

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

armisoft commented 12 months ago

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

Suffering from the same issue. Any idea?

brad-agencyroot commented 10 months ago

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
            }
        }
    ]
}
KE55ARD commented 10 months ago

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

realkubb commented 10 months ago

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)

ggroel commented 10 months ago

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: @.***>

glenoxyde commented 10 months ago

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.

mutaben commented 10 months ago

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:

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

ggroel commented 10 months ago

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
            }
mutaben commented 10 months ago

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 commented 10 months ago

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 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.

KE55ARD commented 5 months ago

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.