Unschedule Function?


Okay, I am totally lost here. I have multiple devices that run off the same custom driver and it has not given me any problem until this one device. I am using the unschedule() function to unschedule previously scheduled jobs and it works fine for all but on device. For some reason, with this device I get the following error:
groovy.lang.MissingMethodException: No signature of method: java.lang.Boolean.call() is applicable for argument types: () values: []
Possible solutions: wait(), any(), wait(long), any(groovy.lang.Closure), and(java.lang.Boolean), each(groovy.lang.Closure) on line 66 (off)

What can this possibly be doing?!?!? It works fine for 10 different devices with almost the same exact name. There is only one device that this gives this error for.


post up line 66, or better yet the entire method that encompasses line 66...

def off() {
	if (logEnable){ log.debug "Turned Off"}
	sendEvent(name: "switch", value: "off", isStateChange: true)
	if (maxOff) {
		if (logEnable) log.debug("Turning On in "+maxOffTime+" hours")
		def delay=(maxOffTime.toInteger())*3600
		runIn (delay, onP)

line 66 is unschedule()


I create another device and it is also working fine for that one. So, I am just moving everything over to that device (these are all virtual) so I'm just going to work around it. But I would sure love to understand what the heck is going on.


Any idea @mike.maxwell?


I don't know what the point of unschedule here.
Are you trying to remove legacy jobs from ported drivers?, or trying to use this to prevent onP from running...


if you comment out line 66, does it run fine? It seems like an odd error to occur at that line.


To Unschedule other pending jobs already scheduled. Is that not the correct way to do that?

Yes. However, it also runs fine with line 66 on every device except for one. I guess it really doesn't matter at this point, I've deleted the affect device and just created a new virtual device to replace the one affected.