SmartThings Community

[RELEASE] D-Link Camera Manager (Connect) - Add your D-Link IP Cameras to SmartThings! Video Streaming, Image Capture, Motion Detection and more

smartapp_cameras
dlink
dth_cameras
(Ben Lebson) #1

D-Link Camera Manager (Connect).


This SmartApp will allow you to install and manage multiple D-Link Camera Devices. Finally, a one-stop shop for all of your D-Link IP camera needs.

I have created these devices in order to add additional functionality to existing supported D-Link cameras and to add compatibility for many that are not natively supported. All cameras feature In-App Video streaming, snapshots and the ability to toggle motion detection. Some cameras support much much more, see the feature and compatibility chart below!

If you don’t see a camera on the list that you would like me to add; feel free to leave a comment below and I will work to incorporate it!


Features:

  • V - In-App Video streaming w/o sound
  • VS - In-App Video streaming w/ sound
  • I - Still Image Capture and Display
  • PT - Full Pan/Tilt support
  • H - Move to ‘Home’ location
  • P - Move to Preset location (by preset number)
  • M - Turn on/off motion detection (Motion Only)
  • PIR - Turn on/off PIR sensor (PIR Only)
  • MS - Adjust motion sensitivity (Motion & PIR combined)
  • NV - Toggle Night Vision On/Off/Auto
  • VR - Turn on/off Video Recording to SD card

Currently Supported Cameras:

Fixed Cameras:

  • DCS-930L - V, I, M, MS
  • DCS-931L(*) - V, I, M, MS
  • DCS-932L - V, I, M, MS, NV
  • DCS-933L- V, I, M, MS, NV
  • DCS-934L- V, I, M, MS, NV
  • DCS-935L - VS, I, M, MS, NV
  • DCS-942L - VS, I, M, PIR, MS, NV, VR
  • DCS-960L - VS, I, M, MS, NV
  • DCS-2132L - VS, I, M, PIR, MS, NV, VR
  • DCS-2210L - VS, I, M, PIR, MS, NV, VR
  • DCS-2310L(*) - VS, I, M, PIR, MS, NV, VR
  • DCS-2330L - VS, I, M, PIR, MS, NV, VR
  • DCS-2630L - VS, I, M, PIR, MS, NV, VR

PTZ Cameras:

  • DCS-5009L - V, I, PT, H, P, M, MS, NV
  • DCS-5010L - V, I, PT, H, P, M, MS, NV
  • DCS-5020L - V, I, PT, H, P, M, MS, NV
  • DCS-5029L - VS, I, PT, H, P, M, PIR, MS, NV, VR
  • DCS-5030L - V, I, PT, H, P, M, MS, NV
  • DCS-5211L(*) - VS, I, PT, H, P, M, PIR, MS, NV, VR
  • DCS-5222L - VS, I, PT, H, P, M, PIR, MS, NV, VR

(*) - Camera has not been formally tested, please report any issues.


External Commands:

Please Note: Not all cameras support all commands.

  • on() - Video Motion Detection On(*)
  • off() - Video Motion Detection Off(*)
  • pirOn() - PIR Motion Detection On
  • pirOff() - PIR Motion Detection Off
  • nvOn() - Night Vision On
  • nvOff() - Night Vision Off
  • nvAuto() - Night Vision Auto
  • vrOn() - Local Video Recording On
  • vrOff() - Local Video Recording Off
  • left() - Move Camera Left
  • right() - Move Camera Right
  • up() - Move Camera Up
  • down() - Move Camera Down
  • home() - Move to ‘Home’ position
  • presetOne() - Move to Preset position 1 defined in DTH settings
  • presetTwo() - Move to Preset position 2 defined in DTH settings
  • presetThree() - Move to Preset position 3 defined in DTH settings
  • presetCommand( preset-number ) - Move to Preset position (position number passed as a string)

(*) - These commands are not actually ‘custom commands’ but rather the default switch on/off. This allows you to use the camera as a normal switch in any SmartApp or Routine in order to turn on/off motion detection.


Prerequisites:

  • Fully configured compatible D-Link IP camera on the same local network as your ST hub
  • Motion detection configured within local advanced camera settings (for motion detection / PIR sensor) (where applicable)
  • Events created in local advanced camera settings to respond to the motion trigger (email/FTP/SD Image/video) (where applicable)
  • SD Card installed (for local video recording) (where applicable)
  • Video settings configured within local advanced camera settings (where applicable)
  • Preset and Home positions configured within the local advanced camera settings (where applicable)

Installation Instructions:

  1. Add the Github Repo to your IDE with the following settings:
  • Owner: blebson
  • Name: DLink-Camera-Manager
  • Branch: master
  1. Under ‘My Device Handlers’ in the SmartThings IDE click
  2. Select DLink-Camera-Manager (master) from the drop-down menu.
  3. Select ALL of the camera devices from the ‘New’ tab.
  4. Click the ‘Publish’ check-box in the bottom right.
  5. Click on ‘Execute Update’
  6. Go to the “My SmartApps” tab in the IDE and click
  7. Select DLink-Camera-Manager (master) from the drop-down menu.
  8. Select all 3 SmartApps in the ‘New’ tab.
  9. Click on ‘Execute Update’
  10. In your ‘My SmartApps’ section of IDE, select open:
  11. When the SmartApp opens, click Publish -> For Me (Do not publish the other two ‘Child’ SmartApps)
  12. Now, go into the SmartThings App on your phone/tablet
  13. Go to the ‘Marketplace’ tab in the bottom right.
  14. Go to the ‘SmartApps’ tab and select ‘My Apps’
  15. Select “D-Link Camera Manager (Connect)”
  16. Select ‘Done’ in the top right to install the app (configuration comes later)
  17. Go back to the ‘Marketplace’ and click on the menu in the top right
  18. Click ‘SmartApps’ and click on the “D-Link Camera Manager (Connect)” app.
  19. From here follow the instructions and start adding your D-Link Cameras!

##Camera Installation Tips/Tricks:

  • The Camera IP and Camera Port are your local HTTP IP and Port for the camera
  • The Video IP and Video Port can be either the local or external IP and Port for the camera
  • For Cameras that only support video (no audio) use the HTTP IP/Port
    • Default HTTP port is 80
  • For Cameras that support both video and audio use the RTSP IP/Port
    • Default RTSP port is 554
  • If you use an internal VideoIP/Port you will only be able to view video either while on the local network or by using a VPN
  • If you use an external VideoIP/Port you will need to set up Port Forwarding on your router
    • WARNING: By using Port Forwarding you are opening your camera to the internet, this can open it up to unauthorized access by people outside of your network.
  • The Camera User and Camera Password are the Username/Password used to log into the camera’s advanced settings through a web browser. Must be your Admin Username/Password
  • The Camera Presets are the preset number of views that you have already set up in the D-Link camera advanced settings.

##Support:

If you are having issues setting up your supported camera please reply to the post with the following information:

  1. SmartThings Mobile Version Number
  2. Phone Make and Model
  3. Mobile OS Version (Android, iOS, Windows)
  4. Camera Model
  5. A screenshot or list of your settings (Please hide any External IPs and Usernames/Passwords)
  6. A list of functions that work
  7. A list of functions that do not work

The more descriptive you are, the easier it will be for me to help!

If your D-Link camera is not supported: Leave a reply down below and I will look into adding it.

WARNING: Video Streaming and Snapshot functionality are not supported by SmartThings, DO NOT contact SmartThings support with issues regarding these two functions, they will not be able to help. If you are having issues please make a post using the format above


Compatible Custom SmartApps:


##Sample D-Link Camera Views:

DCS-5222L:

DCS-5020L:

DCS-942L:


##Special Thanks and other notes:

I wanted to thank the following people for their inspiration and help with debugging and testing:


I developed this in my spare time and am releasing it completely free of charge. Any donations are greatly appreciated. Please note, donations will not get you any special features/treatment but will grant you my eternal gratitude :slight_smile:


63 Likes
[RELEASE] D-Link Camera Virtual Switch Controller
Best Video Camera with Live Feed?
D link dcs-942l for dummie?
Dlink DCS-2630L Anyone have luck geting this to work with smartthings?
Is it possible to enable/disable motion detection on Dlink DCS-2132 camera thru smartthings interface
[OBSOLETE] D-Link DCS-932L Day/Night IP Camera DeviceType
D-Link integration with Smartthings
D-Link 5222LB Camera not connecting to smartthings
[OBSOLETE] D-Link DCS-930L IP Camera DeviceType
[OBSOLETE] D-Link DCS-5222L HD PTZ IP Camera DeviceType - Full feature support (Now With Video Streaming!)
[OBSOLETE] D-Link DCS-932L Day/Night IP Camera DeviceType
[OBSOLETE] D-Link DCS-5020L Tilt/Pan Day/Night IP Camera DeviceType (Now With Video Streaming!)
[RELEASE] Smart Security Camera SmartApp - Now with Local Video Recording Support!
Camera that can work with ST and IFTTT
Outdoor camera Dlink DCS-2332L?
Why security cameras matter
Help for a StaplesConnect Transplant?
[OBSOLETE] D-Link DCS-930L IP Camera DeviceType
SmartTiles: Video Camera Compatibility
Any security webcam that are compatible with ST?
Making D-Link 2310L record video whenever motion is detected
Raspberry Pi with PHP (or Arduino/ESP8266/NodeMCU) to GPIO to Relay to Gate/Garage Trigger
[OBSOLETE] D-Link DCS-942L Day/Night IP Camera DeviceType - Full Feature Support (Now With Video Streaming!)
[OBSOLETE] D-Link DCS-942L Day/Night IP Camera DeviceType - Full Feature Support (Now With Video Streaming!)
[OBSOLETE] D-Link DCS-5020L Tilt/Pan Day/Night IP Camera DeviceType (Now With Video Streaming!)
[OBSOLETE] D-Link DCS-5222L HD PTZ IP Camera DeviceType - Full feature support (Now With Video Streaming!)
[OBSOLETE] D-Link DCS-930L IP Camera DeviceType
Dlink DCS-2630L Anyone have luck geting this to work with smartthings?
Outside Cameras for a Novice
[OBSOLETE] D-Link DCS-942L Day/Night IP Camera DeviceType - Full Feature Support (Now With Video Streaming!)
Is imageCapture capability not supported anymore?
Ubiquity UniFi Video Cameras
CoRE and Piston Rules Engine, first design steps
Amazon Echo - Always Listening - My Take on that
Photo Burst supported Cameras
Suggest a Device
(Stuart Buchanan) #2

excellent work. I don’t have any Dlink cameras but I plan to review your code and learn from a master :slight_smile:

1 Like
#3

Newbie question. Does this require the V2 hub to work?

(Patrick Stuart [@pstuart]) #4

Nope. Streaming video doesn’t require a hub.

(Nav) #5

This is superb! Are you able to add: DCS-2210?

(Ben Lebson) #7

I can definitely look into it for you. Could you try setting it up using the DCS-2132L? Let me know if all of the functions work. That should give me a pretty good starting point.

(Kyle ) #8

@uncleskippy :slight_smile: :wink:

ps: with all this done now and discovered thanks to you geniuses, is it possible to have for instance a rule created " WHEN _____ HAPPENS " move to predefined location + take a snapshot + send to me as email / text / push notification from app (ideally) etc etc

would be great for linking to a doorbell device :slight_smile: or outside motion whilst im in bed . . .

(Ben Lebson) #9

This already exists, check out the Compatible Custom SmartApps section. Smart security camera should fit the bill…

1 Like
(Patrick Mjoen) #10

I have a 2330L and am unable to select any buttons, they just change to toggle. Get the following error in live logging:

To turn on motion
7dd13442-d410-4ebe-933e-cb7fd654da39 12:50:54 PM CDT: debug API Error: java.net.SocketException: Connection reset
2d0f44f6-0bb9-4656-be36-2562d400f010 12:50:44 PM CDT: debug GET /config/motion.cgi?enable=yes HTTP/1.1

(Ben Lebson) #11

Hmm, this is one of the untested DTH so it might not be sending the response that was expected. Can you PM/Post the live logs from IDE? Be sure to remove any external IP, or Authorization keys…

(Jimmy) #12

Very nice looking app. Kind of makes me wish I had a D-link camera to use with it. :slight_smile:

One really general question I have is whether SmartThings can determine, and make available to a SmartApp, whether you are on/off your LAN, or maybe the IP address of the phone. This way you can determine whether your phone is on your LAN and automatically call a LAN url or remote url for streaming. Right now you would have to create two devices to view your video stream from anywhere: one for LAN and one for remote.

(Ben Lebson) #13

You can use the remote IP even if you’re on the same network. This SmartApp/DTH uses two IP because I wanted to give the option to use an external IP for video. Everything other than the video stream has to be the Local IP due to using hubAction.

Foscam IP camera LAN and remote DDNS discussion
(Ben Lebson) #14

The exception is coming from a different device/smartApp, can you go into the log just for the camera as see what’s in there? I’m looking for a response that starts with “Parsing:”

(iamjezz) #15

This looks like a great app, i’m just testing and assuming i’ve done all the setup correct its not working for me. DCS-932L

ip of the camera is 192.168.1.139

username is the one i type in when i connect locally to the camera (not the one via mydlink website)

tried the default ports but i have noticed this below in the maintenance part of the camera ,however 8089 didn’t work either.

Snapshot URL Authentication Enable Disable (http://192.168.1.139:8089/image/jpeg.cgi)

(Ben Lebson) #16

what happens when you put that URL into a web browser while on the same network?

(iamjezz) #17

its working its just when i click play (live video) it doesn’t however if i take a picture it does work. Assume my camera doesn’t support live video? I cant seem to find a port number for that within the config

(Ben Lebson) #18

For the DCS-932L the local video port is going to be 80 (the same as the Camera Port), if you are using an external IP/Port for video you’ll need to forward port 80 from the camera.

(iamjezz) #19


(Ben Lebson) #20

If 8089 is your port that allows access to all of the other features (camera, motion detection, etc) then use that one for video as well. It should work just fine.

(Michael Hess) #21

It seems like some of the Foscam models are similar to D-Links. I have a few Foscam fi8910’s, is there any chance those would work with any of these D-Link models? I’ll probably try them all tonight, but if anyone has tried or knows off the top of their heads, I’d appreciate it!