sahilchaddha / homebridge-dafang

Homebridge Plugin for Xiaomi Dafang / Wyze Cam IP Camera => Hey Siri, Start Video Recording
MIT License
204 stars 34 forks source link

[BUG] - Cant start homebridge after adding plugin #69

Open joshuaswilcox opened 3 years ago

joshuaswilcox commented 3 years ago

Describe the bug Installed plugin, added config and startup of homebridge has the error below

Expected behavior I'd expect homebridge to start just fine

Config { "platform": "Dafang", "mqtt": { "hostBroker": true, "port": 1883, "host": "localhost", "debug": true, "mongoUrl": "mongodb://localhost:27017/mqtt" }, "cameras": [ { "cameraName": "Window Cam", "cameraRTSPStreamUrl": "rtsp://x.x.x.x:XXXX/unicast", "mqttTopic": "office/window/#", "accessories": [ { "name": "Office Window Motion Sensor", "type": "richMotionSensor", "threshold": 300000 } ] } ] }

Logs [04/12/2020, 09:31:00] One of your plugins incorrectly registered an external accessory using the platform name (Dafang) and not the plugin identifier. Please report this to the developer! [04/12/2020, 09:31:00] Window Cam is running on port **. [04/12/2020, 09:31:00] Please add [Window Cam] manually in Home app. Setup Code: -**-*** [04/12/2020, 09:31:00] SchemaError: Expected schema to be an object or boolean at Validator.validate (/usr/local/lib/node_modules/homebridge-dafang/node_modules/jsonschema/lib/validator.js:110:11) at Object.validate (/usr/local/lib/node_modules/homebridge-dafang/node_modules/mosca/lib/options.js:264:26) at new Server (/usr/local/lib/node_modules/homebridge-dafang/node_modules/mosca/lib/server.js:104:34) at MQTTBroker.start (/usr/local/lib/node_modules/homebridge-dafang/src/mqtt/broker.js:34:19) at MQTTService.initMQTT (/usr/local/lib/node_modules/homebridge-dafang/src/service/mqttService.js:24:17) at Dafang.accessories (/usr/local/lib/node_modules/homebridge-dafang/src/dafang.js:106:24) at /usr/local/lib/node_modules/homebridge/src/server.ts:415:24 at new Promise () at Server.loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:414:12) at /usr/local/lib/node_modules/homebridge/src/server.ts:402:28 at Array.forEach () at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:374:27) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:153:29) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47

Desktop (please complete the following information):

freynolds commented 3 years ago

Hey man! I'm having the same issue, the only way to stop the continuous restart is to remove the MQTT host from the plugging 😞 Do you have any idea how to fix that? @joshuaswilcox Thanks!

dev-d commented 2 years ago

Same here. I found that changing the section marked mqtt does get rid of the problem. But then you have to install and maintain your own mqtt broker.

On my raspberry pi, I installed the MQTT broker by following steps from https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/

That did the trick