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] - Multiple camera fail with HAP error, hard crash of homebridge #43

Open kaicherry opened 4 years ago

kaicherry commented 4 years ago

Describe the bug Adding multiple cameras to the config cause homebridge to crah; the HAP subsystem reports the error that two devices cannot have the same "id"

Expected behavior Multiple (2 in this instance) cameras working

Config ... { "platform": "Dafang", "mqtt": { "hostBroker": false, "port": 1883, "host": "localhost", "debug": true, "mongoUrl": "mongodb://localhost:27017/mqtt" }, "cameras": [ { "cameraName": "TRAK-R", "videoConfig": { "source": "-rtsp_transport tcp -i rtsp://192.168.87.69:8554/unicast", "stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.87.69:8554/unicast", "vcodec": "copy", "videoFilter": "none", "maxFPS": 20, "maxStreams": 4, "maxBitrate": 284, "debug": true, "audio": false }, "cameraRTSPStreamUrl": "rtsp://192.168.87.69:8554/unicast", "mqttTopic": "hiddensprings/trakr/#", "folder": "/root/Videos/", "accessories": [ { "name": "TRAK-R Sensor", "type": "richMotionSensor", "threshold": 300000 }, { "name": "TRAK-R NV Sensor", "type": "nightVisionSensor", "threshold": 0 }, { "name": "TRAK-R NV", "type": "nightVisionSwitch" }, { "name": "TRAK-R Video", "type": "recordVideo" }, { "name": "TRAK-R Audio", "type": "recordAudio" }, { "name": "TRAK-R Image", "type": "captureImage" }, { "name": "E14 Storage Sensor", "type": "storageSensor" }, { "name": "E14 Clear Storage Switch", "type": "clearStorage" }, { "name": "TRAK-R Reset", "type": "resetFFMPEG" }, { "name": "TRAK-R Brightness", "type": "brightness" } ] }, { "cameraName": "WACH-R", "videoConfig": { "source": "-rtsp_transport tcp -i rtsp://192.168.87.248:8554/unicast", "stillImageSource": "-rtsp_transport tcp -i rtsp://192.168.87.248:8554/unicast", "vcodec": "copy", "videoFilter": "none", "maxFPS": 20, "maxStreams": 4, "maxBitrate": 284, "debug": true, "audio": false }, "cameraRTSPStreamUrl": "rtsp://192.168.87.248:8554/unicast", "mqttTopic": "hiddensprings/wachr/#", "folder": "/root/Videos/", "accessories": [ { "name": "WACH-R Sensor", "type": "richMotionSensor", "threshold": 300000 }, { "name": "WACH-R NV Sensor", "type": "nightVisionSensor", "threshold": 0 }, { "name": "WACH-R NV", "type": "nightVisionSwitch" }, { "name": "WACH-R Video", "type": "recordVideo" }, { "name": "WACH-R Audio", "type": "recordAudio" }, { "name": "WACH-R Image", "type": "captureImage" }, { "name": "E14 Storage Sensor", "type": "storageSensor" }, { "name": "E14 Clear Storage Switch", "type": "clearStorage" }, { "name": "WACH-R Reset", "type": "resetFFMPEG" }, { "name": "WACH-R Brightness", "type": "brightness" } ] } ] } ...

Logs See Description

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Clearing cases, etc does not prevent or fix the issue.

Steps to Reproduce: