Ecobee - Unable to locate credentials for selection aborting function call

Just installed the latest stable Openhab 2x build and latest ecobee binding.
Trying to convert over all my old rules.
I got the ecobee setup…it has a pin, etc.
When i try to test out some things i used to do:

var coolHoldTemp = new DecimalType(64)
var heatHoldTemp = new DecimalType(50)
ecobeeSetHold("", coolHoldTemp, heatHoldTemp, null, null, null, “holdHours”, 4)

Unable to locate credentials for selection ; aborting function call.

What does that mean? Unable to locate credentials?

I’m not sure if this is causing the issue, but these need to be QuantityTypes. For example:

    var coolHoldTemp = 64|°F
    var heatHoldTemp = 50|°F

Also, the code to execute the action needs to look like this:

val ecobeeActions = getActions("ecobee","ecobee:thermostat:account:XXXXXXXXXXXX")
ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, 4)

Documentation Reference:

Thanks! Just tried that, I get a few errors; one on the rule load, but it says refreshing anyway…so I tried to execute the rest and got another error.

2020-10-18 11:00:50.678 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model ‘Test.rules’, using it anyway:
The method setHold(ThingActions, QuantityType, QuantityType, Number) from the type EcobeeActions refers to the missing type Object
2020-10-18 11:00:50.793 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Test.rules’
2020-10-18 11:01:40.016 [WARN ] [.binding.ecobee.action.EcobeeActions] - Unrecognized event field ‘holdHours’ with value ‘4’ ignored.
2020-10-18 11:01:40.029 [WARN ] [.binding.ecobee.action.EcobeeActions] - Unrecognized event field ‘holdType’ with value ‘holdHours’ ignored.

Yeah you’ll get validation issues, but that’s ok. I don’t know how to get rid of those.

Gimme a minute to look into the other warnings.

It looks like a bug in that it’s not handling the holdHours argument properly.

But, it still should’ve set the hold. However, it will be a permanent hold versus the number of hours you specified.

Yeah it’s not setting anything atm; never changes it to the hold number of 64. Will this bug be fixed or is there a different way around to get it to set the hold hours?

Oh i see…i had to refresh my ecobee web page, i see it holding now…still, the hold hours was key to my setup…is there a workaround to get it to hold for a time limit?

It’ll be fixed in 3.0 (which doesn’t help you).

But, try this

ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, null, null, null, "holdHours", 4)

That seems like what I use today on my older build. Yeah I don’t like adopting bleeding edge stuff. Sad thing is I had my Openhab2 stable for YEARS…and ecobee decides to change the API in dec; hence why I’m trying to get on the stable build and the latest binding. My hope is any API change would be fixed in the latest 2.x binding as well?
That didn’t work. I get an error now:
2020-10-18 11:29:26.860 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Test.rules’
2020-10-18 11:30:04.398 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Test’: actions cannot be null

var coolHoldTemp = 64|°F
var heatHoldTemp = 50|°F
val ecobeeActions = getActions(“ecobee”,“ecobee:thermostat:account:##########”)
//ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, 4)
ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, null, null, null, “holdHours”, 4)

Did you replace with your thermostat id?

Yes sir :slight_smile: I’m just obfuscating it on the forum :slight_smile:

Yeah, I preserved that API call but also added a few others that were supposed to be simpler. That worked out really well, huh? lol

I hope so. I’ve been trying for weeks to get into Ecobee’s Early Access Program. I ended up sending a tweet to the VP of Engineering last week, which got a response. But I’m still not in the EAP. :roll_eyes:

If I can do a 2.5.x release, I’ll also fix the setHold bug(s).

Sorry, had to ask. :wink:

I got it! Appreciate the help and the work on this!
For some reason I put “account” into the initial string instead of my actual account. So the therm ID was there…but I must have copied pasted from an example and forgot to put that back in.

For anyone looking to set a hold for x hours:
var coolHoldTemp = 64|°F
var heatHoldTemp = 50|°F
val ecobeeActions = getActions(“ecobee”,“ecobee:thermostat:your account id:your thermostat id”)
ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, null, null, null, “holdHours”, 4)

This sets the AC to 64 for 4 hours.
Account ID and Thermostat ID can be found in Paper UI under the thing configuration.

Ok, glad we got it sorted out. And thanks for being patient as we worked through the issue.

I tested software for 15 years and still work in software as a project manager…worked with many different types of engineers…Patience is a finely crafted skillset I’ve learned to have :slight_smile:

1 Like

I had to do a reinstall on a new VM; lost on this one.
Put the same code in place that we worked through and i get this in the log file:

[WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘Test.rules’ has errors, therefore ignoring it: [13,23]: no viable alternative at input ‘?’
[14,23]: no viable alternative at input ‘?’
Line 13 is that coolHoldTemp variable below
This is exactly the same code i used before; an exact copy; so unsure why it’s failing now.

var coolHoldTemp = 64|°F
var heatHoldTemp = 50|°F
val ecobeeActions = getActions(“ecobee”,“ecobee:thermostat:f1ffb9e3:MyThermostatIDIsHere”)
ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, null, null, null, “holdHours”, 4)

It looks like i have both ecobee bindings installed; maybe this is the cause? I am trying to uninstall 1.14 from paperui but it doesnt uninstall.

I restarted openhab so only the 2.5 binding was installed; still no dice; same error on that rule.

Update:
No idea why, but i had to edit this rule differently than we had it working a month ago; had to put double quotes around the last part of the variables

var coolHoldTemp = 64|“°F”
var heatHoldTemp = 50|“°F”
val ecobeeActions = getActions(“ecobee”,“ecobee:thermostat:f1ffb9e3:MyThermostatIDIsHere”)
ecobeeActions.setHold(coolHoldTemp, heatHoldTemp, null, null, null, “holdHours”, 4)

I was going to suggest you try that, although I also have no idea why it would make a difference. If the openHAB version changed, perhaps there’s a different rev of Xtext that’s more picky about that construct.

Yeah, no idea; i checked the versions in Karaf console and they were both 2.5.10(i assume it’s the core openhab that would cause this and not the binding)