lprhodes / homebridge-broadlink-rm

Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
571 stars 284 forks source link

SCAN RF codes #425

Open leonardoluizvp opened 5 years ago

leonardoluizvp commented 5 years ago

Hi, I have a Broadlink RM Pro and I bought a Sonoff RF that works fine with de control. But I can't scan the RF code. I try it but just scan the first code. Can you help me?

the log

[Broadlink RM] [INFO] Scan RF (scanning) [2018-8-22 12:24:52] [Broadlink RM] [ACTION] Hold down the button that sends the RF frequency. [2018-8-22 12:24:56] [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2) [2018-8-22 12:25:13] [Broadlink RM] [INFO] Scan RF (stopped - 20s timeout) [2018-8-22 12:25:14] [Broadlink RM] [INFO] Scan RF (stopped)

sushenmathur commented 5 years ago

When you see Scan RF (found frequency - 1 of 2), turn of on the Learn IR code switch and press the required button on the RF remote. Worked for me.

juaning commented 5 years ago

When you see Scan RF (found frequency - 1 of 2), turn of on the Learn IR code switch and press the required button on the RF remote. Worked for me.

Thanks, I looked for this a lot! Cheers!

codafish-gmbh commented 5 years ago

I don't get it. I press the "Scan Frequency" button in my Home app. Then I'm pressing the button on the remote which I would like to control. But the scan mode always quits due to a timeout.

[2019-4-7 21:28:13] [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2) [2019-4-7 21:28:32] [Broadlink RM] [INFO] Scan RF (stopped - 20s timeout) [2019-4-7 21:28:33] [Broadlink RM] [INFO] Scan RF (stopped)

I'm using node v8.12.0 with the following global packages installed: /usr/local/lib ├── homebridge@0.4.48 ├── homebridge-broadlink-rm@3.5.5 ├── node-gyp@3.8.0 └── npm@6.9.0

Is there any way to get the scan functionality work? On e-remote the scan mode works without problems.

Thanks a lot for your help :)

sushenmathur commented 5 years ago

@timoberlin after you see the message [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2) you can turn on the Scan IR switch in homekit and then press the remote button. That worked for me

codafish-gmbh commented 5 years ago

@sushenmathur: Thanks for your reply. But how shall this work? The message "[Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2)" only appears when you already have activated the "Scan Frequency" switch. :/

sushenmathur commented 5 years ago

@timoberlin There are two switches Scan RF and Scan IR, Turn on Scan RF Switch, press and hold the button you want to learn on the remote. When you see the message "[Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2)" turn on switch Scan IR and press button on the remote again and you will see the RF code captured in the log output

codafish-gmbh commented 5 years ago

Thanks a lot :) that helped!!!

gondalez commented 4 years ago

Thanks, this helped me too. I found the "1 of 2" part a little confusing. I was waiting for something else to happen.

Would a good improvement would be to change the logging messaging as follows? 🤔

Old message [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2)

New message [Broadlink RM] [INFO] [Scan RF] Found frequency. Next, turn on the Learn switch to start learning.

If everyone is happy with that I can create a pull request.

lprhodes commented 4 years ago

Hey @gondalez I'll be re-developing to RF Scanning feature over the next week, it is actually 1 of 2 but the RM looks to work slightly differently depending on the version of the firmware

gondalez commented 4 years ago

Cool thanks @lprhodes. And thanks for the plugin in general 🙏

Having looked at the scanning flow I think I see what you mean.

I press the scan frequency and see Scan RF (found frequency - 1 of 2) after pressing a button on the remote. I never see Keep holding that button or Scan RF (found frequency - 2 of 2) though.

I can however quickly press Learn and press the remote button I need and it works. I have to be quick before scan RF times out. It adds a sense of excitement to the process 😅

This is learning some mercator grange v2 DC fans. My pro+ firmware is v43.

lprhodes commented 4 years ago

I think I just fixed this with release 3.6.17 but I'm unable to confirm, can you give it a try and let me know please?

70mmy commented 4 years ago

I'm on the 3.6.18 version, with a RM PRO+ (I don't know how to get the firmware version for it).

Learn RF works only by also turning on Learn IR after found frequency - 1 of 2. So it does not look to be fixed

lprhodes commented 4 years ago

3.6.20 adds a work-around which works consistently for me. I'll have a better fix once I can check out the packets being sent/received by the Broadlink apps.

lprhodes commented 4 years ago

I vaguely remember seeing mention of the RF buffer getting full (or not resetting each time) and the RM Pro becoming unusable until restarted. If anyone recalls where that conversation was it'd be a huge help.

NexGen-3D-Printing commented 4 years ago

Doesn't work for me, was working with a real old version but now, nothing will make it learn, driving me nuts, only wish there was a better product to purchase, I'd buy it today.

I tried every way of mashing the learn buttons in all different sequences, nothing works for me.

[2/13/2020, 2:39:05 AM] [Broadlink RM] [INFO] Scan RF (scanning) [2/13/2020, 2:39:05 AM] [Broadlink RM] [ACTION] Hold down the button that sends the RF frequency. [2/13/2020, 2:39:07 AM] [Broadlink RM] [INFO] Scan RF (found frequency - 1 of 2) [2/13/2020, 2:39:07 AM] [Broadlink RM] [ACTION] Keep holding that button! [2/13/2020, 2:39:09 AM] [Broadlink RM] [INFO] Learn Code initializing (undefined) [2/13/2020, 2:39:09 AM] [Broadlink RM] Learn Code (ready) [2/13/2020, 2:39:15 AM] [Broadlink RM] [INFO] Scan RF (found frequency - 2 of 2) [2/13/2020, 2:39:15 AM] [Broadlink RM] [ACTION] Press the RF button multiple times with a pause between them. [2/13/2020, 2:39:19 AM] [Broadlink RM] [INFO] Learn Code (stopped - 10s timeout) [2/13/2020, 2:39:19 AM] [Broadlink RM] [INFO] Learn Code (stopped) [2/13/2020, 2:39:23 AM] [Broadlink RM] [INFO] Learn Code initializing (undefined) [2/13/2020, 2:39:23 AM] [Broadlink RM] Learn Code (ready) [2/13/2020, 2:39:29 AM] [Broadlink RM] [INFO] Learn Code (stopped) [2/13/2020, 2:39:30 AM] [Broadlink RM] [INFO] Learn Code initializing (undefined) [2/13/2020, 2:39:30 AM] [Broadlink RM] Learn Code (ready) [2/13/2020, 2:39:32 AM] [Broadlink RM] [INFO] Scan RF (stopped) [2/13/2020, 2:39:32 AM] [Broadlink RM] [INFO] Learn Code (stopped) [2/13/2020, 2:39:34 AM] [Broadlink RM] [INFO] Learn Code initializing (undefined) [2/13/2020, 2:39:34 AM] [Broadlink RM] Learn Code (ready) [2/13/2020, 2:39:34 AM] [Broadlink RM] [INFO] Scan RF (scanning) [2/13/2020, 2:39:34 AM] [Broadlink RM] [ACTION] Hold down the button that sends the RF frequency. [2/13/2020, 2:39:35 AM] [Broadlink RM] [INFO] Learn Code (stopped) [2/13/2020, 2:39:39 AM] [Broadlink RM] [INFO] Learn Code initializing (undefined) [2/13/2020, 2:39:39 AM] [Broadlink RM] Learn Code (ready) [2/13/2020, 2:39:49 AM] [Broadlink RM] [INFO] Learn Code (stopped - 10s timeout) [2/13/2020, 2:39:49 AM] [Broadlink RM] [INFO] Learn Code (stopped) [2/13/2020, 2:40:35 AM] [Broadlink RM] [INFO] Scan RF (stopped - 20s timeout) [2/13/2020, 2:40:36 AM] [Broadlink RM] [INFO] Scan RF (stopped)

NexGen-3D-Printing commented 4 years ago

My fix for the issue: https://github.com/lprhodes/homebridge-broadlink-rm/issues/514

wdrovere commented 4 years ago

When you see Scan RF (found frequency - 1 of 2), turn of on the Learn IR code switch and press the required button on the RF remote. Worked for me.

Thanks so much!!