[OBSOLETE] D-Link DCS-932L Day/Night IP Camera DeviceType

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

D-Link DCS-932L 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.

1 Like

Hi,

I’m trying to test this.

But, when I making the App i get this message. Does this make any problems?

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

I have published the app and downloaded it on the ST app, and I can see the app under Smart Apps. How do i actually add the camera as a device?

Regards Jon

Hey Jon, this is actually a devicetype, not a smartapp. Once you publish the devicetype you’ll need to create a new device within IDE and assign this devicetype to it.

Thanks! I’m a newbiee.

But I can’t publish it correctly because it dosen’t save my changes and reports this under. Is the code correct, any tips?

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

I will try again. Im doing it all wrong:)

Hi again,

I now got it right.

This functions work:

  • Take button
  • Motion detection sensitivy
  • Refresh gets update status on motion sensivity and motion on\off. When i enable\disable the motion on another interface,

This doesn’t work:

  • Toogle motion on\off

Regards Jon

Hey Jon, can you click on the ‘Live Logging’ tab in IDE and tell me what is returned for each of the commands (especially the motion toggle)? Are you verifying the sensitivity works by looking at the local settings of the camera and seeing if it matches the app?

Hey Ben,

Yes, the sensitivity is verified by using local setting on the camera from a browser.

Here is the info from the live logging:

05712201-a016-4d13-8659-229f38ac5eef 07.07.02: error groovy.lang.MissingMethodException: No signature of method: script1444420083030123325609.motionCmd() is applicable for argument types: (java.lang.Integer) values: [0]
Possible solutions: motionCmd(int, java.lang.String) @ line 335
05712201-a016-4d13-8659-229f38ac5eef 07.07.02: debug Disabling motion detection

Jon

Ok, I was still expecting a string when calling the motionCmd even though I was no longer passing one. I updated the code, click the link in the first post to get the updated devicetype and let me know if it works.

Jumped in to try and help debug this as I have one of the cams… Strangest thing is happening when you click toggle motion. The URL that is being logged is:

GET /motion.cgi?null=1&ConfigReboot=No HTTP/1.1 

Not sure how “MotionDetectionEnable” is becoming null!?

Ha nm… Just saw line 180 has a rogue “$”

 def path = "/motion.cgi?$MotionDetectionEnable=${motion}&ConfigReboot=No"

should be

 def path = "/motion.cgi?MotionDetectionEnable=${motion}&ConfigReboot=No"

I can confirm that this is indeed working for DCS-932L

@blebson thanks and nice work on this

Doh! Must have fat fingered it when fixing the previous issue, I’ll fix it in my github version asap. Thanks for your help with testing guys!

No problem. FYI and for the benefit of others. This fix also makes motion enable/disable work on the DCS-930L.

Thanks again

Does this whole code work for the DCS-930L? If so I might split it off and make a new post.

Yes, Take pics, refresh and enable disable motion works. I think 932/930 are essentially the same firmware sans day/night capability.

Awesome, does the motion sensitivity work too?

P.S. github code is updated.

whoops sorry missed one :smile: Just tested and its working as well.

Does this work for internal private IP addresses or do you have to map the camera to an external ip?

This works only for the local IP address, I don’t believe hubAction works for external IP addresses anymore.

Thanks to @blebson and the other contributors, I was able to get this working. I have the app already setup, and can see the pictures taken (manually triggered).

However, I’m still confused about what the “Motion” button does. I see 3 modes.

  • Motion Off (Self-explanatory)
  • Motion On (Am I able to use this as a motion detector and automatically trigger photo bursts? If so, it doesn’t seem to work for me. What am I doing wrong?)
  • Toggle (What does this do?)

Thanks for the great contributions here!