hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
552 stars 51 forks source link

Plugin is Causing a Homebridge Crash #118

Closed BobbySlope closed 5 years ago

BobbySlope commented 5 years ago

[Homebridge] [8/31/2019, 2:24:20 PM] Loaded config.json with 0 accessories and 4 platforms. [Homebridge] [8/31/2019, 2:24:20 PM] --- [Homebridge] [8/31/2019, 2:24:23 PM] Loaded plugin: homebridge-broadlink-rm [Homebridge] [8/31/2019, 2:24:23 PM] Registering platform 'homebridge-broadlink-rm.BroadlinkRM' [Homebridge] [8/31/2019, 2:24:23 PM] --- [Homebridge] [8/31/2019, 2:24:24 PM] Loaded plugin: homebridge-nest [Homebridge] [8/31/2019, 2:24:24 PM] Registering platform 'homebridge-nest.Nest' [Homebridge] [8/31/2019, 2:24:24 PM] --- [Homebridge] [8/31/2019, 2:24:25 PM] Loaded plugin: homebridge-platform-wemo [Homebridge] [8/31/2019, 2:24:25 PM] Registering platform 'homebridge-platform-wemo.BelkinWeMo' [Homebridge] [8/31/2019, 2:24:25 PM] --- [Homebridge] [8/31/2019, 2:24:25 PM] Loaded plugin: homebridge-tplink-smarthome [Homebridge] [8/31/2019, 2:24:25 PM] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome' [Homebridge] [8/31/2019, 2:24:25 PM] --- [Homebridge] [8/31/2019, 2:24:25 PM] Loaded plugin: homebridge-webos-tv [Homebridge] [8/31/2019, 2:24:25 PM] Registering accessory 'homebridge-webos-tv.webostv' [Homebridge] [8/31/2019, 2:24:25 PM] --- [Homebridge] [8/31/2019, 2:24:25 PM] Loading 4 platforms... [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Initializing BroadlinkRM platform... [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] [INFO] Automatically discovering Broadlink RM devices. [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] [INFO] Running Homebridge Broadlink RM Plugin version 3.5.5 [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Dyson Fan Power Accessory Ready [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Bedroom Fan Power Accessory Ready [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Initializing platform accessory 'Learn'... [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Initializing platform accessory 'Scan Frequency'... [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Initializing platform accessory 'Dyson Fan Power'... [Homebridge] [8/31/2019, 2:24:25 PM] [Broadlink RM] Initializing platform accessory 'Bedroom Fan Power'... [Homebridge] [8/31/2019, 2:24:25 PM] [Nest] Initializing Nest platform... [Homebridge] [8/31/2019, 2:24:25 PM] [Nest] Fetching Nest devices. [Homebridge] [8/31/2019, 2:24:26 PM] [Loft] Initializing BelkinWeMo platform... [Homebridge] [8/31/2019, 2:24:26 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform... [Homebridge] [8/31/2019, 2:24:26 PM] [TplinkSmarthome] homebridge-tplink-smarthome v4.0.1, node v10.16.3, homebridge v0.4.50 [Homebridge] [8/31/2019, 2:24:26 PM] Loading 0 accessories... [Homebridge] [8/31/2019, 2:24:26 PM] [TplinkSmarthome] Configuring cached accessory: [Bell Lamp] 8006383696310DE80EEC541FA6D07CA61B0F409B 47849e0a-5920-46c9-ba81-bab7a701cc89 [Homebridge] [8/31/2019, 2:24:27 PM] [TplinkSmarthome] New Device Online: [Bell Lamp] plug [8006383696310DE80EEC541FA6D07CA61B0F409B] 10.0.1.49 9999 [Homebridge] [8/31/2019, 2:24:27 PM] [TplinkSmarthome] Adding: [Bell Lamp] plug [8006383696310DE80EEC541FA6D07CA61B0F409B] [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] initing thermostat "Kitchen": deviceId: 09AA01AC11160LGE structureId: cade9690-1d16-11e6-8e55-22000bb851bd [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] initing home_away_sensor "Home/Away": deviceId: cade9690-1d16-11e6-8e55-22000bb851bd structureId: cade9690-1d16-11e6-8e55-22000bb851bd [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] initing protect "Kitchen": deviceId: 18B430000033615C structureId: cade9690-1d16-11e6-8e55-22000bb851bd [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] Initializing platform accessory 'Kitchen'... [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] Initializing platform accessory 'Home/Away'... [Homebridge] [8/31/2019, 2:24:28 PM] [Nest] Initializing platform accessory 'Kitchen'... [Homebridge] X-HM://0023ISYWZALJI [Homebridge] [8/31/2019, 2:24:28 PM] Error: listen EADDRINUSE: address already in use :::51827 [Homebridge] at Server.setupListenHandle [as _listen2] (net.js:1279:14) [Homebridge] at listenInCluster (net.js:1327:12) [Homebridge] at Server.listen (net.js:1414:7) [Homebridge] at EventedHTTPServer.listen (/home/hoobs/.hoobs/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19) [Homebridge] at HAPServer.listen (/home/hoobs/.hoobs/node_modules/hap-nodejs/lib/HAPServer.js:158:20) [Homebridge] at Bridge.Accessory.publish (/home/hoobs/.hoobs/node_modules/hap-nodejs/lib/Accessory.js:616:16) [Homebridge] at Server._publish (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:121:18) [Homebridge] at Server. (/home/hoobs/.hoobs/node_modules/@hoobs/homebridge/lib/server.js:387:18) [Homebridge] at /home/hoobs/.hoobs/node_modules/hap-nodejs/lib/util/once.js:16:19 [Homebridge] at /home/hoobs/.hoobs/node_modules/homebridge-nest/index.js:129:21 [Homebridge] at tryCatcher (/home/hoobs/.hoobs/node_modules/bluebird/js/release/util.js:16:23) [Homebridge] at Promise._settlePromiseFromHandler (/home/hoobs/.hoobs/node_modules/bluebird/js/release/promise.js:517:31) [Homebridge] at Promise._settlePromise (/home/hoobs/.hoobs/node_modules/bluebird/js/release/promise.js:574:18) [Homebridge] at Promise._settlePromise0 (/home/hoobs/.hoobs/node_modules/bluebird/js/release/promise.js:619:10) [Homebridge] at Promise._settlePromises (/home/hoobs/.hoobs/node_modules/bluebird/js/release/promise.js:699:18) [Homebridge] at _drainQueueStep (/home/hoobs/.hoobs/node_modules/bluebird/js/release/async.js:138:12) [Homebridge] at _drainQueue (/home/hoobs/.hoobs/node_modules/bluebird/js/release/async.js:131:9) [Homebridge] at Async._drainQueues (/home/hoobs/.hoobs/node_modules/bluebird/js/release/async.js:147:5) [Homebridge] at Immediate.Async.drainQueues (/home/hoobs/.hoobs/node_modules/bluebird/js/release/async.js:17:14) [Homebridge] at runCallback (timers.js:705:18) [Homebridge] at tryOnImmediate (timers.js:676:5) [Homebridge] at processImmediate (timers.js:658:5) [Homebridge] [8/31/2019, 2:24:28 PM] Got SIGTERM, shutting down service...

mkellsy commented 5 years ago

It looks like a plug-in is crashing hb. I need the ~/.hoobs/etc/config.json and ~/.hoobs/package.json files.

Remove passwords.

BobbySlope commented 5 years ago

config: { "client": { "port": 8080, "config": "http://hoobs.local/api", "api": [ "http://hoobs.local/api" ], "socket": "http://hoobs.local", "default_route": "status", "inactive_logoff": 30, "theme": "hoobs-light", "locale": "en" }, "bridge": { "name": "HOOBS", "username": "CC:22:3D:E3:CE:30", "port": 51827, "pin": "031-45-155" }, "description": "", "ports": {}, "accessories": [], "platforms": [ { "platform": "BroadlinkRM", "name": "Broadlink RM", "hideWelcomeMessage": true, "accessories": [ { "name": "Dyson Fan Power", "type": "switch", "data": { "on": "26004800471918191818182e172e181818181817181a17191818181818181818182d181818000cb6481918191719182e172e181818181718181918191818181818181818182d181817000d05", "off": "26004800471918191818182e172e181818181817181a17191818181818181818182d181818000cb6481918191719182e172e181818181718181918191818181818181818182d181817000d05" } }, { "name": "Bedroom Fan Power", "type": "switch", "data": { "on": "26002400481d1835181c171c1835181b181b171c181d181c181c171c181c171c1834181b18000d0500000000", "off": "26002400481d1835181c171c1835181b181b171c181d181c181c171c181c171c1834181b18000d0500000000" } } ] }, { "platform": "Nest", "email": "USER", "password": "PASS" }, { "platform": "BelkinWeMo", "name": "Loft" }, { "platform": "TplinkSmarthome", "name": "TplinkSmarthome" } ] }

BobbySlope commented 5 years ago

package: hoobs@hoobs:~ $ cat ~/.hoobs/package.json { "_from": "@hoobs/hoobs", "_id": "@hoobs/hoobs@3.0.0-beta.38", "_inBundle": false, "_integrity": "sha512-61ArJMcggTCUfMaULArBAir4kC1D5s8CAt7BPBqnP5fzaQGuWjvtsTodJLyQK8TOSTBH8M7H9LNei/U9Wc6/qQ==", "_location": "/@hoobs/hoobs", "_phantomChildren": {}, "_requested": { "type": "tag", "registry": true, "raw": "@hoobs/hoobs", "name": "@hoobs/hoobs", "escapedName": "@hoobs%2fhoobs", "scope": "@hoobs", "rawSpec": "", "saveSpec": null, "fetchSpec": "latest" }, "_requiredBy": [ "#USER" ], "_resolved": "https://registry.npmjs.org/@hoobs/hoobs/-/hoobs-3.0.0-beta.38.tgz", "_shasum": "ebcfa8a769a8ce16fd7ba6ed412f0027d5b61481", "_spec": "@hoobs/hoobs", "_where": "/usr/local/lib/node_modules/homebridge-to-hoobs", "author": { "name": "Michael J Kellsy" }, "browserslist": [ "> 1%", "last 2 versions" ], "bugs": { "url": "https://github.com/hoobs-org/hoobs-core/issues" }, "bundleDependencies": false, "dependencies": { "@hoobs/homebridge": "^3.0.3", "@hoobs/systeminfo": "^4.14.7", "axios": "^0.19.0", "commander": "^2.20.0", "cors": "^2.8.5", "express": "^4.17.1", "express-ws": "^4.0.0", "fs-extra": "^8.1.0", "homebridge-broadlink-rm": "^3.5.5", "homebridge-nest": "^3.5.1", "homebridge-platform-wemo": "^1.3.8", "homebridge-tplink-smarthome": "^4.0.1", "homebridge-webos-tv": "^1.6.2", "lodash": "^4.17.15", "node-pty-prebuilt-multiarch": "^0.8.1", "ora": "^3.4.0", "request": "^2.88.0", "rimraf": "^2.7.1", "socket.io": "^2.2.0", "xterm": "^3.14.5" }, "deprecated": false, "description": "Certified HOOBS stack", "engines": { "node": ">=10.16.3" }, "homepage": "https://github.com/hoobs-org/hoobs-core#readme", "keywords": [ "HOOBS", "homebridge" ], "license": "Apache-2.0", "main": "lib/cli.js", "name": "@hoobs/hoobs", "postcss": { "plugins": { "autoprefixer": {} } }, "repository": { "type": "git", "url": "git://github.com/hoobs-org/hoobs-core.git" }, "version": "3.0.0-beta.38", "warnings": [ { "code": "ENOTSUP", "required": { "node": ">=10.16.3" }, "pkgid": "@hoobs/hoobs@3.0.0-beta.38" }, { "code": "ENOTSUP", "required": { "node": ">=10.16.3" }, "pkgid": "@hoobs/hoobs@3.0.0-beta.38" } ] }

mkellsy commented 5 years ago

One of these plugins is causing an issue

"homebridge-broadlink-rm": "^3.5.5", "homebridge-nest": "^3.5.1", "homebridge-platform-wemo": "^1.3.8", "homebridge-tplink-smarthome": "^4.0.1", "homebridge-webos-tv": "^1.6.2",

I will test these

mkellsy commented 5 years ago

Also the

plugins: [ ... ]

directive is missing.

mkellsy commented 5 years ago

homebridge-nest works.

Adding the rest of the plugins to the certified plugin test issue. https://github.com/hoobs-org/HOOBS/issues/97