Core: Synology Surveillance Station not providing RTSP stream (for live view, etc.)

Created on 14 Dec 2019  路  25Comments  路  Source: home-assistant/core

Home Assistant release with the issue:

0.103.0

Last working Home Assistant release (if known):
N/A (don't think this has ever been implemented)

Operating environment (Hass.io/Docker/Windows/etc.):

Official Docker (latest tag)

Integration:

https://www.home-assistant.io/integrations/synology/

Description of problem:
The synology camera entities don't provide support Live View in Lovelace - clicking on cameras in picture-entities, etc. provides a regularly updating low-res JPEG, but not the realtime full resolution H.264 stream.

My read is that it is because the synology camera entities don't provide an RTSP stream (so can't be used for live view in the UI). This appears to be available in https://github.com/snjoetw/py-synology as video_stream_url but
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/synology/camera.py doesn't appear to use it to set stream_source:
https://github.com/home-assistant/home-assistant/blob/8f5a00a98bddc6a42424c5a72dc40cc4f33f7e26/homeassistant/components/camera/__init__.py#L359

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

camera:
  - platform: synology
    url: https://127.0.0.1:5001
    username: ***
    password: ***
    timeout: 30
    verify_ssl: false

Traceback (if applicable):


Additional information:
N/A

synology

Most helpful comment

PR here #39838

All 25 comments

I am not sure why it is not working, however video_stream_url seems to be utilized for creating a MJPEG stream image:
https://github.com/home-assistant/home-assistant/blob/003658a3f084c5be5e4959f69c57e526423a7ef3/homeassistant/components/synology/camera.py#L88-L95

I misread it, you're right.

The underlying library is just returning mjpeg - not pulling rtspPath from GetLiveViewPath per https://global.download.synology.com/download/Document/Software/DeveloperGuide/Package/SurveillanceStation/All/enu/Surveillance_Station_Web_API.pdf

So more work than it looked at first glance.

(Looks like there's a PR from back in March addressing this - https://github.com/snjoetw/py-synology/issues/11)

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still an issue mainly due to the library.

The integrations page stated it was an device issue that was fixed in preview (8.2.3-5829) the current live supported release is 8.2.7-6222 now. So in theory this should be fixed on the DSM side and possible to complete the integration.

This issue is present (and was raised) in version 8.2.7-6222

Don't know if this is helpful or not, but I noticed your URL is https, but you have configured verify_ssl: false. This seems to be a contradiction? Why not use http?

(Full disclosure, I can't get mine working, so take it with a grain of salt)

I don't have the service running on http (and I wanted to make sure the config eliminated any hint of network issues, etc. - so used 127.0.0.1). I did try it out that way, but it doesn't make a difference.

I think I've successfully identified the issue further up - the library isn't actually requesting the RTSP stream.

Guys, please, clarify - has the problem already solved? Does current Synology integration to Home assistant work with RTSP?

Guys, please, clarify - has the problem already solved? Does current Synology integration to Home assistant work with RTSP?

Unless I missed something they still play a 2 second delayed slide shows, not streams..

It looks like the python library was updated, but nothing on the HA side of things. :-(

Also, with Synology integration, it's not possible to use stream: in HA ...
So I use the provided rtsp streams, and the generic HA camera component

@Quentame Do you know if there are any plans to update the HA component to take advantage of https://github.com/ProtoThis/python-synology/pull/57?

@bagobones

Unless I missed something they still play a 2 second delayed slide shows, not streams..
2 seconds is not bad. "Standard" delay for RTSP stream in HA is about 7-10 seconds. I compared original camera RTSP stream with Synology integration "stream" - the last works faster even with the current version.

@pergolafabio

Also, with Synology integration, it's not possible to use stream: in HA ...
So I use the provided rtsp streams, and the generic HA camera component
Synology integration has some very valuable features like:
1) PVTZ angle presets, which can be used in HA via Syno API
2) Surveillance Home mode activation/deactivation
3) Motion detection with automatic video clip save with time back delay
4) Different video resolution for stream and motion detection videos
I see the only alternative way with MotionEye, but it is silly to use another soft when you already have Surveillance station.

Amazing, thank you! Will grab as a custom_component and test it out

is it now also possible to use the stream: component? this was not working before with cameras from synology

It looks like it's now supported in the underlying python-synology library, but cameras have yet to be added to any components. Not sure what the longer-term plan is for the various synology components if the library has now all come together - I'm guessing they will merge into one at some stage?

But no, for right now, it is not possible to get a stream from Surveillance Station. But we are a lot closer than when I opened the issue.

Ah ok, so what are advantages now then with this new library?

It appears to contain all the functions necessary to properly use Surveillance Station - uses the updated API, etc.; like the release says to "add further platform, service and sensors in a the future". So updating the synology camera component is a lot easier (not _no_ work, but less work).

Said another way - my comment on Dec 15 was essentially 'this looks like a bunch of work, since someone has to update the library'. Someone has now done a bunch of work, and updated the library (thanks @Quentame).

@BobWatson got the point, this new version of the library is necessary to add the camera platform into HA.
@shenxn is already working on it 馃槈

Is there a PR where I can subscribe too for those czmeras

Is there a PR where I can subscribe too for those cameras

Not yet but I鈥檒l tell you

PR here #39838

ty, appreciated

Was this page helpful?
0 / 5 - 0 ratings