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] I cannot get a live video in the Home app #61

Open xoniq opened 4 years ago

xoniq commented 4 years ago

I cannot get a live video in my home app, all other switches are working connecting to my Xiaofang camera using MQTT. I already tried with "disableStream": false, and "disableStream": true,

Here is my config:

{
    "platform": "Dafang",
    "mqtt": {
        "hostBroker": false,
        "port": 1883,
        "host": "XXX.XXX.XXX.XXX",
        "debug": true
    },
    "cameras": [
        {
            "cameraName": "Oprit",
            "cameraRTSPStreamUrl": "rtsp://XXX.XXX.XXX.XXX:8554/unicast",
            "mqttTopic": "thuis/dafang/#",
            "disableStream": false,
            "folder": "/home/media/defang/",
            "recordingDirectoryPathFormat": "MMM-D-YY",
            "recordingFilenameFormat": "DD_MM_YYYY_ HH_mm_ss",
            "accessories": [
                {
                    "name": "Beweging sensor",
                    "type": "richMotionSensor",
                    "threshold": 300000
                },
                {
                    "name": "Nachtzicht",
                    "type": "nightVisionSwitch"
                },
                {
                    "name": "Video opname",
                    "type": "recordVideo"
                },
                {
                    "name": "Afbeelding opname",
                    "type": "captureImage"
                },
                {
                    "name": "Opslag wissen",
                    "type": "clearStorage"
                },
                {
                    "name": "Reset stream",
                    "type": "resetFFMPEG"
                },
                {
                    "name": "Beweging detectie",
                    "type": "motionDetection"
                },
                {
                    "name": "RTSP",
                    "type": "rtspSwitch"
                },
                {
                    "name": "Herstarten",
                    "type": "restartSwitch"
                }
            ],
            "videoConfig": {
                "source": "-rtsp_transport tcp -i rtsp://XXX.XXX.XXX.XXX:8554/unicast",
                "stillImageSource": "-rtsp_transport http -i rtsp://XXX.XXX.XXX.XXX:8554/unicast -vframes 1 -r 1",
                "maxStreams": 5,
                "maxWidth": 1280,
                "maxHeight": 720,
                "maxFPS": 25,
                "vcodec": "h264",
                "debug": true
            }
        }
    ]
}
jlg89 commented 3 years ago

What does the homebridge log file show when you try to connect to the camera in the Home app? You might try lowering the resolution and FPS, the CPUs in those cameras are easily overwhelmed. Try 768x432@10fps, configure it on the camera itself and also in the videoConfig block. You might also add "audio": false to the videoConfig block, unless you really need audio.