NEW groovy.lang.MissingMethodException: No signature of method ERROR

Hello :slight_smile:

I’m working on a ServiceManager, who should create a new Child-Device. Now I get an error. I searched on smartthings, found simillar errors but no Solution for my Problem.

The Error:

groovy.lang.MissingMethodException: No signature of method: script_dth_ab2e27f2_b1f4_4c25_bb7d_0f557069e1b4_ver_8_9.parse() is applicable for argument types: (java.lang.String) values: [updated]
Possible solutions: parse(java.util.Map), pages(), page(), pages(groovy.lang.Closure), page(java.util.Map), page(java.lang.String, java.lang.String)

I don’t really know what that error means and how I can fix it for my problem. Hope someone can help.

The Problem is in the spawnChildDevice Method.

def installed() {
	log.debug "Installed with settings: ${settings}"
    spawnChildDevice(app.label)
	initialize()
}

def spawnChildDevice(deviceLabel) {
    app.updateLabel(deviceLabel)
    if (!childCreated()) {
        def child = addChildDevice("Dany Van der Meij", "SmartThermostatDeviceHandler", getDeviceID(), null, [name: getDeviceID(), label: "${deviceLabel}", completedSetup: true])
        log.debug "Child Device: ${child}"
    }
}

private childCreated() {
    if (getChildDevice(getDeviceID())) {
    	log.debug "Childcreated = false"
        return true
        
    } else {
    	log.debug "Childcreated = true"
        return false
    }
}

private getDeviceID() {
    return "VSM_${app.id}"
}

Looks like you are trying to parse an object as a string. Have you looked at the example here?

http://docs.smartthings.com/en/latest/ref-docs/device-handler-ref.html?highlight=addChildDevice

Hello Jody, Yes I read the whole documentation. But what do you mean? The Parse method you need in the Device Type Handler as far as I know. But what I’m trying to do, is to create from the Service Manager (SmartApp) a new Child Device. If you want to know more about what I try to do, read trough my other Topic: [RELEASE] Siemens SmartThermostat Cloudbased Integration

My experience on this kind of errors is:
-incorrect parameters passed versus method arguments (like you pass int, string but the method is something like string only
-method is not in the scope of the object you use (calling a smartapp specific method while you are in the execution of a DTH)

Not sure it helps

1 Like