Synology DSM Camera

Tags: #<Tag:0x00007f3264d50ac8>

Today I saw an update to HA 116.1 and in the release notes I saw the addition of Surveillance Station cameras in the integration.
image
It detected 9 devices and 51 entities under the current configuration I had going.

I have 4 cameras in Synology Surveillance Station (SSS) running on my Synology NAS DS216+II
These cameras are

  • 3 x HIKVision,
  • 1 Foscam
    I normally monitor these in HA using the generic camera platform as it’s enough to give me a quick overview.

    These views usually a time lag of real time by 7-8 seconds

My Storage is done on the NAS using the facilities of Synology Surveillance Station and if I need to do any quality live viewing or timeline work then I use synology surveillance Station app on my windows 10 PC. When I use this app there is no time lag.

I thought maybe using this new feature of Synology DSM i could avoid the time lag in HA so I found the entity and set it up in lovelace.
image

Alas there is still the 7-8 seconds time lag

As I am running this all on a 1Gbs LAN and there is no time lag on the PC application of SSS the it points to HA.
I am running HA on an Intel NUC i3 so HA has plenty of grunt.
image

Can the time lag be eliminated?

No , there is a WTF thread about all the lag, nothing to do with integration

You can shave off few seconds of the lag (but only few) by connecting directly to cameras using ONVIF integration.
For test purposes, when you connect to cameras directly (by web browser) - and when you wave your hand, how fast does it show it? Tested to day, and on camera interface directly it was 1-4 seconds… Add surveillance station and HA, and it does add something on top of that…

Thank you for the replies.
Can you give me a link to the WTF Thread please. I would like to read it.
I did remember reading about HLS and its lag issues but cannot remember where.

Some testing.
I have not used the ONVIF integration to test at this stage as I am not sure what I have to change?
Do I have to completely reconfigure Surveillance Station to use ONVIF rather than H264? I am thinking I will at this stage but correct me if I am wrong.

I have compared the camera time to my Laptop internal clock.
All connections are wired.

Direct Browser access to camera.
LAG IS 2 SECONDS

Surveillance Station Live View
LAG IS 2 SECONDS

HA
LAG IS 8 SECONDS

Thank you for your help

That’s great @rontaylor and thanks for sharing this! Your results match what I get.
In regard to ONVIF, no, if cameras support ONVIF - you simply in Home Assistant create new camera integration (https://www.home-assistant.io/integrations/onvif) using IP address of the camera, and HA will (try to) connect to camera directly. That way you skip Synology and get direct stream from camera to HA.
This is not a fix, but a workaround.

Thank you for that insight.
I have set up ONVIF on one of my cameras just to check it out. I had to enable ONVIF on the camera as HIKVision has disabled it by default since 2017.
I set up the ONVIF integration and it found the camera I had set up. I am assuming that it would auto-discover others if I enabled them?
This is the new time LAG using ONVIF

It’s now 5 seconds rather than the 7-8 on previous

However is it worth the extra effort to only gain 2-3 seconds? I really would like to have 1-2seconds MAX.
I will have consider what I need versus what I want!.
I do like the RTSP protocol though. Food for thought.

a bit later in the day…
11:48am
I asked my Google Nest Hub to “Show me shed camera 1”
It worked fine but had a time lag of 18 seconds

Yeah, on google hub, it’s even worse, I have about 12 sec, with streams coming from synology
Onvif doesn’t help

When HA 115 first came out it broke streaming altogether

There was a lot of work done to get it going but it seems that a lot of it revolves around the use of HLS (an apple protocol) and this causes the lag It saves bandwidth but there is a price to pay.

I could be way off the track here but it’s from what I could understand anyway.

I have an EUFY wireless Doorbell Camera and the EUFY app streams over my WiFi 2.4GHz network and Telstra 4G network to my mobile with only 1 second lag. However if I send it to the Nest Hub then its 15 seconds.
Works with Google Assistant TRUE but VERY SLOWLY.
There was a few comments around the issue that HA is not s security/surveillance tool and it mainly about home automation but home surveillance is an important part of that scene in my opinion.
I use cameras as binary sensors ( Line crossing etc) and then I want to cast the camera stream to my Nest Hub as an alert. It works but with the lag. :cry:

@rontaylor, how did you set up the user in Synology? I deleted the old Synology integration in preparation for its depreciation in 118. However, all I can see NAS status readouts, no cameras. I gave the user read/write access. Can’t figure out why they do not appear in HA.

I created a user and added it to the admin & users groups. Yes a bit heavy handed but I tend to start there and then slowly remove permissions until it breaks.

I don’t use the synology camera now but did just create a picture card just now to proved it worked

I mainly use the ONVIF integration now as I find it gives me more of what I want with my HIKVision cameras.
I am currently running 117.1
Hope that helps.

Thank you for the reply. The cameras just popped up after a while, maybe it just needed a reboot. Either way, yes…I wish they were an actual live video feed, not updated images. I’ll have to try out ONVIF.

Did you change “Camera View” from auto to live?

I am using ONVIF. I had them set to auto but changing them to LIVE and it made no difference. Still 7 seconds delay.
As was pointed out earlier in this thread the delay is in the HLS as I pointed out in #7

5/11/20 I put my cameras back to auto as the live took ages to load on my Mobile phone. Much quicker with auto. Can’t explain it other than more data to load at a guess.

I tried the live as well with no difference.