N4S4 / synology-api

A Python wrapper around Synology API
MIT License
360 stars 137 forks source link

Synology Surveillance Station integration #144

Closed insanity67 closed 6 months ago

insanity67 commented 7 months ago

Hey there,

do you have any plans to integrate Synology Surveillance Station App api?

Best regards

N4S4 commented 6 months ago

Hi, I did not need it as i dont use, I'll see what i can get from docs and i will let you know.

If you have any information about u can pass it to me!

thank you

insanity67 commented 6 months ago

Hey there,

thx for you reply. I found this documentation: https://global.download.synology.com/download/Document/Software/DeveloperGuide/Package/SurveillanceStation/All/enu/Surveillance_Station_Web_API.pdf

I had to quickly implenent a monitoring tool for surveillance cameras last weekend, and used this repo: https://github.com/ProtoThis/python-synology

I hope to have some time this weekend, maybe I can figure out, how to impletent some parts.

insanity67 commented 6 months ago

If you could implement the basic skeleton for the api, I could try to implement and test the different api functions.

N4S4 commented 6 months ago

Ok I will work on it

N4S4 commented 6 months ago

ok so was quite a trip, the skeleton has been implemented commit, many functions are marked# TODO not working or # TODO to check. I have tested installing survelliancestation app but i do not have a camera to check. If you are a frequent user, could u test and see what's wrong in few?

I found few errors in the pdf and maybe old? anyway should give a good start for a better implementation

I will close the PR but keep alive the conversation

insanity67 commented 6 months ago

Wow, great news, thank you! I will have some time on the weekend to test it out!

insanity67 commented 6 months ago

If you want to test with your surveillance station in the meantime, I have set up an rtsp test stream for you: rtsp://78.47.135.213:8554/stream

This can be added to surveillance station as a camera: https://kb.synology.com/en-uk/Surveillance/tutorial/How_to_make_an_attempt_to_install_an_unsupported_IP_camera_in_Surveillance_Station

image

N4S4 commented 6 months ago

cool, i will see when I have a bit of time to test more

insanity67 commented 6 months ago

oh wow, it almost looks like I overestimated my Python knowledge a little :( my first attempts at the todos failed miserably. I'll have another look at it at the weekend.

But the API documentation seems to be the latest, at least I can't find any other.

N4S4 commented 6 months ago

Ok because when i go to synology dev website i have to subscribe to see the api. Anyway do not underestimate ur skills, there are many cases, I think, that the api instructions are missing or wrong.

insanity67 commented 6 months ago

You could take a look here: https://github.com/hacf-fr/synologydsm-api Some things not working here are implemented there, but I could not really convert them.