Yessss Sir ! You got it right! All is OK now. It works !
Here is my new code excerpt, so simple so powerful …
val newHeat = (runtime_desiredHeat.state as QuantityType<Number>) - 0.5|"°C"
val newCool = (runtime_desiredCool.state as QuantityType<Number>) + 0.5|"°C"
logInfo("HeatHold", "LAURENT: Setting heat setpoint to " + newHeat.toString + " and cooling at " + newCool.toString)
val ecobeeActions = getActions("ecobee","ecobee:thermostat:xxxxx")
ecobeeActions.setHold(newCool,newHeat)
Log: LAURENT: Setting heat setpoint to 18.50 °C and cooling at 25.00 °C
Thanks. I tried again after the official update for 2.5.11 (I thought maybe I did something wrong with the manual update), but still had the same problem, so I went ahead with nuking the OAuth json files, and this time everything worked as expected. So strange.
Has anyone noticed that the units for the forecast0…9#pressure channel items seem to be incorrect. It appears the number is actually hPA instead of inHg units. I tried using the inHg UOM and get the same value, but when I tried hPA the value returned was clearly wrong and it appears it was converting the value that is actually and hPa unit to a very much larger hPa.
It looks like it comes back from the API in millibars. So I need to use Units.MILLIBAR instead of ImperialUnits.INCH_OF_MERCURY.
They’re probably reporting in hectopascal, which I think is the SI unit that Openhab uses, not millibars. For the numerical value, they are identical, though.
Possibly, but I was assuming millibar. Except for visibility, which is in meters, all the other values returned by the API are Imperial units. Shouldn’t matter, though, as they are numerically identical as you point out. When OH converts to SI, you should get the hPa unit.
2020-12-23 07:42:07.381 [ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL https://api.ecobee.com/token failed with HTTP response code 404
2020-12-23 07:42:07.385 [INFO ] [inding.ecobee.internal.api.EcobeeApi] - API: Got exception trying to get access token from OAuth service
org.eclipse.smarthome.core.auth.client.oauth2.OAuthException: Bad http response, http code 404
at org.eclipse.smarthome.auth.oauth2client.internal.OAuthConnector.doRequest(OAuthConnector.java:321) ~[?:?]
at org.eclipse.smarthome.auth.oauth2client.internal.OAuthConnector.grantTypeRefreshToken(OAuthConnector.java:181) ~[?:?]
at org.eclipse.smarthome.auth.oauth2client.internal.OAuthClientServiceImpl.refreshToken(OAuthClientServiceImpl.java:300) ~[?:?]
at org.eclipse.smarthome.auth.oauth2client.internal.OAuthClientServiceImpl.getAccessTokenResponse(OAuthClientServiceImpl.java:333) ~[?:?]
at org.openhab.binding.ecobee.internal.api.EcobeeApi.isAuthorized(EcobeeApi.java:150) ~[?:?]
at org.openhab.binding.ecobee.internal.api.EcobeeApi.performThermostatSummaryQuery(EcobeeApi.java:197) ~[?:?]
at org.openhab.binding.ecobee.internal.handler.EcobeeAccountBridgeHandler.refreshThermostats(EcobeeAccountBridgeHandler.java:233) ~[?:?]
at org.openhab.binding.ecobee.internal.handler.EcobeeAccountBridgeHandler.refresh(EcobeeAccountBridgeHandler.java:225) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_252]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_252]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
As far as I know nothing has changed except and update was applied via apt-get update and a reboot.
openhab> version
4.2.7
openhab> bundle:list | grep Ecobee
217 x Active x 80 x 2.5.11 x openHAB Add-ons :: Bundles :: Ecobee Binding
I have reauthorized recently for this same error, but I don’t know if it was after December 1st or not. I didn’t know they made changes. I’ll check out the post and respond.
It isn’t giving me a pin as the documentation says it should be. It just keep throwing the 404 error and the account thing status shows: ‘Status: OFFLINE - CONFIGURATION_PENDING Checking authorization’.
Well, it’s probably because the binding doesn’t know how to deal with a 404 response when requesting an access token, as that’s not an expected response when calling that API endpoint.