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
304 stars 96 forks source link

Can't scan 315MHz frequency code, 433 works perfectly #282

Closed iznaf closed 3 years ago

iznaf commented 3 years ago

When i try to scan 315 MHz remote, i'm getting timeout - never got to phase 2. The remote button can be added using Broadlink original app - the app asks for frequency, i add 315 manually, and the code is learnt. No issues with 433MHz, works flawlessly.

iznaf commented 3 years ago

3/30/2021, 3:56:43 PM [Broadlink RM] [INFO] Scan RF (scanning) 3/30/2021, 3:56:43 PM [Broadlink RM] [ACTION] Hold down the button that sends the RF frequency. 3/30/2021, 3:56:43 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:1900000000000000000000000000 3/30/2021, 3:56:43 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:52571 (UDP) 3/30/2021, 3:56:44 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:44 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:45 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:45 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:45 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:60940 (UDP) 3/30/2021, 3:56:46 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:46 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:47 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:47 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:47 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:37547 (UDP) 3/30/2021, 3:56:48 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:48 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:49 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:49 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:49 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:41539 (UDP) 3/30/2021, 3:56:50 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:50 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:09001a00000000b08f06000000000000 3/30/2021, 3:56:51 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:51 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:09001a00000000b08f06000000000000 3/30/2021, 3:56:51 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:32824 (UDP) 3/30/2021, 3:56:52 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:52 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:53 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:53 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:53 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:59812 (UDP) 3/30/2021, 3:56:54 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:54 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:55 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:55 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:55 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:52343 (UDP) 3/30/2021, 3:56:56 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:56 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:57 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:57 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:57 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:54757 (UDP) 3/30/2021, 3:56:58 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:58 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:56:59 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:56:59 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:09001a00000000b08f06000000000000 3/30/2021, 3:56:59 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:36911 (UDP) 3/30/2021, 3:57:00 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:00 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:09001a00000000b08f06000000000000 3/30/2021, 3:57:01 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:01 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:01 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:51767 (UDP) 3/30/2021, 3:57:02 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:02 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:03 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:03 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:03 PM [Broadlink RM] [INFO] Listening for Broadlink devices on 192.168.68.141:53228 (UDP) 3/30/2021, 3:57:04 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:04 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:05 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:05 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:06 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:06 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:07 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:07 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:08 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:08 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:09 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:09 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:10 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:10 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:11 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:11 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:12 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:12 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:13 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001e 3/30/2021, 3:57:13 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:1e00000000000000000000000000 3/30/2021, 3:57:13 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001a 3/30/2021, 3:57:13 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received: 3/30/2021, 3:57:14 PM [Broadlink RM] [INFO] Scan RF (stopped - 30s timeout) 3/30/2021, 3:57:14 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Sending command:6a with payload: 04001e 3/30/2021, 3:57:14 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:1e00000000000000000000000000 3/30/2021, 3:57:14 PM [Broadlink RM] [INFO] Scan RF (stopped)

kiwi-cam commented 3 years ago

3/30/2021, 3:56:50 PM [Broadlink RM] [DEBUG] (24dfa7f1413f) Payload received:09001a00000000b08f06000000000000

Looks like it's finding frequency but we're not processing the message. Could you check which version of kiwicam-broadlinkjs-rm you have? Just run npm list -g --depth=1 and share the output.

iznaf commented 3 years ago

├─┬ @hoobs/hoobs@3.3.5 │ ├── archiver@5.3.0 │ ├── axios@0.21.1 │ ├── bufferutil@4.0.3 │ ├── commander@6.2.1 │ ├── cors@2.8.5 │ ├── express@4.17.1 │ ├── express-ws@4.0.0 │ ├── formidable@1.2.2 │ ├── fs-extra@9.1.0 │ ├── homebridge@1.3.3 │ ├── lodash@4.17.21 │ ├── node-cache@5.1.2 │ ├── node-pty@0.9.0 │ ├── prompts@2.4.0 │ ├── sanitize-filename@1.6.3 │ ├── semver@7.3.5 │ ├── systeminformation@5.6.8 │ ├── unzipper@0.10.11 │ ├── utf-8-validate@5.0.4 │ └── ws@7.4.4 ├─┬ homebridge-config-ui-x@4.41.0 │ ├── @nestjs/common@7.6.5 │ ├── @nestjs/core@7.6.5 │ ├── @nestjs/jwt@7.2.0 │ ├── @nestjs/passport@7.1.5 │ ├── @nestjs/platform-fastify@7.6.5 │ ├── @nestjs/platform-socket.io@7.6.5 │ ├── @nestjs/swagger@4.7.12 │ ├── @nestjs/websockets@7.6.5 │ ├── @oznu/hap-client@1.7.2 │ ├── axios@0.21.1 │ ├── class-transformer@0.3.2 │ ├── class-validator@0.13.1 │ ├── commander@6.2.1 │ ├── dayjs@1.10.4 │ ├── fastify@3.9.2 │ ├── fastify-multipart@3.3.1 │ ├── fastify-static@3.3.1 │ ├── fastify-swagger@3.5.0 │ ├── fs-extra@9.1.0 │ ├── helmet@4.4.1 │ ├── node-cache@5.1.2 │ ├── node-pty-prebuilt-multiarch@0.10.1-pre.3 │ ├── node-schedule@1.3.3 │ ├── ora@5.3.0 │ ├── p-limit@3.1.0 │ ├── passport@0.4.1 │ ├── passport-jwt@4.0.0 │ ├── pino-pretty@4.7.1 │ ├── reflect-metadata@0.1.13 │ ├── rxjs@6.6.6 │ ├── semver@7.3.5 │ ├── systeminformation@4.34.5 │ ├── tail@2.2.0 │ ├── tar@6.1.0 │ ├── tcp-port-used@1.0.2 │ └── unzipper@0.10.11 └─┬ npm@6.14.11 ├── abbrev@1.1.1 ├── ansicolors@0.3.2 ├── ansistyles@0.1.3 ├── aproba@2.0.0 ├── archy@1.0.0 ├── bin-links@1.1.8 ├── bluebird@3.5.5 ├── byte-size@5.0.1 ├── cacache@12.0.3 ├── call-limit@1.1.1 ├── chownr@1.1.4 ├── ci-info@2.0.0 ├── cli-columns@3.1.2 ├── cli-table3@0.5.1 ├── cmd-shim@3.0.3 ├── columnify@1.5.4 ├── config-chain@1.1.12 ├── debuglog@1.0.1 ├── detect-indent@5.0.0 ├── detect-newline@2.1.0 ├── dezalgo@1.0.3 ├── editor@1.0.0 ├── figgy-pudding@3.5.1 ├── find-npm-prefix@1.0.2 ├── fs-vacuum@1.2.10 ├── fs-write-stream-atomic@1.0.10 ├── gentle-fs@2.3.1 ├── glob@7.1.6 ├── graceful-fs@4.2.4 ├── has-unicode@2.0.1 ├── hosted-git-info@2.8.8 ├── iferr@1.0.2 ├── imurmurhash@0.1.4 ├── infer-owner@1.0.4 ├── inflight@1.0.6 ├── inherits@2.0.4 ├── ini@1.3.8 ├── init-package-json@1.10.3 ├── is-cidr@3.0.0 ├── json-parse-better-errors@1.0.2 ├── JSONStream@1.3.5 ├── lazy-property@1.0.0 ├── libcipm@4.0.8 ├── libnpm@3.0.1 ├── libnpmaccess@3.0.2 ├── libnpmhook@5.0.3 ├── libnpmorg@1.0.1 ├── libnpmsearch@2.0.2 ├── libnpmteam@1.0.2 ├── libnpx@10.2.4 ├── lock-verify@2.1.0 ├── lockfile@1.0.4 ├── lodash._baseindexof@3.1.0 ├── lodash._baseuniq@4.6.0 ├── lodash._bindcallback@3.0.1 ├── lodash._cacheindexof@3.0.2 ├── lodash._createcache@3.1.2 ├── lodash._getnative@3.9.1 ├── lodash.clonedeep@4.5.0 ├── lodash.restparam@3.6.1 ├── lodash.union@4.6.0 ├── lodash.uniq@4.5.0 ├── lodash.without@4.4.0 ├── lru-cache@5.1.1 ├── meant@1.0.2 ├── mississippi@3.0.0 ├── mkdirp@0.5.5 ├── move-concurrently@1.0.1 ├── node-gyp@5.1.0 ├── nopt@4.0.3 ├── normalize-package-data@2.5.0 ├── npm-audit-report@1.3.3 ├── npm-cache-filename@1.0.2 ├── npm-install-checks@3.0.2 ├── npm-lifecycle@3.1.5 ├── npm-package-arg@6.1.1 ├── npm-packlist@1.4.8 ├── npm-pick-manifest@3.0.2 ├── npm-profile@4.0.4 ├── npm-registry-fetch@4.0.7 ├── npm-user-validate@1.0.1 ├── npmlog@4.1.2 ├── once@1.4.0 ├── opener@1.5.2 ├── osenv@0.1.5 ├── pacote@9.5.12 ├── path-is-inside@1.0.2 ├── promise-inflight@1.0.1 ├── qrcode-terminal@0.12.0 ├── query-string@6.8.2 ├── qw@1.0.1 ├── read@1.0.7 ├── read-cmd-shim@1.0.5 ├── read-installed@4.0.3 ├── read-package-json@2.1.1 ├── read-package-tree@5.3.1 ├── readable-stream@3.6.0 ├── readdir-scoped-modules@1.1.0 ├── request@2.88.0 ├── retry@0.12.0 ├── rimraf@2.7.1 ├── safe-buffer@5.1.2 ├── semver@5.7.1 ├── sha@3.0.0 ├── slide@1.1.6 ├── sorted-object@2.0.1 ├── sorted-union-stream@2.1.3 ├── ssri@6.0.1 ├── stringify-package@1.0.1 ├── tar@4.4.13 ├── text-table@0.2.0 ├── tiny-relative-date@1.3.0 ├── uid-number@0.0.6 ├── umask@1.1.0 ├── unique-filename@1.1.1 ├── unpipe@1.0.0 ├── update-notifier@2.5.0 ├── uuid@3.3.3 ├── validate-npm-package-license@3.0.4 ├── validate-npm-package-name@3.0.0 ├── which@1.3.1 ├── worker-farm@1.7.0 └── write-file-atomic@2.4.3

kiwi-cam commented 3 years ago

Sorry... HOOBS does things a little differently. Try this instead: npm list --depth=1

iznaf commented 3 years ago

hoobs@hoobs:~ $ npm list --depth=1 /home/hoobs └── (empty) ... Broadlink Rm Pro 4.4.1 published 3/25/2021 • 5 days ago

kiwi-cam commented 3 years ago

Sorry, I've found the correct HOOBs command. Try this:

cd ~/.hoobs/
npm list --depth=1

You should see something like this:

├─┬ homebridge-broadlink-rm-pro@4.4.2-beta.5
│ ├── chai@4.3.4
│ ├── compare-versions@3.6.0
│ ├── fakegato-history@0.6.1
│ ├── find-key@2.1.3
│ ├── github-version-checker@2.2.0
│ ├── kiwicam-broadlinkjs-rm@0.9.12
│ ├── mqtt@4.2.6
│ ├── node-arp@1.0.6
│ ├── node-persist@2.1.0
│ ├── ping@0.3.0
│ ├── semver@7.3.5
│ └── uuid@8.3.2
iznaf commented 3 years ago

@hoobs/hoobs@3.3.5 /home/hoobs/.hoobs ├─┬ bufferutil@4.0.3 │ └── node-gyp-build@4.2.3 ├─┬ homebridge-broadlink-rm-pro@4.4.1 │ ├── chai@4.3.4 │ ├── compare-versions@3.6.0 │ ├── find-key@2.1.3 │ ├── github-version-checker@2.2.0 │ ├── kiwicam-broadlinkjs-rm@0.9.12 │ ├── mqtt@4.2.6 │ ├── node-arp@1.0.6 │ ├── node-persist@2.1.0 │ ├── ping@0.3.0 │ ├── semver@7.3.5 │ └── uuid@8.3.2 ├─┬ homebridge-camera-ffmpeg@3.1.2 │ ├── ffmpeg-for-homebridge@0.0.9 │ ├── get-port@5.1.1 │ └── mqtt@4.2.6 deduped ├─┬ homebridge-ewelink@5.6.0 │ ├── @homebridge/plugin-ui-utils@0.0.19 │ ├── axios@0.21.1 │ ├── node-dns-sd@0.4.2 │ ├── p-queue@6.6.2 │ ├── websocket-as-promised@2.0.1 │ └── ws@7.4.4 ├─┬ homebridge-homeconnect@0.19.2 │ ├── chalk@3.0.0 │ ├── node-persist@3.1.0 │ ├── querystring@0.2.1 │ ├── request@2.88.2 │ ├── request-promise-native@1.0.9 │ └── url@0.11.0 ├─┬ homebridge-z2m@1.1.3 │ ├── color-convert@2.0.1 │ ├── mqtt@4.2.6 deduped │ └── semver@7.3.5 deduped └─┬ utf-8-validate@5.0.4 └── node-gyp-build@4.2.3 deduped

kiwi-cam commented 3 years ago

What device type do you have? I wonder if the 315MHz scan needs special treatment on RM4 devices like another case.

If you're game to help test the theory, I'll step you through the changes.

iznaf commented 3 years ago

I can try. 315MHz used for parking gates opener remote. ev1527 chip.

kiwi-cam commented 3 years ago

@iznaf Could you try again using the latest BETA? We've found an issue which meant the frequency scan was timing out before reaching some frequencies. Hopefully this fix will solve your issues too.