Home Assistant Community

Synology Surveillance Station IP Camera

#1

It looks like a decent numbers of users have setup Home Assistant on a Synology NAS. Is there any interest in integrating the camera feeds from Surveillance Station into HA? I’ve written the code and got it working on my DS413, but wanted to judge interest before figuring out how to submit the code back into HA.

5 Likes

#2

I would like this feature please

0 Likes

#3

I’d be interested as well

0 Likes

#4

I have the Synology DS1515+. would be keen to see that feature. Especially the MSTP is not supported directly with HASS.

0 Likes

#5

I must’ve reached some limit that doesn’t allow me to vote for features anymore, but I would like integration as well.

Although I must ask: is there anything to be gained from integrating IP cameras this way if they’re already supported by HA directly (e.g. Foscam IP cameras) ?

0 Likes

#6

Although I don’t use any IP cams, I do use my Synology NAS, so +1 from me.

I would think that there would be the ability to enable/disable recording of cams with this integration? That would be the advantage

0 Likes

#7

Oh, good point! That would be awesome indeed! +1 :grin:

0 Likes

#8

I started working on it because my cameras only support rtsp streams which don’t seem to be supported by HA. However the synology does support the cameras and can then serve snapshots/mjpeg to HA acting a bit like a proxy. With the API you could also integrate enabling/disabling recordings, but I haven’t worked on that part yet.

1 Like

#9

I’ve got a basic component up and working which you can get here:

the configuration.yaml entry looks something like this:
camera:

Make sure to change the url to the address and port of your synology as well as the username and password to a login that has permission to surveillance station. verify_ssl needs to be set to false if you are using the built in self signed certificate. If you’ve changed to a valid ssl cert, change this value to true. There is also a whitelist option if you only want to import a subset of the cameras.

I’ve tested this on my DS413 running Surveillance Station 7.2.3-4664.

2 Likes

#10

The new component has been accepted into the dev branch for HA so I imagine we’ll see it in a future version soon. I’m working on the documentation for the website now. Check there for future info on how to use the component.

2 Likes

#11

Thanks for the great work.
I have a small issue:
when using the ‘unsafe’ HTTP, everything is working fine.
Changing URL and PORT for HTTPS and adding the verify_ssl: False is not working.

In the log i see:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

Any ideas ?

0 Likes

#12

Same for me.

0 Likes

#13

Also, what type of updates should I expect from this when the camera is selected? It looks like it’s a couple per second. Is that right? I ask because the documentation says “The synology platform allows you to watch the live streams of your Synology Surveillance Station based IP cameras in Home Assistant.” By live streams I thought that would be the full fps the cameras is streaming. In my case 15 fps.

Can someone please confirm ?

0 Likes

#14

I think Home Assistant treats all camera streams the same:

  • 1 frame every 10 seconds or so when showing the thumbnail version
  • 2-3 frames every second after clicking on the thumbnail to show a larger version

That is how my Foscam R2 is integrated into HASS (directly, not via Synology’s Surveillance Station).

0 Likes

#15

Not really or at least not on my system. I use the FFMPEG camera component which takes the RTSP stream from my camera (which is also being recorded by Surveillance Station on Synology) and is available as a full stream. Unclicked they update every 10 seconds but when clicked it is a live stream based on what my camera settings are. Mine are about 12fps so I get full motion video. I would have though that’s what this component was doing but much to my surprise it wasn’t.

0 Likes

#16

Looks like the code accepted differs from what I documented. To disable SSL use the keyword valid_cert instead of verify_ssl in configuration.yaml. I’ll modify the code to match to documentation, sorry for the mistake.

0 Likes

#17

For now the component is pulling a snapshot that synology generates for the cameras, I doubt this is updated at 15fps. In the future I may work on adding the livestream, but for now I wanted to get something working available that would provide the basic functionality.

0 Likes

#18

OK cool thanks for that. I’ll keep on a lookout for when this changes.

0 Likes

#19

Thank for the debugging, SSL is working now !
For info, i changed:

http --> https
port number 5000 --> 5001
added valid_cert: False

BTW, i thing validate certificate is better wording :wink:

0 Likes

#20

any get this error message with HA 0.32.1?

16-11-06 
14:04:36 homeassistant.components.camera: Error while setting up 
platform synology
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py",
 line 143, in _async_setup_platform
entity_platform.async_add_entities, discovery_info
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/homeassistant/components/camera/synology.py",
 line 75, in async_setup_platform
verify_ssl=config.get(CONF_VERIFY_SSL)
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/client.py",
 line 403, in get
**kwargs))
TypeError: _request() got an unexpected keyword argument 'verify_ssl'

Thats my config worked well with 0.31.x

camera:
  - platform: synology
    url: http://192.168.2.2:5000
    username: Simon
    password: !secret synology_password
    verify_ssl: false
0 Likes