First time poster! I've set myself the task of building upon the excellent work of Marcus for the RFLink driver. I am building the send part, using lots of debug statements, because athough I am a programmer, I find it hard to get information on Groovy and/or Hubitat. Nevertheless, I am chugging on rather nicely. That is until I stumbled onto this errormessage that I don't seem to be able to solve but above all, don't understand...
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: user_driver_tasmota_Tasmota___RF_IR_Switch_Toggle_Push__Child__461.getCommandString() is applicable for argument types: (java.lang.String, java.lang.String) values: [SerialSend1, 10;NewKaku;01e99452;1;ON;] (on)
My code is as follows (child):
private def on() {
def theMap = [:]
def cmds = []
varAction = "ON"
rfData = "10;"
sendEvent(name: "switch", value: "on", isStateChange: true)
state.actions.each { entry ->
theMap = parseAsMap(entry.value)
if (theMap.CMD == varAction) {
theMap.every {
rfData += it.value + ';'
}
}
}
if (rfData) {
cmds << getAction(getCommandString("SerialSend1", rfData))
}
return cmds
}
Comparable function call (from the parent):
def refreshAdditional() {
logging("refreshAdditional()", 10)
def cmds = []
cmdData = "10;PING;"
cmds << getAction(getCommandString("SerialSend1", cmdData))
return cmds
}
And this is the culprit (parent):
def getCommandString(command, value) {
def uri = "/cm?"
if (password) {
uri += "user=admin&password=${password}&"
}
if (value) {
uri += "cmnd=${command}%20${value}"
logging(value.class, 1)
}
else {
uri += "cmnd=${command}"
}
return uri
}
Both the calling methods report both parameters as class java.lang.String. Then why don't I get an exception from refreshAdditional() and yet do I get one from on()? It doesn't even work when I manually set rfData to "10;PING".
I am puzzled. Hope anyone can help!