Ecobee binding v2

Submitted fix. Sorry about that!

Do you have a jar I can test with? If not I can pull your branch and compile directly.

I’ll post the jar. Gimme a minute.

Don’t rush. I got bored and was on my dev box so I pulled and compiled :slight_smile:

Error is gone.

1 Like

is there a link to the new jar somewhere, or a convenient way to install from the UI without having to download? I can never seem to find it and am not sure I want to go to the full 3.1 snapshot yet.

Unlikely that the jar will work. I had issues using 3.0 jars on 3.1 because the core was newer. I believe the rule (and I could very well be wrong) is that a newer core can use older jars but older core can’t use newer jars. If you want stability-ish, you could go to a snapshot core, keep the 3.0 addons, and load the ecobee 3.1 jar directly.

Thanks @morph166955 - I am not 100% sure how to do that, but played with it for a while. I’m running OpenHABian on a Pi and the tool seems to only want to do snapshot installations of 2.X, but I could be wrong… will do some more digging…

Hi, I am trying to transition from the v1 to v2 binding, and getActions is only returning null.
I’m using this command with my thermostat id number, as listed in the example docs (which, by the way, is completely omitted from the documentation. The only place to find it is to look in the examples):
val ecobeeActions = getActions("ecobee","ecobee:thermostat:account:######")

Literally seconds after I posted this, I realized I needed to use the Thing ID

I cannot seem to define a hold rule with the new binding. I keep getting the error:
temperature is not a QuantityType

I use this in my rules and it works. Here’s my example to set a temperature hold:

The items are my heating & cooling setpoints.

val ecobeeActions = getActions("ecobee","ecobee:thermostat:xxxxxxx:yyyyyyyy")
Thread::sleep(1000)
ecobeeActions.setHold(ecobee_off_setpoint_cool.state as QuantityType<Number>, ecobee_off_setpoint_heat.state as QuantityType<Number>, null, null, null, "nextTransition", null)

The 1-second sleep is important, otherwise it reverts back immediately. Don’t ask me why, though.

But another question to you guys out there:
My ecobee “app” (i.e. openhab) now has had it’s token revoked for the 2nd time in 3 Weeks. The logs then show the following:

2021-05-03 20:38:25.783 [WARN ] [inding.ecobee.internal.api.EcobeeApi] - API: The Ecobee authorization process threw an exception: invalid_grant: The authorization grant, token or credentials are invalid, expired, revoked, do not match the redirection URI used in the authorization request, or was issued to another client.
2021-05-03 20:38:57.155 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - #################################################################
2021-05-03 20:38:57.156 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - # Ecobee: U S E R   I N T E R A C T I O N   R E Q U I R E D !!
2021-05-03 20:38:57.156 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - # Go to the Ecobee web portal, then:
2021-05-03 20:38:57.156 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - # Enter PIN 'XXXX-XXXX' in My Apps within 900 minutes.
2021-05-03 20:38:57.157 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - # NOTE: All API attempts will fail in the meantime.
2021-05-03 20:38:57.157 [INFO ] [nding.ecobee.internal.api.EcobeeAuth] - #################################################################

If I re-authorize the binding, it works again. I’ll keep watching this, but it’s strange that it’s now happened twice within less than a month.

That didn’t help. I’m still getting temperature is not a QuantityType

I’m not sure why you’re getting this. I seem to recall someone reporting it once before, but I can’t find it and I don’t remember what the issue was.

Could you post the code snippet that’s causing the error?

This also happened to me in two separate installations. It’s too much of a coincidence for it to be anything other than something Ecobee did on their side.

You’re probably right, that might just mean that Ecobee is messing around here. I’ll keep watch.
In case anyone’s interested, you don’t have to watch the logs to capture this, your “Ecobee Account” Bridge Thing will go offline in Openhab, along with any thermostats/sensors you’ve set up.

And IIRC it will post the new PIN in the thing status message, so you don’t have to hunt through the logs for it.

Dunno about that one, I just grepped the openhab.log for ecobee. :wink:

Well, it’s supposed to put the PIN in the status message…

1 Like