01304 827609 info@use-ip.co.uk Find us

Help with HIKVision Virtual Machine access (via Homebridge on a Synology NAS)

@%@£@%@% or words to that effect. Copy paste error.

It looks like I'm locked out again for another 30 minutes. Right...... I've found the setting to turn off the lockouts....

I've looked to try: rtsp://192.168.1.77/Streaming/Channels/302/ in VLC, which should be the 3rd camera, secondary (small) video stream. I get prompted for logon credentials. I run through the various ones I've got, and there we go!

Screenshot 2022-09-15 at 18.57.52.jpg


The third camera (patio) showing a small video stream. So we have at last validated the RTSP streams :) Many many thanks for your input.

I just tried to get it working in the FFmpeg plugin in home bridge. I guess as that needs user/pwd adding in so it'd be rtsp://<username>:<password>@192.168.1.77/Streaming/Channels/302/

Nope still fails, but at least now I can run through all the various plugins to see if one works LOL. That is one for after the birthday celebrations this weekend.
Thanks for all the assistance. :)
 
Last edited:
Nice one! Bit of perseverance paid off.

For what its worth, you can probably get a RTSP stream direct from the camera with a Static Route defined on the Router using the Camera IP and credentials (still port 554) but that's a couple more steps so didn't want to start off down that route, but now you've got working streams you can continue to fiddle from here and may get a result.

Have a good birthday.
 
I'm now thinking as I'm running Homebridge as a package on my NAS that the FFmpeg package (even though installed on the NAS) may not be accessible by the Homebridge package / plugins. So what I'll look to try as soon as will be to install Docker (which I had been wanting to avoid) and fully install the Homebridge and FFmpeg packages within that system. Hopefully that will be the solution.
Oh I will, 60th so a big one, I'll likely not be online for a day or three, a lot of celebrations to survive :)
 
Well hi guys...... back from a great weeks holiday in NE Yorkshire, and enjoying plenty of new gadgets..... Anyway to work :)

I've not made any progress with getting the camera to appear in Homebridge at all on the NAS using the standard Synology Homebridge package.

So I've gone down the route of installing Docker (cough spit) using this tutorial, and I'm sad to say I get similar error messages after I install the various plugins and look to access the camera:

[9/26/2022, 3:18:57 PM] [Camera FFmpeg] [Drive Cam (102)] Failed to fetch snapshot.
[Drive Cam (102)] Snapshot request handler provided empty image buffer!
[9/26/2022, 3:18:59 PM] [Camera FFmpeg] [Drive Cam (102)] Starting video stream: 800 x 600, 25 fps, 299 kbps (AAC-eld)
[9/26/2022, 3:18:59 PM] [Camera FFmpeg] [Drive Cam (102)] FFmpeg exited with code: 1 and signal: null (Error)
[9/26/2022, 3:18:59 PM] [Camera FFmpeg] [Drive Cam (102)] Stopped video stream.
Which tells me that I've still got issues with FFmpeg. Now I know I have FFmpeg installed as a package on the NAS, but it looks like I will / may need it in Docker as well. The issue is I can't find any instructions (that I can understand) on how to install FFmpeg in docker. The most comprehensible set of instructions I've found are these, but are meaningless to me :)

Help!!
 
Well to finish the thread off guys the steps top get the cameras working were:
  • Migrate Homebridge to Docker instead of using the native synology package
  • When adding homebridge into docker include FFmpeg as part of the install script
  • The only plugin which worked was The Homebridge Camera FFmpeg (homebridge-camera-ffmpeg v3.1.4)
The json config for the plugin was
{
"name": "Camera FFmpeg",
"cameras": [
{
"name": "Drive Cam",
"manufacturer": "HIKVision",
"model": "DDS-2CD2087G2-L(U)",
"motion": true,
"unbridge": false,
"videoConfig": {
"source": "-i rtsp://<useraccount>:<userpwd>@<nvr IP address>/Streaming/Channels/101/",
"maxWidth": 800,
"maxHeight": 600,
"maxFPS": 25,
"mapvideo": "102",
"audio": true
}
}
],
"_bridge": {
"username": "0E:D5:A4:AC:38:BD",
"port": 55198
},
"platform": "Camera-ffmpeg"
}
The result though:
SCR-20220927-gc0.jpg

I only added the one camera as it really slowed down the speed of my NAS. If I ever look to moving Homebridge to a Raspberry Pie I may revisit it all :) At least I worked the project through to completion.
 
In the end I did manage to both cameras I wanted to use working in Homebridge but that took the NAS CPU up from 13% load to 67%. So the project is shelved until I can invest in a Raspberry Pie to take the load off the NAS. At least if / when I go that route I have all the configurations saved out.
 
As this thread helped me to find the solution to running Homebridge, wanted to share my working solution.

The key change which helped to make it all work was adding ffmpeg to the video decoder setting.

Installed ffmpeg from https://packages.synocommunity.com/ - This seemed to work better than the default ffmpeg in Synology Packages. This will be added to the Community Apps. You can add the community repo by going into the Package Manager Settings, and choose Package Sources and adding Synocommunity as a name and the above URL.

Then in the Homebridge FFMPeg settings / Advanced change the ffmpeg to point to the new ffmpeg Video processor.

Screenshot 2022-12-12 at 17.35.32.png


RTSP sources for me followed the following formats Direct to Camera or NVR (did not need :544 or :6500x).

-i rtsp://admin:password@192.168.x.x/Streaming/Channels/102/

the 102 works better than 101 as it seems to be more Homekit friendly :)

I also changed the resolutions and framerates to 0 so it uses the origin sizes.

I now have Ring and Hikvision on the same Cameras panel in HomeKit.

Hope that helps others looking for a Synology / FFMPEG /. Hikvision solution!
 
Interesting, I did similar but had to use Docker and got ffMPEG installed within that. Bookmarked this as if I can reconfigure to get it working in this manner I can then get rid of Docker.
Can you share which homebridge module you used and the config that with it?
 
These are my Sources and packages:

Sources (Package Centre/Settings/Package Sources);

Homebridge https://synology.homebridge.io
SynoCommunity https://packages.syncommunity.com

From Homebridge Terminal;

homebridge@host:/volume1/homebridge $ npm list
homebridge@ /volume1/homebridge
+-- homebridge-camera-ffmpeg@3.1.4
+-- homebridge-ring@11.7.0
+-- homebridge@1.6.0


Node.js is 16.16 (Synology Package manager download)ls

I then downloaded the Synocommunity ffmpeg version which has overwritten some of the files. That may or may not be the "magic", but its working, and I don't plan to reverse the process to see if the native ffmpeg also works :)

homebridge@host:/volume1/@appstore/ffmpeg/bin $ ls -l ffmpeg
-rwxr-xr-x 1 sc-ffmpeg synocommunity 271304 Nov 20 01:21 ffmpeg


As above, that file is the one you list as the video processor in the UX config.

{
"name": "Camera FFmpeg",
"videoProcessor": "/volume1/@appstore/ffmpeg/bin/ffmpeg",
"cameras": [
{
 
Thanks I'll start investigating. Newbie question how did you install the npm's in Homebridge? From what I recall when I tried that I couldn't work out how to get npm installs working? Of If I did fins where to do it (Homebridge terminal) I didn't have the needed permissions.
 
With the package sources listed in Package Centre you can do it from Synology Package Centre to get Homebridge and ffmpeg packages.

The Homebridge apps are just search plug-ins in Homebridge.
 
Very well pleased—the key for getting it working for myself on the native homebridge package was the video processor change in advanced settings. So I'm now runing without the overhead of having to run Docker.
Many thanks!
 
As above, that file is the one you list as the video processor in the UX config.

{
"name": "Camera FFmpeg",
"videoProcessor": "/volume1/@appstore/ffmpeg/bin/ffmpeg",
"cameras": [
{
Not good news this morning there was a package update out which included a note saying:

Screenshot 2023-05-10 at 06.42.07.png

So of course I did the update and changed the setting to:

"videoProcessor": "/volume1/@appstore/ffmpeg/bin/ffmpeg4",

And now the cameras have no video feed......... still images work but no video. Any ideas?

homebridge@syncity:/volume1/homebridge $ npm list
homebridge@ /volume1/homebridge
+-- @xarrar/homebridge-hikvision@1.0.3
+-- homebridge-bravia@2.4.9
+-- homebridge-camera-ffmpeg@3.1.4
+-- homebridge-node-alarm-dot-com@1.9.0
+-- homebridge-sky-q-no-logs@1.3.2
`-- homebridge@1.6.1
 
Back
Top