st-swanny / smartthings

My smartthings projects
48 stars 128 forks source link

physicalgraph.app.exception.UnknownDeviceTypeException: Device type 'Diskstation Camera' in namespace 'New Camera' not found. @line 734 (doCall) #11

Open resgroupmsr opened 4 years ago

resgroupmsr commented 4 years ago

Get to point where ready to save and this error appears. Any ideas? physicalgraph.app.exception.UnknownDeviceTypeException: Device type 'Diskstation Camera' in namespace 'New Camera' not found. @line 734 (doCall)

resgroupmsr commented 4 years ago

The line is part of this code below, originally swanny I've tried to change to NewCamera - neither works:

            d = addChildDevice("**NewCamera**", "Diskstation Camera", newCameraDNI, state.hub, [label:"Diskstation ${newCamera?.newName}"]) //, completedSetup: true

def addCameras() { selectedCameras.each { cameraIndex -> def newCamera = state.SSCameraList.find { it.id.toString() == cameraIndex.toString() } log.trace "newCamera = " + newCamera if (newCamera != null) { def newCameraDNI = createCameraDNI(newCamera) log.trace "newCameraDNI = " + newCameraDNI def d = getChildDevice(newCameraDNI) if(!d) { d = addChildDevice("NewCamera", "Diskstation Camera", newCameraDNI, state.hub, [label:"Diskstation ${newCamera?.newName}"]) //, completedSetup: true log.trace "created ${d.displayName} with id $newCameraDNI"

            // set up device capabilities here ??? TODO ???
            //d.setModel(newPlayer?.value.model)
        } else {
            log.trace "found ${d.displayName} with id $newCameraDNI already exists"
        }

        // set up even if already installed in case setup has changed
        d.initChild(state.cameraCapabilities[makeCameraModelKey(newCamera)])
    }
}
resgroupmsr commented 4 years ago

3a481dd9-bc18-443c-975f-e75caff16598 6:19:00 PM: error physicalgraph.app.exception.UnknownDeviceTypeException: Device type 'Diskstation Camera' in namespace 'swanny' not found. @line 734 (doCall)

Same error again. Did a full refresh using your latest code, finds my 8 cameras, I complete the set up and it fails. Any advice?