Synology Diskstation & Cameras

I’ve found mine is working fine on 4G, but is really inconsistent on wifi, either at home or remotely. Can you check for any error messages in your IDE live log, and also see if the URL which appears in the log when you hit live stream trace just before ‘streaming…’ works if you copy and paste it into either Chrome browser or VLC?

I have had some success on 4G too. I have looked on the IDE log as there are no errors show. this is what i see on the camera log:

e67e7404-2656-4ecb-8083-37241857268c 13:40:41: trace Motion deactivated
e67e7404-2656-4ecb-8083-37241857268c 13:40:41: debug take command is: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=aNRcNRuj3SKuMCCL1N01980&cameraId=2 HTTP/1.1
HOST: 192.168.42.7:9900
Accept: image/jpeg

e67e7404-2656-4ecb-8083-37241857268c 13:40:41: trace take picture from camera 2 default stream
e67e7404-2656-4ecb-8083-37241857268c 13:40:41: trace Motion activated
e67e7404-2656-4ecb-8083-37241857268c 13:39:28: trace Motion deactivated
e67e7404-2656-4ecb-8083-37241857268c 13:39:28: debug take command is: GET /webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=1&_sid=aNRcNRuj3SKuMCCL1N01980&cameraId=2 HTTP/1.1
HOST: [local ip address]:[custom port]
Accept: image/jpeg

Have chanegd the details for privacy but they are right

and for the smart app:

8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace [child:Diskstation Front Camera, time:1485697657949]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace events: [physicalgraph.app.EventWrapper@9140e75, physicalgraph.app.EventWrapper@3c127fb]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace children: [Diskstation Garden Camera, Diskstation Front Camera, Water Feature, Diskstation Drive Camera]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: debug getChildDevices(false), children=4
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace searchtype = takeImage
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace trying getFirstChildCommand for SYNO.SurveillanceStation.CameraGetSnapshot
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace event = index:17, mac:0011321A0050, ip:C0A82A07, port:26AC, requestId:f75076c9-c32c-48e6-acf2-edacda0e9c1e, bucket:smartthings-device-conn-temp, key:80514c75-e7c3-4338-bd99-3527a46e3a32
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:40: trace Parsed event keys: [ip, port, requestId, bucket, key, hub]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:38: debug checkMotionDeactivate Front Camera deactivated
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:37: debug getChildDevices(false), children=4
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:37: trace AutoTake is on. Taking image for Diskstation Front Camera
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:47:37: trace Motion detected on Diskstation Front Camera
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace saving image to device
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace [child:Diskstation Front Camera, time:1485697617148]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace events: [physicalgraph.app.EventWrapper@6da9927a]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace events: []
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace children: [Diskstation Garden Camera, Diskstation Front Camera, Water Feature, Diskstation Drive Camera]
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: debug getChildDevices(false), children=4
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace searchtype = takeImage
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace trying getFirstChildCommand for SYNO.SurveillanceStation.CameraGetSnapshot
8f1a4cb1-d33f-472f-b0d8-5c0c4032a8fa 13:46:59: trace event = index:17, mac:0011321A0050, ip:C0A82A07, port:26AC, requestId:4b78922c-f944-4ab9-9dd9-6f9d042e1d49, bucket:smartthings-device-conn-temp, key:e482934f-dcae-4839-8390-e5f32e7ed102

I have tired the stream in chrome and it starts a download called ‘stream.cgi’ that never completes, and VLC hangs when you try to launch he stream

In fact after a lot of testing, I can confirm that 4G works very reliably, as does hooking up to any wireless outside of the same LAN as the diskstation. The only time the problem manifests itself is when my iPhone is on the same LAN as the diskstation. I hope that helps in some way?

I’ve noticed something that I think is new in SS 8.0, they let you create a link to a camera stream that doesn’t expire after 1 hour. In IP Camera / edit a specific camera / Camera Settings / Live View Settings / Advanced / Stream Sharing Path - duration of validity / forever. (You can get the actual stream by right clicking on the camera in the list under camera settings.) I’ve played it through VLC (media/open network stream) and it seems to work. I bet this would work great in SmartTiles with any camera on the Synology server…however, I have not used tiles in a while, so I cant test it right now. (it used to work, but stop after 1 hour when the link expired.)

Until this change, I’d been trying to find a quick way for one of our clerks to be able to watch video from a parking lot camera, without having to go through all the login stuff. It’s on a private network, so it’s not accessible from the out side…and it’s ok if anybody in the company watches it, so it’s secure enough.

Any progress on getting the video streams / recordings to work on the local network? I dont open up my cameras to the Internet so if that is required perhaps that is my issue.

I have two Samsung Smartcam HD Pro cameras (both model SNH-P6410BN at firmware v1.08), setup in Surveillance Station on my DS416.

I’d recommend first testing using VLC Media Player
File > Open Network Stream > provide the following URL:
rtsp://username:password@ipaddress:554/profile1/media.smp
You can also replace “profile1” with the following profiles:

  • profile1 = 1920x1080 Motion JPEG Video (MJPG)
  • profile2 = 640x360 H264 (MPEG4)
  • profile3 = 640x360 H264 (MPEG4)
  • profile4 = 1280x720 H264 (MPEG4)
  • profile5 = 1920x1080 H264 (MPEG4)
  • profile6 = 640x360 H264 (MPEG4)
    Other cameras will have different stream options and I’m guessing different paths to the streams depending on the manufacture.

Then my setup in Surveillance Station is as follows…
IP Camera > Add > Add Camera
Setup: select “Complete Setup” > click "Next"
Information: enter the following information > click “Next”

  • Name = {whatever name you want}
  • IP address = {camera ip address that worked in VLC test}
  • Port = 554
  • Brand = [User Define]
  • Video format = H.264
  • Source path = /profile5/media.smp
  • Username = {camera username that worked in VLC test}
  • Password = {camera password that worked in VLC test}
    Video: leave defaults > click "Next"
    Recording: configure recording and archive settings as desired > click "Next"
    Schedule: configure schedule as desired > click “Finish”

Then I setup needlerp’s Diskstation Smartapp and Diskstation Camera device handler in SmartThings developer site under My SmartApps and My Device Handlers respectively.

As you can see, I’m using the profile5 stream to record in Surveillance Station, but you can use one of the other profiles if you don’t want the full res stream. The last thing I still want to figure out is how to enable/disable cameras in Surveillance Station based on SmartThings mode… But really all I want is SmartThings to be able to disable/enable the motion detection option on the camera itself based on ST mode, then I could just eliminate Surveillance Station from the equation and use the TechWin app exclusively.

Hopefully this helps someone else new to this like myself…
Justin

For whatever reason this is still not working for me. I can see the streams fine in VLC. The motion detection works fine. Just no live stream and no image. This used to work for me until the smarthings platform change.

Ok weird. @needlerp I now have the live stream working but for some reason I cannot capture the still images. Manual or auto doesn’t work. For others, to get this to work I had to use the “power” button to disable and re-enable the cameras.

Adam,

There was a change in the way that SC dealt with tempImage. I’ve now corrected it and updated the GitHub so it should be working OK. Please can you update your code and check to see if it’s working?

1 Like

Whatever code you wrote last night, fixed the issue. Thanks! I was aware of the whole ST tempImage change but for some reason I thought this app had already addresed that change.

Again, nice work.

Hi, sadly I’m still having difficulties with this app and I would so love to get it to work.

When a camera changes to detect motion it stays in that state permanently. I chanced the time out to 2 sec but it seems to have no effect.

Secondly if I try to view the live stream the app crashes. This is happening on the local Lan and on cellular service.

Please help, I so want this to work.

Thanks,

Jon

I had been using this for close to a year and now have no snapshot ability. No so interested in watching live stream. Still using Swanny’s code. log shows
9f3d00ba-1b1a-432d-988f-6c91cbfc36d4 11:09:27 AM: trace Did not use
9f3d00ba-1b1a-432d-988f-6c91cbfc36d4 11:09:26 AM: trace resending to get real error message
9f3d00ba-1b1a-432d-988f-6c91cbfc36d4 11:09:26 AM: trace take image command returned an error
9f3d00ba-1b1a-432d-988f-6c91cbfc36d4 11:09:26 AM: debug getChildDevices(false), children=2

If I try to use Needlerp code I don’t have a domain. It errors on the install of the Smartapp. It finds my cameras but when i hit next, I get
c0724807-7cd1-4277-824f-901d78407ca3 11:15:57 AM: error java.lang.RuntimeException: Unexpected status code 400 from global /clients/null with status text Bad Request @ line 54
c0724807-7cd1-4277-824f-901d78407ca3 11:15:45 AM: debug getChildDevices(false), children=0
c0724807-7cd1-4277-824f-901d78407ca3 11:15:45 AM: trace commandType:
c0724807-7cd1-4277-824f-901d78407ca3 11:15:45 AM: debug {“error”:{“code”:400,“errors”:{“param1”:"",“param2”:""}},“success”:false}

Any help would be appreciated.

Thanks for the support.

Hi Guys, I’m fairly new to ST but I’m a developer and I’ve created a couple of physical devices and device handlers it all seems to be fairly straight forward. Anyway, installed the Synology app and device handlers, everything seems to have been detected and I have 2 cameras listed in ST and the SMS test was successful from SS.

However when I click the camera device I don’t get any kind of preview, snapshot does nothing, and if I click refresh it just stays as ‘waiting’. I’ve not had any motion event trigger yet, but I’m not at home so I can’t trigger one anyway!

I’ve had a look back through this thread but it’s massive and I didn’t see anyone with my issue. Any suggestions? I’m running SS8 and the latest code from GitHub.

It’s kind of a pain to get snapshots working again. You have to change the storage command on the camera and change a bunch of the parsing logic in the smart app.

You have to change the parse method to pluck out the tempImageKey. Then you have to stop looking for the headers to determine if the snapshot call was successful. And you have to change any logic that is looking for bucket and key to just use the tempImageKey.

I haven’t had a change to look into this after ST change the image storage on 1/19. I got a little bit of time today and fixed it. . . .

Fair enough, the snapshots arn’t really a big problem, I thought it was just part of the same issue. I havent had any motion detection triggered either on ST but there has been motion events in SS. That’s all I really need to get working.

The SMS test said it was sent OK in SS though. I’ll have a look through the code when I get chance.

So looking through the logs, the motion is working as there’s some trace logs that say “motion callback” being generated by the connect smart app.

I’ve searched the code in the handler and the smart app but I can’t find that string anywhere so I’m at a bit of a loss as to where to start.

@Needlerp Not sure if Smarthings changed stuff up again, but snapshots stopped working for me again. I can see recorded video and motion detection still works.

add without any changes on my side, its working again. Perhaps related to some of the AWS outages today???

What is the motion status of the camera in ST? If you use the gitHub code, the motion will eventually get stuck on and the snapshots will not work. I posted a patch for the motion. I’ll post something for snapshots later.

I’m not working on the local video forked version. I don’t want streaming. . . .