SmartThings Community

[OBSOLETE] D-Link DCS-930L IP Camera DeviceType

devicetype
communitydevices
cameras

(Ben Lebson) #1

##This DeviceType is Obsolete, Please use the following SmartApp instead:

D-Link DCS-930L Device Type.

Features:

  • Still Image Capture and Display
  • Turn on/off motion detection
  • Adjust motion sensitivity

Please note: Motion detection needs to be setup directly using the camera’s local web interface before it will work with this devicetype.

Thanks to @afewremarks and @jonhkennedy for helping me verify the code.


Anyone got DLink IP camera 930L or 932L working?
DLink WiFi cameras, only limited ones supported?
Suggest a Device
[OBSOLETE] D-Link DCS-942L Day/Night IP Camera DeviceType - Full Feature Support (Now With Video Streaming!)
Connect a Webcam to SmartThings?
(tom) #2

Newbie Question

How do I build and intergrate this code into my smarthings app ?

thanks

tom


(Ben Lebson) #3

Try out this guide:


(Mark Shelhart) #4

blebson,
THANK you for this code. This became my “hello world” project for my ST.

Question. Does your code capture the motion as a status? I can sense if the motion is turned on or off, but I cannot seem to capture a motion event.

For others:
I ‘thought’ I had it working correctly. I could add the device type, and I could add a device, but the snapshot was not working to taka picture. I had set up motion zones, but I did not configure an FTP server or an SMTP server. Once I did this (even with dummy settings), the snapshot worked.


(Ben Lebson) #5

Unfortunately due to how SmartThings interacts with the camera there is no way for the camera to ‘send’ a status update without SmartThings first requesting it. The motion on/off only turns on the ability for the camera to automatically send images/video to an email or FTP which is set up within the D-link menus for the camera.


(Different Computers. So happy with Indigo.) #6

These are on sale via Amazon. Super Cheap! D-Link DCS-930L $30.19


(Benji) #7

Fairly low res but a low price so not bad, do these support PoE? They have an Ethernet port but no mention of PoE so I’m thinking no, I could use one of the TP-Link PoE splitters here but that adds $15 to the cost.


(Benji) #8

Also, fractionally cheaper and still free shipping:


(Kye Swanson) #9

I’m brand new to SmartThings and working with code. When I cut and past the text you provided into the New SmartApp - From Code box and hit the Create button, I get the following error:

No signature of method: script14528091358441860061825.metadata() is applicable for argument types: (script14528091358441860061825$_run_closure1) values: [script14528091358441860061825$_run_closure1@55e425bf] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

Any help explaining what I’m doing wrong would be greatly appreciated.


(Ben Lebson) #10

You’ll need to add this code as a Device Handler instead of a SmartApp, very common mistake :slight_smile:


(Kye Swanson) #11

Thank you. That was it. Hopefully, I can get this thing figured out soon. :grinning:


(Ben Lebson) #12

Now that it’s added as a devicetype you’ll need to create a new device by clicking the ‘My Devices’ tab in IDE and using the “+New Device” button in the upper right corner. From there you’ll fill out all the information (you can ignore ZigBee ID) and choose the devicetype you just created from the “Type” dropdown menu. Once this is done, you can go into your app and assign it to a room and add all the required information (IP, Port, Username, Password).


(Ron) #13

Hi,

This is my first attempt at adding a device…new to smart things

I have several 930L’s, I installed the code but only the first cam works (it does work properly), the other three cams do not take pictures. Is it necessary to have one instance of the code per cam (changing the name in the definition).

The second and subsequent devices all show up with No States Found in the current states

ron


(Ben Lebson) #14

You should be able to add as many instances of the device as you want as long as they have different local IP addresses. Each camera should have it’s own instance of the device created through IDE.

In IDE, go to the live logging section and try to take a picture with each of the cameras. Let me know if it shows an error.


(John S) #15

Working great on a couple of 930Ls (now that they’re cheaper than a motion sensor I got one for each floor) :slight_smile: Thanks!


(Ron) #16

Hi Ben,

I see. I initially added 2 cams, one worked the other did not. I added a third cam, worked like a charm…The second cam was actually a DCS-931L. Will that version of the cam work with this device type (might be rhetorical).


(Ben Lebson) #17

It looks like the DCS-931L might use different REST commands. If you can figure out what URL you can use to get a jpeg image then I can point you in the right direction for a devicetype that will work.


(John S) #18

So this device type is working good except the snapshots often have corruption in the “bottom half” of them - esp if I set image size to 640x480 in the dlink device settings for the camera. Any ideas?


(Ben Lebson) #19

I believe this is an issue with either the camera itself or the way that SmartThings processes the images. It happens to me off and on and there really isn’t any rhyme or reason to it.


(Ben Lebson) #20

##DCS-930L DeviceType is Obsolete, Please use the following SmartApp instead: