Synology Diskstation & Cameras

@pmcnano I’ll private message you with some things to try.

Thanks Swanny, I figured that was it. I’ll disable the two factor for now to see if I can get this to work.

FYI - I too had the “API ID” issue, but I managed to resolve it by disabling the checkbox "Show DSM notifications and sync Email/SMS/Push Service settings with DSM under the “Advanced” tab from the Notification settings in Surveillance Station.

@swanny Need your help again, My camera was working for a long time since I have got the new Synology Diskstation, but Since there are several update of Surveillance station, and now my Surveillance station is 7.1-4110, and I find out my motion detection function was no longer work, I also try to re-setup again, but sometime it work, sometime it will show you Network Timeout, but when I was able to connect to Diskstation (Connect), and next step I try to setup at Surveillance station, when I press send SMS try to compete the setup, nothing happen at my iPhone setup screen, so far the motion detection still fail, but take picture work, Could you help to see if new Surveillance station 7.1-4110 conflict with your code.

Trying to get this setup. I get to the point where I choose the cameras, once I select them, I pick next and get a blank page and it errors out. Any ideas

thanks

Try closing the Smartthings app completely on your device and go through the steps again. See if you get a blank page.

Also, you have enabled OAuth, correct?

Fixed it thanks. I forgot to enable oauth.

1 Like

Hey Swanny! This is one sweeeeet app, you’re an absolute legend for making this.

I am guessing I must have stuffed something somewhere along the way, because for some reason I cant get the snapshots to work. The record button seems to work fine, I end up with a recording saved on my Diskstation, not sure if those recordings are supposed to be visible in the ST App as well? I’m not too fazed about that, snapshots would be perfect if I could just get it working. Here’s what’s happening in Live Logging. (The massive amount of underscores seems suspicious to me but I’m no programmer lol…) I did read through this thread and attempt to troubleshoot my issues before asking, but I’ve had no luck.

16:40:16: debug take command is: GET /webapi/_______________________________________________________entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=KwpaDzDJGAolnB3J7M03226&cameraId=4 HTTP/1.1
HOST: 192.168.1.10:5000
Accept: image/jpeg

16:40:16: trace sending GetSnapshot
16:40:16: trace take picture from camera 4 default stream

You can’t access recorded video in the ST app, only snapshots.

Where you changing around the code in anyway?

Hmm. Some people have had issues taking snapshots that I haven’t been able to figure out.

Try to open this link from your local network: http://192.168.1.10:5000/webapi/______________________________________________________entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&sid=KwpaDzDJGAolnB3J7M03226&cameraId=4

If it works, then it means we have the right link but there is something wrong in the process that gets the image to the device in SmartThings. If it doesn’t work, there may be some kind of configuration issue. Are you in the US? The image process uses the Amazon cloud, and I’m not sure if that works consistently everywhere. The underscores are normal but I agree they do look weird.

Hi, this is a great piece of code. thank you so much.

I too have the issue with snapshots - I’ve only ever had one appear (half - it was a half downloaded jpg by the looks of it) in the ‘things’ page, and never refreshes. when I press ‘take’ it stays lit, as if nothing is toggling.

also, my motion notifications are very inconsistent. I can always set it up, and then they seem to work for a period of time, and then randomly they’ll just stop registering. I can see diskstation is still trigger to record itself, but no corresponding entry for ‘motion’ in the ‘recently’ tab.

I am using a DS1815+ with DSM 5.2-5644 Update 5, with surveillance station 7.1-4141. If I knew how to send logs, I would send them over

Hi Swanny, In another thread there are some mentions of image size from some cameras being to big to upload on Amazon server causing this issue. I have 2 hikvision cameras and Image capture doesn’t work using your code. However in the same thread Drew ha posted a modified code and using that code I can take images from my Hikvision without any problem using ST interface. I am not a programmer/expert but may be you can take a look a his code and possibly add those modifications for taking images That may solve the issue many of us having with image capture ?? Here is the link -

In the thread, issues with Hikvision not being able to take images is mentioned several times as well.

@mu71rd and @DjAnu There seem to be issues with the image size or other factors with the way we have to process images through to SmartThings. You can try to set the cameras default image size lower as a test. If that works but you want the image higher res in Surveillance Station, you can try to use the stream support which allows you to set a specific size for SmartThings device. If that doesn’t work, I don’t really know what to tell you at this time.

To set up the second stream, go into Surveillance Station under “IP Cameras”. Choose the camera and “Edit”. Go the the Video tab of Device Settings. If your camera supports it, you’ll be able to set your mobile stream to use Stream 2. Edit the stream 2 settings here or in your actual camera settings using the camera’s software. Then open the SmartThings app, go into that camera’s device, and Edit Device. There you can set the stream to capture from to “2”.

@mu71rd The notifications have been having issues for me recently too. I’ll take a look when I can. I’m guessing it’s instability in my app that has broken as ST makes changes to the way their cloud works. I probably just need to play around with it again when I have time. Hopefully this weekend…

Hi Swanny, I have already explored those options…Image size is actually not configurable in camera settings. Stream resolution can be changes though. However no matter what resolution I chose for stream, when I use open the image directly from browser using ipaddress/Streaming/channels/1 or 2 /picture, I get the same image size. It seems, we cant reduce the captured image size. However I added a device type from Drew as mentioned above in other thread, and from that UI I can take a view multiple shots without any issue…I was wondering if there is any difference in how the getsnapshot command is being used in his code and if it can be implemented on your code as well ?

@swanny I have some issue need your help, It just happen yesterday… I have 2 Synology NAS, and each support 2 Camera license… so I have 2 camera in one NAS station, and I got another Camera in other NAS… and when I setup another new Camera in another NAS, and previous 2 Camera at other NAS seem stop to work like motion detection…

I try to build the device again and connect them use Diskstation (connect). and It show me at below message

at IDE
live logs21c86240-70de-4283-b797-ffe148a5b299 GMT+8 08:54:15: trace force refresh of DS info
21c86240-70de-4283-b797-ffe148a5b299 GMT+8 08:54:11: trace subscribe to location

at Mobile App
Network Timeout. Check your ip address and port. You must access a local IP address and a non-https port.

However, the new Camera at another NAS still working by click Diskstation (Connect) and we could find the Camera during setup

Question is

1.Could we have 2 Diskstation (Connect) in SmartThing Apps, and Both connect to different IP address belong to 2 NAS.

2.We have both Surveillance Station upgrade to 7.2.1-4602 at both NAS, but as one of NAS is working, so I think it is not version issue.

  Please help me to see what is going on ?

@swanny after reboot my both NAS , and I click Diskstation (Connect)… 192.168.1.97 & 192.168.1.99… Both have same message at IDE and SmartThing Apps as I describe above… It come to me maybe Surveillance Station upgrade to 7.2.1-4602 cause this problem…so now all my DSC-930L Camera lost the motion detection function now…

@swanny After SmarThing Support help to solve one problem, then I can connect all my 3 Camera back again…I do not know why, but now all 3 Camrra back to normal and could detect motion…

I have updated the code to change the motion detection instructions for the latest Diskstation / SurveillanceStation update. They changed the notification message that was being used in the update, so we have to now customize it to know which camera detected motion.

If you are having motion detection issues, update to this latest code. If you aren’t having any issues, you don’t need to update although it won’t hurt anything.

1 Like

Hi,

Ive installed this and it works really well, thanks for creating something so useful, I do have one question.

I cant seem to get the snapshot from cameras working with smarttiles, is it supposed to work?

@swanny I have 3 DCS-930L camera,one is DCS930L, another is DCS930-LB,and DCS-930LB1 , I have my hub replacement as it is dead, I used your latest code, and generate 3 Disputation Camera, It can detect motion, No problem, but When I press"TAKE", only one Camera can take the snapshot, while other 2 can not, really strange, one of camera are same group of SurveillanceStation

a323724c-684e-4e97-8404-eebf63760b78 上午8:25:06: trace image stored = DCS-930LB1_8de7387c15534c55b056a0815184dd29.jpg
a323724c-684e-4e97-8404-eebf63760b78 上午8:25:04: debug take command is: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=RoQg4gMhR2biU1550N4N816106&cameraId=4 HTTP/1.1
HOST: 192.168.1.97:5000
Accept: image/jpeg
a323724c-684e-4e97-8404-eebf63760b78 上午8:25:04: trace sending GetSnapshot
a323724c-684e-4e97-8404-eebf63760b78 上午8:25:04: trace take picture from camera 4 default stream

863b5d67-6a2b-45ad-a109-35c298524664 上午8:34:34: debug take command is: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=MoM07viD5aLg61630NNN024106&cameraId=1 HTTP/1.1
HOST: 192.168.1.99:5000
Accept: image/jpeg

863b5d67-6a2b-45ad-a109-35c298524664 上午8:34:34: trace sending GetSnapshot
863b5d67-6a2b-45ad-a109-35c298524664 上午8:34:34: trace take picture from camera 1 default stream
863b5d67-6a2b-45ad-a109-35c298524664 上午8:24:35: debug take command is: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=MoM07viD5aLg61630NNN024106&cameraId=1 HTTP/1.1
HOST: 192.168.1.99:5000
Accept: image/jpeg