Synology_dsm camera enhancements

Since i noticed that the good woking synology camera integration will be removed in 0.118, I investigated the enhanced synology_dsm integration.

My use case:
In my use case its vital to see changes on the screen immediately. Therefore I love the old synology camera integration, because it presents all streams as a mjpegs (~3 sec delay) even if the cameras itself provide H264/H265 streams. The old integration seems to use the 2nd stream resolution (fixed, probably predefined by mobil device configuration on synology itself).
Thats totally sufficient for watching (1-2 updates per second; I doesn’t make sense to see 8MP streams on a tablet/older PC with 1-2 MP resolution!)

At the end i dream to have an easy to use dashboard for my camera modules:

  • fast/low delay stream in terms of an overview for lovelace (i.e. using mid resolution and mjpeg is OK)
  • abillity to manually switch to the highest resultion HLS stream for active watching
  • save pictures and streams (then with the higest quality)
  • navigate through the history (independent if realized using synology nas or HA technology)

My configuration:
I personally use 4 x 8MP cameras with three streams connected to the synology NAS. All three streams are configured: One with 8MP, one with 1MP and one as a kind of thumbnail stream.

Behaviour of new synology_dsm integration (camera):

  • I found out that the new synology_dsm integration tends to create problems by showing this 8MP streams using HLS (no mjpeg) at all (this seems to be the new default). The delay is worse > 10 sec.
    My Samsung S7 (ha app and browser) and also my older PC which worked well for presenting the lovelace interface up to now often struggle with the camera streams.
  • I also noticed thats its vital to create an administrative user instead of an surveilance station user.

I have several ideas to improve that module:

  • Create a configuration item to configure the available resolution for streaming in lovelace (perhaps interactively) +++
  • Create a configuration item to configure the available streaming technology HLS or mjpeg for lovelace (perhaps interactively) +++
  • Enable actions to save the stream and also pictures in a pre-defined quality (independend what lovelace presents) either built in lovelace or using Synology NAS methods (I am not aware of). ++
  • History module (perhaps realized using the new HA media capabilities).

Since I migrated to the new DSM integration from the ‘old’ one, I lost the ability to watch the live stream on my Andoid tablets. On W10 PC’s it is working, but rather slow.
I’m not sure why, I suppose streaming format changed ?
Befor it worked great…

Just out of curiosity - does your camera sends audio in stream too?

I don’t think so, they don’t have a micro…

I created an issue:

Dear Geert
I ran also into problems using the integration. I think you have the same problem with the streaming within lovelace. The old integration used a mjpeg stream with medium resolution to be processed even the camera provides h.264. Therefore it is fast and works well. With synology_dsm the camera modul streams the highest resolution by default using h.264 (in my configuration). The delay is worse and sometimes it doesn’t work. I raised a issue at the french fork. Hopefully we get an solution for that, but it seems to be more complex, because different usecases lead to different implementations scenarios …

FYI, looks like I have the same issue:

Thank you for creating a github issue, we will wait and see.

EDIT 20201013: Found some problems in Surveillance Station rtsp stream IP-address reference when having a Synology when using multiple network ports. Check my topic for further details.

My Syno only has 1 IP address (on a port channel with 2 interfaces).

Check your rstp stream in Surveillance Station and open (for testing) the 554 port in your Synology Firewall. Maybe my problem is something else then yours…

BTW, I noticed when changing the Edit Camera --> Live View Settings --> Stream settings --> Live view to low bandwidth (selecting the cam’s second, stream 2, lower resolution) the HA stream resolution can be altered. Maybe this can solve your problem (temporary)?

Looks to me the HA integration uses the Surveillance Station Live View setting for the stream.

Also noticed a HA 401 Unauthorized error will be generated when a Camera in Surveillance Station is Disabled (probably).

That’s strange one - I know that there is issue with stream to Chromecast enabled deices currently, that has been patched here but mine is working even without the patch normally inside HA Lovelace - no matter what resolution. Was working with Synology and is still working with Synology DSM integration.

I am not an streaming expert and therefore i cannot comment this issue and the pull requests. I just learned that HLS is not a synonym of h.264 …
At the end i hope, that either the synology_dsm integration is capable to be configured in terms of quality (resolution) and streaming mode [preferred] or its possible that the deprecated synology integration could be used as a custom integration in 0.118+… [plan-b]

Could someone show a sample yaml of what the camera set up should be now using the Synology_dsm integration?

You can use UI now, no yaml needed

1 Like

As @pergola.fabio said - use UI integrations for Synology DSM and it will pull all relevant data directly from it. No need to use any yaml code.

That is way easier. Thank you for the help.

Thank you @BeardedConti!!! I have watched many of your YouTube videos and they have been very helpful. I don’t think I would have HomeAssistant setup with out you. I have MQTT and Synology credential questions that I will write you separately about

1 Like