homebridge-dafang icon indicating copy to clipboard operation
homebridge-dafang copied to clipboard

[BUG] I cannot get a live video in the Home app

Open xoniq opened this issue 4 years ago • 1 comments

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
            }
        }
    ]
}

xoniq avatar Jul 15 '20 14:07 xoniq

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.

jlg89 avatar Sep 21 '20 22:09 jlg89