D-Link IP Camera device type (DCS-930L tested)

  1. Images is being stored in S3 in Amazon
  2. I am not aware of anyway to delete it but the images don’t stay for ever. ST has some purge rule. (bad news if you are worried about being featured in the next celebrity nude photo breach :wink:)
  3. The password you are using is being sent/received over HTTPS so its encrypted in transit…ST may encrypt at rest.
  4. I wouldn’t worry too much about the password (min is really easy) if you aren’t doing any port forwarding. The hub is making the request over the lan and then sending the image back up into the cloud. So camera access is not exposed.

Yeah I be worried about that breach :stuck_out_tongue: lol, but it would be nice if we had the ability to delete photos/videos. I don’t see how that would be a bad thing, it would actually be better on them so users can clean up their own mess :stuck_out_tongue:

Still not sure how i feel about storage in the cloud, especially for cameras facing inward (in the house), it would be Awesome to have the ability to save to a External HDD, the V2 Hub has usb ports… Local storage and privacy. Awesome? :smiley: Maybe we’ll get such options soon…

I noticed atleast with this the password was being saved as a string, but looking at the built in code for the samsung, they have type PASSWORD… it would make sense that the password be type password, which looks to hide it.

I would rather just have the ability to enable and disable built in camera motion detection and leave all the storage to be in my email like the dlink cameras already do.

Enable motion detect on “away” and disable when you are in “home” mode.

That’s exactly how I have it set up, then I can keep as many sets of photos as I want and while they’re stored online I have at least some control over them.

I am getting the same error. I am not able to add the code to a new Device Type. Anyone able to help out with the “‘physicalgraph.device.DeviceType’ on field ‘author’: rejected value [null]” errors?

Full message:
Grails.validation.ValidationException: Validation Error(s) occurred during save(): - Field error in object ‘physicalgraph.device.DeviceType’ on field ‘author’: rejected value [null]; codes [physicalgraph.device.DeviceType.author.nullable.error.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.error.author,physicalgraph.device.DeviceType.author.nullable.error.java.lang.String,physicalgraph.device.DeviceType.author.nullable.error,deviceType.author.nullable.error.physicalgraph.device.DeviceType.author,deviceType.author.nullable.error.author,deviceType.author.nullable.error.java.lang.String,deviceType.author.nullable.error,physicalgraph.device.DeviceType.author.nullable.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.author,physicalgraph.device.DeviceType.author.nullable.java.lang.String,physicalgraph.device.DeviceType.author.nullable,deviceType.author.nullable.physicalgraph.device.DeviceType.author,deviceType.author.nullable.author,deviceType.author.nullable.java.lang.String,deviceType.author.nullable,nullable.physicalgraph.device.DeviceType.author,nullable.author,nullable.java.lang.String,nullable]; arguments [author,class physicalgraph.device.DeviceType]; default message [{0} cannot be null]

Creed, did you get an answer to this? I’m a newb at this.

I’m getting an error when trying to paste the egid/SmartThings code for a D-Link camera too. Anyone any ideas on what is wrong here:

Grails.validation.ValidationException: Validation Error(s) occurred
during save():

  • Field error in object ‘physicalgraph.device.DeviceType’ on field
    ’author’: rejected value [null]; codes
    [physicalgraph.device.DeviceType.author.nullable.error.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.error.author,physicalgraph.device.DeviceType.author.nullable.error.java.lang.String,physicalgraph.device.DeviceType.author.nullable.error,deviceType.author.nullable.error.physicalgraph.device.DeviceType.author,deviceType.author.nullable.error.author,deviceType.author.nullable.error.java.lang.String,deviceType.author.nullable.error,physicalgraph.device.DeviceType.author.nullable.physicalgraph.device.DeviceType.author,physicalgraph.device.DeviceType.author.nullable.author,physicalgraph.device.DeviceType.author.nullable.java.lang.String,physicalgraph.device.DeviceType.author.nullable,deviceType.author.nullable.physicalgraph.device.DeviceType.author,deviceType.author.nullable.author,deviceType.author.nullable.java.lang.String,deviceType.author.nullable,nullable.physicalgraph.device.DeviceType.author,nullable.author,nullable.java.lang.String,nullable];
    arguments [author,class physicalgraph.device.DeviceType]; default
    message [{0} cannot be null]

Looks like you’re trying to install it as a SmartApp, try installing it as a DeviceType Handler.

Turns out the metadata at the start was wrong. Needs to look more like:

metadata {
definition (name: “GenericIPCamera”, namespace: “”, author: “Roy Donaldson”) {
capability “Image Capture”
}

Just bad error reporting.

Ahh, it’s looking for the author field…

BTW, what D-Link camera are you using?

I’m not, I’m using some Cisco IP Cameras and just using the code as a sample to pull a jpeg image off them. The cloud server seems terrible, as it is continually failing saying it is timing out at 40seconds. When it did not time out, it then complained on the image size being too large, but the camera is only doing 720x390 odd, not even HD or Full HD. Seems pretty crap to me.

Just using this as code:

/** Generic IP Camera
*

  • rdonalds
  • Generic IP Camera pull app

*/

metadata {
definition (name: “GenericIPCamera”, namespace: “”, author: “Roy Donaldson”) {
capability “Image Capture”
}

preferences
{
input(“username”, “text”, title: “Camera username”, description: “Username for web login”, required: true)
input(“password”, “password”, title: “Camera password”, description: “Password for web login”, required: true)
input(“url”, “text”, title: “IP or URL of camera”, description: “Do not include http://”, required: true)
input(“port”, “text”, title: “Port”, description: “Port”, required: true)
}

tiles {
    carouselTile("cameraDetails", "device.image", width: 3, height: 2) { }

    standardTile("camera", "device.image", width: 1, height: 1, canChangeIcon: false, inactiveLabel: true, canChangeBackground: true) {
      state "default", label: '', action: "Image Capture.take", icon: "st.camera.camera", backgroundColor: "#FFFFFF"
    }

    standardTile("take", "device.image", width: 1, height: 1, canChangeIcon: false, inactiveLabel: true, canChangeBackground: false, decoration: "flat") {
      state "take", label: 'Take Photo', action: "Image Capture.take", icon: "st.camera.take-photo", nextState:"taking"
    }

    main "camera"
    details(["cameraDetails","take"])
}

}

def parseCameraResponse(def response) {
def imageBytes = response.data

    if(imageBytes) {
        storeImage(getPictureName(), imageBytes)
        log.info("Stored image")
    }
} 

private getPictureName() {
“image.jpg”
}

private take() {
log.info("${device.label} taking photo")
log.info(“http://${username}:${password}@${url}:${port}/img/mjpeg.cgi”)

httpGet("http://${username}:${password}@${url}:${port}/img/mjpeg.cgi"){
    response -> log.info("${device.label} image captured")
    parseCameraResponse(response)
}

}