AlexanderBabel / 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
46 stars 11 forks source link

problems after updating to HOOBS 3.1.20 #67

Closed rogiervdberg closed 4 years ago

rogiervdberg commented 4 years ago

After I updated to HOOBS 3.1.20 I get the following error: (When the Broadlink part is removed from the config.json homebridge works fine.)

[Homebridge] [1/21/2020, 14:21:19] Loading 4 platforms... [Homebridge] [1/21/2020, 14:21:19] [Broadlink RM] Initializing BroadlinkRM platform... [Homebridge] [1/21/2020, 14:21:19] [Broadlink RM] [INFO] Automatically discovering Broadlink RM devices. [Homebridge] [1/21/2020, 14:21:19] [Broadlink RM] Radio Accessory Ready [Homebridge] [1/21/2020, 14:21:19] TypeError: Cannot convert undefined or null to object at Function.keys (:null:null) at TVAccessory.checkConfig (/home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:54:12) at /home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:63:16 at Array.forEach (:null:null) at /home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:62:15 at Array.forEach (:null:null) at TVAccessory.checkConfig (/home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:54:25) at /home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:66:14 at Array.forEach (:null:null) at TVAccessory.checkConfig (/home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:54:25) at new HomebridgeAccessory (/home/hoobs/.hoobs/node_modules/homebridge-platform-helper/accessory.js:35:10) at new BroadlinkRMAccessory (/home/hoobs/.hoobs/node_modules/homebridge-broadlink-rm-tv/accessories/accessory.js:16:5) at new TVAccessory (/home/hoobs/.hoobs/node_modules/homebridge-broadlink-rm-tv/accessories/tv.js:9:5) at /home/hoobs/.hoobs/node_modules/homebridge-broadlink-rm-tv/platform.js:68:32 at Array.forEach (:null:null) at BroadlinkRMPlatform.addAccessories (/home/hoobs/.hoobs/node_modules/homebridge-broadlink-rm-tv/platform.js:63:24) at BroadlinkRMPlatform.accessories (/home/hoobs/.hoobs/node_modules/homebridge-platform-helper/platform.js:28:10) at Server._loadPlatformAccessories (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:369:22) at Server._loadPlatforms (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:296:18) at Server.run (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:74:14) at module.exports (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/cli.js:90:12) at Object. (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/bin/homebridge:10:63) at Module._compile (internal/modules/cjs/loader.js:959:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) at Function.Module._load (internal/modules/cjs/loader.js:727:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) at internal/main/run_main_module.js:17:11 [Homebridge] (node:19596) [DEP0025] DeprecationWarning: sys is deprecated. Use util instead. [Homebridge] [1/21/2020, 14:21:19] Got SIGTERM, shutting down service... [Homebridge] [1/21/2020, 14:21:19] [Broadlink RM] [INFO] Discovered Broadlink RM Mini (2737) at 192.168.1.241 (42:f7:c8:17:46:f8) [Homebridge] [1/21/2020, 14:21:20] [Broadlink RM] Radio getSwitchState: 0

Thanks!

kiwi-cam commented 4 years ago

Looks like an issue loading the remote keys configuration. Could you share your config.json that gives this error?

rogiervdberg commented 4 years ago

Sure.

{ "platform": "BroadlinkRM", "name": "Broadlink RM", "hideScanFrequencyButton": false, "hideLearnButton": false, "hideWelcomeMessage": false, "accessories": [ { "name": "Radio", "type": "tv", "pingIPAddressStateOnly": true, "pingFrequency": 3, "pingGrace": 10, "data": { "on": "260050000001279412381139113911141114111411141238111411141238113911381238113813131138121312381114121411381114121411141138121411381238111411391138120004fa0001284b11000d050000000000000000", "off": "26004800000127951237123811391114111411141214113811141214113811391138123811391114111411141214113811141214113812381138123811391114113812381114121411000d05", "remote": { "select": "AA", "arrowUp": "AA", "arrowDown": "AA", "arrowLeft": "AA", "arrowRight": "AA", "back": "AA", "exit": "AA", "playPause": "AA", "info": "AA" }, "volume": { "up": "260050000001269512381138123811141214111411141139111411141139113812381139113812131214111411141139111411141213123811391138123811141139113812381114110004fc0001264c12000d050000000000000000", "down": "260050000001269512381138123811141114121411141138121411141139113812381138123811141213121411381238111411141214113812381138121411141138123811391114110004fc0001264c11000d050000000000000000" }, "inputs": [ { "name": "TV", "type": "hdmi", "data": "260050000001289314351436143613121411141213121336141213121336143614361336143613121436133614121336143613121411143613121411143613121411143614361312130004fa0001284914000d050000000000000000" }, { "name": "Airplay", "type": "hdmi", "data": "260050000001279511381238113911141114111412141138121114141138123811391138113911141114111412141114111411141238113911381238113812381139113812141114110004fb0001274b12000d050000000000000000" } ] } }, { "name": "TV", "type": "tv", "pingIPAddressStateOnly": true, "pingFrequency": 3, "pingGrace": 10, "data": { "on": "26008a021d1e1c1e391f1b1f1c1f1c1e1c1e1c1f1b3c1c1f391e1c000ba51b1f1c1f381f1c1f1b1f1c1f1b1f1c1e1d3b1c1f381f1d000ba31c1e1c1f391f1b1f1b1f1c1f1b1f1d1e1b3c1c1f381f1c000ba51b1f1c1f381f1c1f1b1f1b1f1c1f1b1f1c3c1b1f391f1c000ba41b1f1c1f381f1c1f1b1f1c1f1b1f1c1e1c3c1c1e391f1c000ba41c1f1b1f391f1b1f1c1f1b1f1c1f1b1f1c3c1b1f391f1b000ba51b1f1c1e391f1c1f1c1e1c1e1c1f1b1f1c3c1c1e3a1e1b000ba51c1f1b1f391f1b1f1d1e1b1f1b1f1d1e1c3b1d1e391e1d000ba31c1f1b1f391f1b1f1c1f1b1f1d1e1b1f1b3d1b1f391f1c000ba41c1e1d1e391f1b1f1b1f1c1f1b1f1c1f1b3c1c1f381f1c000ba41c1f1b1f391f1b1f1c1e1c1f1c1e1c1f1b3c1c1f381f1c000ba51b1f1c1f381f1c1f1b1f1c1f1b1f1b1f1d3b1c1e391f1c000ba41b1f1c1f381f1c1f1b1f1c1f1b1f1c1e1d3b1c1f381f1c000ba51b1f1b1f391f1c1e1c1f1c1e1c1f1b1f1c3c1c1e391f1b000ba51b1f1c1f381f1c1f1b1f1c1e1c1f1b1f1c3c1b1f391f1b000ba51d1e1b1f391f1c1e1c1f1b1f1c1f1b1f1b3d1b1f391f1b000ba41d1e1c1e391f1c1e1c1f1c1e1d1e1b1f1c3c1b1f391f1c000ba41c1f1b1f3a1e1b1f1c1e1c1f1b1f1c1f1b3c1c1f381f1c000ba41c1f1b1f391f1c1e1d1e1b1f1b1f1c1f1b3c1c1f391e1c000ba51b1f1c1f391e1d1e1c1e1d1e1b1f1c1e1c3c1c1e3a1e1c000ba41c1e1c1f391e1c1f1b1f1d1e1c1e1c1f1c3b1c1f381f1d000ba41b1f1c1f381f1c1f1c1e1b1f1c1f1c1e1c3c1b1f391f1b000ba51c1e1d1e381f1c1f1c1e1c1f1b1f1b1f1c3c1b1f3a1e1c000ba41c1f1b1f391f1b1f1c1f1b1f1c1f1b1f1c3c1b1f3a1e1b000ba51b1f1c1e391f1c1e1c1f1c1e1c1f1b1f1c3c1c1e391f1b000d050000000000000000000000000000", "off": "26001a001b1f391f1b1f1c1f1b1f1c1f1b1f1c1e1d3b1c1e3a1e1b000d050000000000000000000000000000", "remote": { "select": "26001a003a1e1c1f1c1e1c1e1c1f1b1f1c1f1b3c393c1c1f1b1f1c000d050000000000000000000000000000", "arrowUp": "26001800393c391f1b1f1b1f1c1f1b1f1c3c391f1b1f1b1f1c000d05", "arrowDown": "26001800383c391f1c1e1c1f1b1f1c1f1c3b391f1c1e1c3c1b000d05", "arrowLeft": "26001800391f1c1e1b1f1c1f1b1f1c1f1b1f1b3d383c393c1c000d05", "arrowRight": "26001600393c391f1b1f1c1f1b1f1c1e1c3c393c1c1e39000d050000", "back": "26003000391f1c1e1c1e1c1f1c1e1c1f1b1f1c3c381f1c3c39000ba5381f1c1f1b1f1c1f1c1e1b1f1d1e1b3c391f1c3c38000d050000000000000000", "exit": "26003000391f1c1e1c1e1c1f1c1e1c1f1b1f1c3c381f1c3c39000ba5381f1c1f1b1f1c1f1c1e1b1f1d1e1b3c391f1c3c38000d050000000000000000", "playPause": "26003000391f1c1e1c1e1c1f1c1e1c1f1b1f1c3c381f1c3c39000ba5381f1c1f1b1f1c1f1c1e1b1f1d1e1b3c391f1c3c38000d050000000000000000", "info": "26003000391f1c1e1c1e1c1f1c1e1c1f1b1f1c3c381f1c3c39000ba5381f1c1f1b1f1c1f1c1e1b1f1d1e1b3c391f1c3c38000d050000000000000000" }, "volume": { "up": "26001a001b1f391f1b1f1c1f1b1f1c1f1b1f1c3c381f1d1e1b1f1c000d050000000000000000000000000000", "down": "26001a001d1e1c1e391f1c1e1b1f1c1f1b1f1c3c391e1c1f1c3b1c000d050000000000000000000000000000" }, "inputs": [ null ] } } ], "plugin_map": { "plugin_name": "homebridge-broadlink-rm-tv" } },

This setup worked before updating.

kiwi-cam commented 4 years ago

Could you try removing this part (and the comma proceeding):

"inputs": [
null
]

That might explain the null error. The code is checking for config being defined and assuming it wouldn't be defined as null.

rogiervdberg commented 4 years ago

This worked! Everything back to normal. Thank you!