Sunoo / homebridge-camera-ffmpeg

Homebridge Plugin Providing FFmpeg-based Camera Support
https://sunoo.github.io/homebridge-camera-ffmpeg/
Apache License 2.0
1.08k stars 225 forks source link

Camera's with unbind option can’t be found when they previously didn’t use unbind but still have same name #870

Open ronaldvdmeer opened 3 years ago

ronaldvdmeer commented 3 years ago

Describe The Problem: Recently I’ve noticed homebridge has become slow after doing some regular updating. It had been several month ago when I’ve last updated my system running domotica. Somehow it takes around 10 seconds for a switch to be enabled. While in domoticz this is instant. I read something online regarding an option named “unbind” so I tried the option after deleting the cameras from the configuration file. The documentation stated I needed to add them manually. However the cameras where only visible when I used a different name. I cleaned the cache through the UI but this didn’t do anything. It looks like there is cache that can not be removed and is not documented.

To Reproduce:

  1. Add a camera with name XYZ
  2. Don’t use unbind
  3. Start using unbind
  4. Delete camera
  5. Add camera to config with unbind option enabled
  6. Try to add it to home app on iphoneOS or iPadOS

I’ve been testing so many instances that I don’t know exactly how I removed the camera after setting the unbind option didn’t work. I’m happy it is working now so I didn’t double check the reproduce steps.

Logs: Because it is currently working I don’t have any logging showing some sort of error.

Homebridge Config:


                {
                    "name": "IPC Voortuin",
                    "manufacturer": "Dahua",
                    "model": "IPC-HDW5831R-ZE",
                    "serialNumber": "123456781",
                    "motion": false,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-re -i rtsp://xxxx:xxxx@192.168.40.3:554/cam/realmonitor?channel=1&subtype=2",
                        "stillImageSource": "-i http://xxxx:xxxx@192.168.40.3:80/cgi-bin/snapshot.cgi?1&u=xxxx&p=xxxx",
                        "maxStreams": 1,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 7,
                        "audio": true
                    }
                },
                {
                    "name": "IPC Oprit",
                    "manufacturer": "Dahua",
                    "model": "IPC-HDW5831R-ZE",
                    "serialNumber": "123456782",
                    "motion": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-re -i rtsp://xxxx:xxxx@192.168.40.4:554/cam/realmonitor?channel=1&subtype=2",
                        "stillImageSource": "-i http://xxxx:xxxx@192.168.40.4:80/cgi-bin/snapshot.cgi?1&u=xxxx&p=xxxx",
                        "maxStreams": 1,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 7
                    }
                },
                {
                    "name": "IPC Uitbouw",
                    "manufacturer": "Dahua",
                    "model": "IPC-HDW5831R-ZE",
                    "serialNumber": "123456783",
                    "motion": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-re -i rtsp://xxxx:xxxx@192.168.40.6:554/cam/realmonitor?channel=1&subtype=2",
                        "stillImageSource": "-i http://xxxx:xxxx@192.168.40.6:80/cgi-bin/snapshot.cgi?1&u=xxxx&p=xxxx",
                        "maxStreams": 1,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 7,
                        "debug": false
                    }
                },
                {
                    "name": "IPC Achtertuin",
                    "manufacturer": "Dahua",
                    "model": "IPC-HDW5831R-ZE",
                    "serialNumber": "123456784",
                    "motion": true,
                    "unbridge": true,
                    "videoConfig": {
                        "source": "-re -i rtsp://xxxx:xxxx@192.168.40.5:554/cam/realmonitor?channel=1&subtype=2",
                        "stillImageSource": "-i http://xxxx:xxxx@192.168.40.5:80/cgi-bin/snapshot.cgi?1&u=xxxx&p=xxxx",
                        "maxStreams": 1,
                        "maxWidth": 1280,
                        "maxHeight": 720,
                        "maxFPS": 7
                    }
                }

Environment:

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

ronaldvdmeer commented 3 years ago

Closed?

Sunoo commented 3 years ago

I really need to have stalebot calm down some. Sorry I didn’t catch this in time.

or-agami commented 3 years ago

I had hard time to figure out why I can't see the second camera, @ronaldvdmeer Thank you for the issue and solving way, I duplicated the camera settings with different name and that worked for me

ronaldvdmeer commented 3 years ago

Great to here @or-agami. Any update already @Sunoo on this issue?

Sunoo commented 3 years ago

I’ve been able to recreate the issue, haven’t tracked down the cause yet.

AdamDempsey commented 3 years ago

I was having problems adding cameras manually after enabling the Unbridge option.

For anyone else with this issue, don't need to delete and re-add, all I did was append 2 to the camera name, then showed up straight away. Once in HomeKit I removed the 2 and working as normal.

Thanks!

hoondi commented 3 years ago

thanks for the "adding 2" trick, I was able to manually add and view my cams in their respective rooms.

What I haven't worked out is when I tap on the mini viewer to go full screen, the video feed times out... logs:

03/04/2021, 12:12:33 am [Camera FFmpeg] [Driveway2] Starting video stream: 1280 x 720, 7 fps, 299 kbps
03/04/2021, 12:13:04 am [Camera FFmpeg] [Driveway2] Stopped video stream.

config: { "platform": "Camera-ffmpeg", "name": "Camera FFmpeg", "plugin_map": { "plugin_name": "Camera-ffmpeg" }, "cameras": [ { "name": "Backyard2", "manufacturer": "Gadinan", "model": "Full HD 1080P PoE 2.8mm IR", "serialNumber": "123", "motion": false, "unbridge": true, "videoConfig": { "source": "-i rtsp://192.168.1.13:554/user=admin&password=&channel=1&stream=0.sdp", "maxStreams": 2, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 7 } }, { "name": "Driveway2", "manufacturer": "Gadinan", "model": "Full HD 1080P PoE 2.8mm IR", "serialNumber": "123", "motion": false, "unbridge": true, "videoConfig": { "source": "-i rtsp://192.168.1.11:554/user=admin&password=&channel=1&stream=0.sdp", "maxStreams": 2, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 7 } } ] }

The rtsp url works perfectly fine in VLC and the thumbnail images are updating also and so I'm a bit confused as to what to even change.

Bridge Name HOOBS HOOBS Version 3.3.5 Node Version 15.10.0

Any suggestions?

Sunoo commented 3 years ago

@hoondi If you’re having another problem, please open a new issue and include logs taken with debug set for the camera.

atchinson commented 1 year ago

This Problem still exists. I was playing around with different Homekit Secure Video Homebridge apps and Scrypted. Came back to this app, seemed for stable than the others. Still in test mode. But when trying to re-add the cameras unbound they would not show up. I went into the plugins json config (faster editing) and changed the name. Just added "-2", restarted homebridge and the cameras show up with the new name.