@chuck.schwer hoping you can help me with the following error:
groovy.lang.MissingMethodException: No signature of method: user_app_bspranger_Lennox_iComfort__Connect__195.var() is applicable for argument types: (groovy.json.internal.LazyMap) values: [[ReturnStatus:SUCCESS, tStatInfo:[[Away_Mode:0, Central_Zoned_Away:2, ...]]]]
I am working to convert the scheduled API calls in the Lennox iComfort Thermostat App and Driver to Async calls:
I've followed your examples above but am getting the error noted above. Here is my asynchttpGet call:
private apiGetAsync(apiPath, apiParams = , data = ) {
// set up parameters
apiParams = [ uri: getApiURL(), path: apiPath, headers: [Authorization : getApiAuth()] ] + apiParams
logDebug "apiParams: $apiParams"asynchttpGet("processGetResponse", apiParams, data)
}
This returns the following response:
response: {"ReturnStatus":"SUCCESS","tStatInfo":[{"Away_Mode":0,"Central_Zoned_Away":2,"ConnectionStatus":"GOOD","Cool_Set_Point":75.00,"DateTime_Mark":"/Date(1569345925787+0000)/","Fan_Mode":0,"GMT_To_Local":-18000,"GatewaySN":"WS16J03443","Golden_Table_Updated":true,"Heat_Set_Point":66.00,"Indoor_Humidity":40,"Indoor_Temp":76.00,"Operation_Mode":3,"Pref_Temp_Units":"0","Program_Schedule_Mode":"1","Program_Schedule_Selection":4,"System_Status":2,"Zone_Enabled":1,"Zone_Name":"Zone 1","Zone_Number":0,"Zones_Installed":1}]}
And the code that causes the error in my callback function:
private processGetResponse(response, data) {
def apiName = data.apiName
def childDeviceId = data.childDeviceId
log.debug "response: ${response.data}"if (response.getStatus() == 200) { var responseData = response.getJson()
The last line is the cause of the error. I have tried parseJson(), JsonSlurper() and many things but it always errors when I am trying to convert the response into Json. I even tried not converting to Json and still get another error.
If I set responseData = parseJson(response.data), I get this error instead:
groovy.lang.MissingMethodException: No signature of method: user_app_bspranger_Lennox_iComfort__Connect__195.var() is applicable for argument types: (java.util.HashMap) values: [[tStatInfo:[[Program_Schedule_Selection:4, Indoor_Temp:76.00, ...]], ...]]