homebridge-dafang
homebridge-dafang copied to clipboard
[BUG] - Cant start homebridge after adding plugin
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 (
Desktop (please complete the following information):
- OS: Raspberry Pi
- Node Version: v14.15.1
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!
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