Synology Surveillance Station
vining
Posts: 4,368
I just came across a WEB API for the Synology NAS Surveillance Station app that allows you to control almost all features of the NVR. You can get all your cam info, control recording, view schedules, retrieve stored files, etc.
Here's a little of the info you can pull off it with some of the available queries, it also shows the string to start recording camera 1. This should help anyone that might want to use one of these figure out how to go about doing this.
http://download.synology.com/download/ds/userguide/Synology_Surveillance_Station_Web_API_v0.12.pdf
Here's a little of the info you can pull off it with some of the available queries, it also shows the string to start recording camera 1. This should help anyone that might want to use one of these figure out how to go about doing this.
http://download.synology.com/download/ds/userguide/Synology_Surveillance_Station_Web_API_v0.12.pdf
3 (08:07:46):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 4 (08:07:46):: Connected Successfully Line 5 (08:07:46):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 6 (08:07:46):: CIpEvent::OnLine 0:12:1 Line 7 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 1 ] :DEBUG<293> Line 8 (08:07:47):: Exiting TCP Read thread - closing this socket for local port 12 Line 9 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ {"data":{"SYNO.API.Auth":{"maxVersion":3,"minVersion":1,"path":"auth.cgi"},"SYNO.Survei Line 10 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-2], llanceStation.AudioStream":{"maxVersion":1,"minVersion":1,"path":"SurveillanceStation/audioStreaming Line 11 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-3], .cgi"},"SYNO.SurveillanceStation.Camera":{"maxVersion":3,"minVersion":1,"path":"SurveillanceStation/ Line 12 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-4], camera.cgi"},"SYNO.SurveillanceStation.Device":{"maxVersion":2,"minVersion":1,"path":"SurveillanceSt Line 13 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-5], ation/device.cgi"},"SYNO.SurveillanceStation.Emap":{"maxVersion":1,"minVersion":1,"path":"Surveillan Line 14 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-6], ceStation/emap.cgi"},"SYNO.SurveillanceStation.Event":{"maxVersion":2,"minVersion":1,"path":"Surveil Line 15 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-7], lanceStation/event.cgi"},"SYNO.SurveillanceStation.ExternalRecording":{"maxVersion":2,"minVersion":1 Line 16 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-8], ,"path":"SurveillanceStation/extrecord.cgi"},"SYNO.SurveillanceStation.Info":{"maxVersion":2,"minVer Line 17 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-9], sion":1,"path":"SurveillanceStation/info.cgi"},"SYNO.SurveillanceStation.Notification":{"maxVersion" Line 18 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-10], :1,"minVersion":1,"path":"SurveillanceStation/notification.cgi"},"SYNO.SurveillanceStation.PTZ":{"ma Line 19 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-11], xVersion":2,"minVersion":1,"path":"SurveillanceStation/ptz.cgi"},"SYNO.SurveillanceStation.Streaming Line 20 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-12], ":{"maxVersion":2,"minVersion":1,"path":"SurveillanceStation/streaming.cgi"},"SYNO.SurveillanceStati Line 21 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-13], on.VideoStream":{"maxVersion":1,"minVersion":1,"path":"SurveillanceStation/videoStreaming.cgi"}},"su Line 22 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-14], ccess":true}$0A ] :DEBUG<1623> Line 23 (08:07:47):: CIpEvent::OffLine 0:12:1 Line 24 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 25 (08:07:47):: Connected Successfully Line 26 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 27 (08:07:47):: CIpEvent::OnLine 0:12:1 Line 28 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 2 ] :DEBUG<293> Line 29 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send String-[ GET /webapi/auth.cgi?api=SYNO.API.Auth&method=Login&version=2&account=username&p Line 30 (08:07:47):: SynSS MOD-[ 1 ] DEBUG:[L-2], asswd=mypassword&session=SurveillanceStation&format=sid$0D$0A ] :DEBUG<315> Line 31 (08:07:47):: UI DEBUG: (1) [ 10003:1:0 ], PUSH CHNL-[ 101 ] :DEBUG<5492> Line 33 (08:07:48):: Exiting TCP Read thread - closing this socket for local port 12 Line 34 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ {"data":{"sid":"x5TbSqVz66DWg"},"success":true}$0A ] :DEBUG<1623> Line 35 (08:07:48):: CIpEvent::OffLine 0:12:1 Line 36 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 37 (08:07:48):: Connected Successfully Line 38 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 39 (08:07:48):: CIpEvent::OnLine 0:12:1 Line 40 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 3 ] :DEBUG<293> Line 41 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send String-[ GET /webapi/SurveillanceStation/camera.cgi?api=SYNO.SurveillanceStation.Camera Line 42 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-2], &method=List&version=1&offset=0&limit=4&additional=device,video,record,schedule,advanced&_sid=x5TbSq Line 43 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-3], Vz66DWg$0D$0A ] :DEBUG<323> Line 44 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ {"data":{"cameras":[{"additional":{"advanced":{"liveSource":1,"mdSource":1,"rotationLim Line 45 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-2], itReachedAction":0},"device":{"channel":"1","httpPort":80,"model":"213 PTZ","vendor":"AXIS"},"record Line 46 (08:07:48):: Exiting TCP Read thread - closing this socket for local port 12 Line 47 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-3], ":{"eventFolder":"/var/services/surveillance/Hooker Cam","eventPrefix":"Hooker Cam","postRecTime":15 Line 48 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-4], ,"preRecTime":5,"recTime":30,"rotationDay":0,"rotationSize":250},"schedule":{"fri":[2,2,2,2,2,2,2,2, Line 49 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-5], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"mon":[2,2,2,2,2,2, Line 50 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-6], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"sat":[2,2,2,2, Line 51 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-7], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"sun":[2,2, Line 52 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-8], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"thu":[ Line 53 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-9], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"tu Line 54 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-10], e":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] Line 55 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-11], ,"wed":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, Line 56 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-12], 2,2]},"video":{"liveFps":30,"liveQuality":"5","liveResolution":"4CIF","recFps":30,"recQuality":"5"," Line 57 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-13], recResolution":"4CIF","streamingType":"HTTP","videoCodec":"MJPEG"}},"enabled":true,"host":"192.168.1 Line 58 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-14], .42","id":1,"name":"Hooker Cam","recStatus":0,"status":0},{"additional":{"advanced":{"liveSource":1, Line 59 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-15], "mdSource":1,"rotationLimitReachedAction":0},"device":{"channel":"1","httpPort":80,"model":"209FD"," Line 60 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-16], vendor":"AXIS"},"record":{"eventFolder":"/var/services/surveillance/Porch Cam","eventPrefix":"Porch Line 61 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-17], Cam","postRecTime":15,"preRecTime":5,"recTime":30,"rotationDay":0,"rotationSize":250},"schedule":{"f Line 62 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-18], ri":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 Line 63 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-19], ],"mon":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 Line 64 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-20], ,2,2],"sat":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 Line 65 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-21], ,2,2,2,2] ] :DEBUG<1623> Line 66 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ ,"sun":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, ] :DEBUG<1623> Line 67 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"thu":[2,2,2,2,2,2,2,2,2,2,2,2,2,2 Line 68 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-2], ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"tue":[2,2,2,2,2,2,2,2,2,2,2,2 Line 69 (08:07:48):: SynSS MOD-[ 1 ] DEBUG:[L-3], ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"wed":[2,2,2,2,2,2,2,2,2,2 Line 70 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-4], ,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"video":{"liveFps":30 Line 71 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-5], ,"liveQuality":"5","liveResolution":"640x480","recFps":30,"recQuality":"5","recResolution":"640x480" Line 72 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-6], ,"streamingType":"HTTP","videoCodec":"MJPEG"}},"enabled":true,"host":"192.168.1.52","id":2,"name":"P Line 73 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-7], orch Cam","recStatus":0,"status":0},{"additional":{"advanced":{"liveSource":1,"mdSource":1,"rotation Line 74 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-8], LimitReachedAction":0},"device":{"channel":"1","httpPort":80,"model":"241S","vendor":"AXIS"},"record Line 75 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-9], ":{"eventFolder":"/var/services/surveillance/Parking Cam","eventPrefix":"Parking Cam","postRecTime": Line 76 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-10], 15,"preRecTime":5,"recTime":30,"rotationDay":0,"rotationSize":250},"schedule":{"fri":[2,2,2,2,2,2,2, Line 77 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-11], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"mon":[2,2,2,2,2, Line 78 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-12], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"sat":[2,2,2, Line 79 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-13], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"sun":[2, Line 80 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-14], 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2],"thu" Line 81 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-15], :[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]," Line 82 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-16], tue":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, Line 83 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-17], 2],"wed":[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, Line 84 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-18], 2,2,2]},"video":{"liveFps":30,"liveQuality":"5","liveResolution":"4CIF","recFps":30,"recQuality":"5" Line 85 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-19], ,"recResolution":"4CIF","streamingType":"HTTP","videoCodec":"MJPEG"}},"enabled":true,"host":"192.168 Line 86 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-20], .1.54","id":3,"name":"Parking Cam","recS ] :DEBUG<1623> Line 87 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ tatus":0,"status":0}],"offset":0,"total":3},"success":true}$0A ] :DEBUG<1623> Line 88 (08:07:49):: CIpEvent::OffLine 0:12:1 Line 89 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 90 (08:07:49):: Connected Successfully Line 91 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 92 (08:07:49):: CIpEvent::OnLine 0:12:1 Line 93 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 4 ] :DEBUG<293> Line 94 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send String-[ GET /webapi/SurveillanceStation/extrecord.cgi?api=SYNO.SurveillanceStation.Ext Line 95 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-2], ernalRecording&method=Record&version=1&cameraId=1&action=start&_sid=x5TbSqVz66DWg$0D$0A ] :DEBUG<331> Line 96 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ {"data":{"success":true},"success":true}$0A ] :DEBUG<1623> Line 97 (08:07:49):: Exiting TCP Read thread - closing this socket for local port 12 Line 98 (08:07:49):: CIpEvent::OffLine 0:12:1 Line 99 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 100 (08:07:49):: Connected Successfully Line 101 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 102 (08:07:49):: CIpEvent::OnLine 0:12:1 Line 103 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 5 ] :DEBUG<293> Line 104 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send String-[ GET /webapi/auth.cgi?api=SYNO.API.Auth&method=Logout&version=1&session=Surveil Line 105 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-2], lanceStation&_sid=x5TbSqVz66DWg$0D$0A ] :DEBUG<339> Line 106 (08:07:49):: Exiting TCP Read thread - closing this socket for local port 12 Line 107 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], String, RX-[ {"success":true}$0A ] :DEBUG<1623> Line 108 (08:07:49):: CIpEvent::OffLine 0:12:1 Line 109 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ], Attempting IP_Open :DEBUG<218> Line 110 (08:07:49):: Connected Successfully Line 111 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Connected to SynSS MOD-[ 1 ], host IP-[ 192.168.1.45 ] :DEBUG<264> Line 112 (08:07:49):: CIpEvent::OnLine 0:12:1 Line 113 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], Online, Send Command-[ 6 ] :DEBUG<293> Line 114 (08:07:49):: SynSS MOD-[ 1 ] DEBUG:[L-1], fnDevMod_IPClose: Closing connection! :DEBUG<283>
0
Comments
I'm curious about Synology Surveillance Station myself... Do you have the IP cameras on a VLAN so that they don't clog up everything else? It seems to me that the perfect situation would be to put a Synology on a dedicated network switch with all IP cameras, and then send the video stream to the AMX panels from the Synology - is that how it's done? Or, do you have to stream the video from the cameras to both the Synology and the AMX panels at the same time on the same network? I'm a little concerned about network bandwidth...
Mark