Can't get PIN for Ecobee binding

I believe I’ve have found a bug in the Ecobee binding related to being able to configure it via Paper UI. Please uninstall the version you’re currently using and try this one. You could install it like

bundle:install https://dl.dropboxusercontent.com/u/4286376/ecobee-binding-xml/org.openhab.binding.ecobee-1.9.0-SNAPSHOT.jar
bundle:start <the ID of the bundle just installed>

The difference ought to be that you should now be able to configure it via the Paper UI.

Thanks. The ecobee binding now shows up in Paper UI, but I still can’t get it to provide that elusive 4 letter code.

I tried all sorts of things and now the system is messed up. Questions:

  1. Can install a “fresh” copy of openhab?
  2. Is it possible to configure openhab entirely with command files, i.e. not using the Paper UI or Habmin?

Thanks,
Bernhard

I added the test JAR to my OH2 test installation (first performing a bundle:uninstall on the Ecobee binding JAR that was installed) and I was able to configure the binding via Paper UI. I also copied over an items file with items bound to ecobee= binding config strings per the wiki page for the binding.

BUT…it looked like the binding was using some non-working appkey which resulted in the 401 log error. So I then edited ecobee.cfg with the correct appkey and scope, restarted the openHAB server, and I was able to get the PIN in the log (which I watched with log:tail at the openhab> prompt.) I logged into my user account at ecobee.com to authorize the PIN from the log. After that, all was working fine.

SO…there appears to be something strange with the binding configuration, and I had to resort to manually editing the ecobee.cfg file.

I hope this helps. Please report your further experiences, so if there are any identifiable bugs we can open issues against them.

I replaced file and was able to enter API key using PaperUI, but receiving this error now.

2016-10-25 22:14:20.991 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] bind method [setEventPublisher] not found
2016-10-25 22:14:20.991 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] bind method [addBindingProvider] not found
2016-10-25 22:14:20.991 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] bind method [addBindingProvider] not found
2016-10-25 22:14:20.991 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] unbind method [removeBindingProvider] not found
2016-10-25 22:14:20.992 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] unbind method [removeBindingProvider] not found
2016-10-25 22:14:20.992 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] unbind method [unsetEventPublisher] not found
2016-10-25 22:14:20.992 [ERROR] [org.openhab.binding.ecobee          ] - [org.openhab.binding.ecobee.binding(227)] Failed creating the component instance; see log for reason
2016-10-25 22:14:20.992 [WARN ] [org.openhab.binding.ecobee          ] - FrameworkEvent WARNING - org.openhab.binding.ecobee
org.osgi.framework.ServiceException: org.apache.felix.scr.impl.manager.SingleComponentManager.getService() returned a null service object
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:232)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.obtain(EventHandlerProxy.java:286)[3:org.apache.karaf.services.eventadmin:4.0.4]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:407)[3:org.apache.karaf.services.eventadmin:4.0.4]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:102)[3:org.apache.karaf.services.eventadmin:4.0.4]
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104)[3:org.apache.karaf.services.eventadmin:4.0.4]
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:163)[3:org.apache.karaf.services.eventadmin:4.0.4]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_101]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_101]
	at java.lang.Thread.run(Unknown Source)[:1.8.0_101]

No PIN is displayed in logs. What am I missing?

Thanks

I wonder if there is more than one Ecobee binding bundle in your configuration, or if you are trying to use a 1.8.* version of the binding JAR. Only a 1.9.* version will work.

I uninstalled old one before installing new one? Should I try replacing file manually? Which folder? \OpenHAB\runtime\karaf\system\org\openhab\binding\org.openhab.binding.ecobee\1.9.0-SNAPSHOT??? Because the file in that folder stays even when I uninstall.

Does the output of

openhab> bundle:list | grep -i ecobee

show more than one Ecobee binding bundle?

Yes, you were right. I guess it did not get uninstalled properly for some reason.

openhab> bundle:list | grep -i ecobee
213 | Active   |  80 | 1.9.0.201609250111    | openHAB Ecobee Binding
214 | Active   |  80 | 1.9.0.201609250111    | openHAB Ecobee Action
216 | Active   |  80 | 1.9.0.201610220725    | openHAB Ecobee Binding

So, I stopped the old one and uninstalled it.

openhab> bundle:stop 213
openhab> bundle:uninstall 213

But I I still keep getting error that I did originally.

2016-10-26 21:34:33.572 [DEBUG] [org.openhab.binding.ecobee          ] - BundleEvent STARTED - org.openhab.binding.ecobee
2016-10-26 21:34:33.650 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, org.openhab.binding.ecobee.EcobeeActionProvider, id=359, bundle=216/https://dl.dropboxusercontent.com/u/4286376/ecobee-binding-xml/org.openhab.binding.ecobee-1.9.0-SNAPSHOT.jar]: Updating property home.granularity of configuration org.openhab.ecobee caused a problem: the given configKey 'home.granularity' is unknown
org.osgi.service.cm.ConfigurationException: home.granularity : the given configKey 'home.granularity' is unknown
	at org.openhab.binding.ecobee.internal.EcobeeBinding.updated(EcobeeBinding.java:809)[216:org.openhab.binding.ecobee:1.9.0.201610220725]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)[7:org.apache.felix.configadmin:1.8.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)[7:org.apache.felix.configadmin:1.8.8]
	at java.lang.Thread.run(Unknown Source)[:1.8.0_101]

There is no ecobee.cfg file or any ecobee configuration in \conf\services . I don’t understand where it still gets home.granularity if it was from old configuration that has been removed.

Thanks,
Tadey

I recently learned that there is some complicated situation with service configurations under OH2/ESH/Karaf. I suggest trying some of the suggestions in this post:

I don’t know if it’s a documentation or code issue, but there is a lot that can surprise the user in the area of configuration (in comparison to openHAB 1.x).

Please let us know if you are able to track down the bad config data and what you did to sort it. Thanks!

Got it working by reinstalling. Pretty fast and easy. Copied all config files and got working really quick. Got to be something with Cache.

Thank you for all the help! This community is what makes OpenHAB great!

1 Like

Congratulations that you got “it” working. Can you elaborate on “it”?

I also started with a fresh installation of OpenHAB 2 (not 1.something!). I loaded the ecobee binding from addons.cfg (binding = astro,systeminfo,ntp,netatmo,ecobee).

ecobee.cfg contents (the appkey is from the default config posted on the web, I never got that 4 digit pin):

################################ Ecobee Binding #######################################
#
# the private API key issued be Ecobee to use the API (required, replace with your own)
creston.appkey=9T4huoUXlT5b5qNpEJvM5sqTMgaNCFoV

# the application scope used when authorizing the binding
# choices are smartWrite,smartRead, or ems, or multiple (required, comma-separated, no spaces)
creston.scope=smartWrite

# Rate at which to check if poll is to run, in ms (as of 1.8, optional, defaults to 5000)
#ecobee:granularity=5000

# Data refresh interval in ms (optional, defaults to 180000)
#refresh=180000

# Time in ms to wait after successful update, command or action before refresh (as of 1.8, optional, defaults to 6000)
#quickpoll=6000

# Time in ms to allow an API request to complete (as of 1.8, optional, defaults to 20000)
#timeout=20000

# the temperature scale to use when sending or receiving temperatures
# optional, defaults to Fahrenheit (F)
tempscale=C

The binding shows up in the Paper UI with the correct parameters, but the log has nothing too encouraging:

23:44:11.257 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ecobee.items'
23:44:29.427 [DEBUG] [org.openhab.binding.ecobee          ] - BundleEvent STARTING - org.openhab.binding.ecobee
23:44:29.433 [DEBUG] [ding.ecobee.internal.EcobeeActivator] - Ecobee binding has been started.
23:44:29.436 [DEBUG] [org.openhab.binding.ecobee          ] - BundleEvent STARTED - org.openhab.binding.ecobee
23:44:29.459 [DEBUG] [org.openhab.binding.ecobee          ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.ecobee.EcobeeBindingProvider}={component.name=org.openhab.binding.ecobee.genericbindingprovider, component.id=188, service.id=311, service.bundleid=203, service.scope=bundle} - org.openhab.binding.ecobee
23:44:29.470 [DEBUG] [org.openhab.binding.ecobee          ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, org.openhab.binding.ecobee.EcobeeActionProvider}={event.topics=openhab/*, service.pid=org.openhab.ecobee, component.name=org.openhab.binding.ecobee.binding, component.id=187, service.id=312, service.bundleid=203, service.scope=bundle} - org.openhab.binding.ecobee
23:44:29.761 [INFO ] [inding.ecobee.internal.EcobeeBinding] - No Ecobee in-bindings have been found for selection.
23:44:29.766 [DEBUG] [inding.ecobee.internal.EcobeeBinding] - Nothing to retrieve for 'creston'; skipping thermostat retrieval.
23:44:31.126 [INFO ] [inding.ecobee.internal.EcobeeBinding] - #########################################################################################
23:44:31.127 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # Ecobee-Integration: U S E R   I N T E R A C T I O N   R E Q U I R E D !!
23:44:31.127 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # 1. Login to www.ecobee.com using your 'DEFAULT_USER' account
23:44:31.129 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # 2. Enter the PIN 'null' in My Apps within the next null minutes.
23:44:31.130 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # NOTE: Any API attempts will fail in the meantime.
23:44:31.130 [INFO ] [inding.ecobee.internal.EcobeeBinding] - #########################################################################################
23:44:31.131 [WARN ] [inding.ecobee.internal.EcobeeBinding] - Periodic poll skipped for 'DEFAULT_USER'.
23:47:31.137 [INFO ] [inding.ecobee.internal.EcobeeBinding] - No Ecobee in-bindings have been found for selection.
23:47:31.138 [DEBUG] [inding.ecobee.internal.EcobeeBinding] - Nothing to retrieve for 'creston'; skipping thermostat retrieval.

ecobee.items

Group gEcobee

Number actualTemperature "Temperature [%.1f C]" (gEcobee) { ecobee="<[creston.316558281665#runtime.actualTemperature]" }

You might need to configure the default user instead of only defining creston. in ecobee.cfg. I never tested the binding without defining at least a default user configuration. So define something like:

appkey=9T4huoUXlT5b5qNpEJvM5sqTMgaNCFoV
scope=smartWrite

in ecobee.cfg and remove the creston. prefixes in your item bindings in your .items file(s).

Tried this, unfortunately without success (i.e. I keep getting PIN ‘null’). But these two lines from the log may point to the problem:

19:15:47.158 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Request: AuthorizeRequest[appKey=ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI,scope=smartWrite]
19:15:48.056 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Response: AuthorizeResponse[error=invalid_client,errorDescription=Authentication error, invalid authentication method, lack of credentials, etc.,errorURI=https://tools.ietf.org/html/rfc6749#section-5.2,ecobeePin=<null>,authToken=<null>,scope=<null>,expiresIn=<null>,interval=<null>]

Apparently the ecobee (portal?) is not happy with the appKey. I’ve also tried 9T4huoUXlT5b5qNpEJvM5sqTMgaNCFoV - same result. Curiously, if I comment out the appkey, the binding still uses ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI for authentication, so perhaps that’s a default “baked” into the binding. At any rate, I always get PIN ‘null’.

If I understand correctly, these keys are just “stand-ins” for the actual key, which I will get using the “elusive” 4 digit pin. So the error kind of makes sense: I am specifying a bogus appkey just to get the pin.

How did you and others get over this hurdle?

Below are my full configuration and the complete log.

ecobee.cfg:

################################ Ecobee Binding #######################################
#
# the private API key issued be Ecobee to use the API (required, replace with your own)
appkey=ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI
# appkey=9T4huoUXlT5b5qNpEJvM5sqTMgaNCFoV

# the application scope used when authorizing the binding
# choices are smartWrite,smartRead, or ems, or multiple (required, comma-separated, no spaces)
scope=smartWrite

# Rate at which to check if poll is to run, in ms (as of 1.8, optional, defaults to 5000)
#ecobee:granularity=5000

# Data refresh interval in ms (optional, defaults to 180000)
#refresh=180000

# Time in ms to wait after successful update, command or action before refresh (as of 1.8, optional, defaults to 6000)
#quickpoll=6000

# Time in ms to allow an API request to complete (as of 1.8, optional, defaults to 20000)
#timeout=20000

# the temperature scale to use when sending or receiving temperatures
# optional, defaults to Fahrenheit (F)
tempscale=C

ecobee.items:

// Ecobee binding

Group gEcobee

Number actualTemperature "Temperature [%.1f C]" (gEcobee) { ecobee="<[316558281665#runtime.actualTemperature]" }
DateTime lastModified "last mod [%1$tH:%1$tM:%1$tS]" { ecobee="<[316558281665#lastModified]" }
Number actualHumidity "actual hum [%d %%]" { ecobee="<[316558281665#runtime.actualHumidity]" }
String hvacMode "hvac mode [%s]"            { ecobee="=[316558281665#settings.hvacMode]" }
String currentClimateRef "sched comf [%s]"  { ecobee="<[316558281665#program.currentClimateRef]" }
String desiredComf "desired comf"           { ecobee="<[316558281665#runningEvent.holdClimateRef]", autoupdate="false" }
Number desiredTemp "desired temp [%.1f °F]"
Number desiredHeat "desired heat [%.1f °F]" { ecobee="<[316558281665#runtime.desiredHeat]" }
Number desiredCool "desired cool [%.1f °F]" { ecobee="<[316558281665#runtime.desiredCool]" }
String desiredFan  "desired fan mode [%s]"  { ecobee="<[316558281665#runtime.desiredFanMode]" }

log:

19:19:56.284 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ecobee.items'
19:20:07.910 [DEBUG] [org.openhab.binding.ecobee          ] - BundleEvent STARTING - org.openhab.binding.ecobee
19:20:07.915 [DEBUG] [ding.ecobee.internal.EcobeeActivator] - Ecobee binding has been started.
19:20:07.916 [DEBUG] [org.openhab.binding.ecobee          ] - BundleEvent STARTED - org.openhab.binding.ecobee
19:20:07.948 [DEBUG] [org.openhab.binding.ecobee          ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.ecobee.EcobeeBindingProvider}={component.name=org.openhab.binding.ecobee.genericbindingprovider, component.id=178, service.id=302, service.bundleid=199, service.scope=bundle} - org.openhab.binding.ecobee
19:20:08.088 [DEBUG] [org.openhab.binding.ecobee          ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, org.openhab.binding.ecobee.EcobeeActionProvider}={event.topics=openhab/*, service.pid=org.openhab.ecobee, component.name=org.openhab.binding.ecobee.binding, component.id=177, service.id=305, service.bundleid=199, service.scope=bundle} - org.openhab.binding.ecobee
19:20:08.481 [INFO ] [b.core.service.AbstractActiveService] - Ecobee Refresh Service has been started
19:20:08.496 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Querying Ecobee API for instance DEFAULT_USER
19:20:08.510 [INFO ] [inding.ecobee.internal.EcobeeBinding] - No Ecobee in-bindings have been found for selection.
19:20:08.518 [DEBUG] [inding.ecobee.internal.EcobeeBinding] - Nothing to retrieve for 'DEFAULT_USER'; skipping thermostat retrieval.
19:20:13.829 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runtime.actualTemperature]
19:20:13.831 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runtime.actualTemperature
19:20:13.833 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runtime.actualTemperature]'
19:20:13.839 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#lastModified]
19:20:13.841 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=lastModified
19:20:13.843 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#lastModified]'
19:20:13.845 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runtime.actualHumidity]
19:20:13.846 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runtime.actualHumidity
19:20:13.848 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runtime.actualHumidity]'
19:20:13.851 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig==[316558281665#settings.hvacMode]
19:20:13.853 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=settings.hvacMode
19:20:13.854 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '=[316558281665#settings.hvacMode]'
19:20:13.855 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#program.currentClimateRef]
19:20:13.857 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=program.currentClimateRef
19:20:13.858 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#program.currentClimateRef]'
19:20:13.859 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runningEvent.holdClimateRef]
19:20:13.861 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runningEvent.holdClimateRef
19:20:13.862 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runningEvent.holdClimateRef]'
19:20:13.863 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runtime.desiredHeat]
19:20:13.864 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runtime.desiredHeat
19:20:13.865 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runtime.desiredHeat]'
19:20:13.867 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runtime.desiredCool]
19:20:13.868 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runtime.desiredCool
19:20:13.869 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runtime.desiredCool]'
19:20:13.871 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with bindingConfig=<[316558281665#runtime.desiredFanMode]
19:20:13.872 [TRACE] [nternal.EcobeeGenericBindingProvider] - validateItemType called with property=runtime.desiredFanMode
19:20:13.873 [DEBUG] [nternal.EcobeeGenericBindingProvider] - Processing binding configuration: '<[316558281665#runtime.desiredFanMode]'
19:23:08.681 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Querying Ecobee API for instance DEFAULT_USER
19:23:08.698 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Authorizing this binding with the Ecobee API.
19:23:09.284 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Request: AuthorizeRequest[appKey=ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI,scope=smartWrite]
19:23:10.203 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Response: AuthorizeResponse[error=invalid_client,errorDescription=Authentication error, invalid authentication method, lack of credentials, etc.,errorURI=https://tools.ietf.org/html/rfc6749#section-5.2,ecobeePin=<null>,authToken=<null>,scope=<null>,expiresIn=<null>,interval=<null>]
19:23:10.210 [INFO ] [inding.ecobee.internal.EcobeeBinding] - #########################################################################################
19:23:10.212 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # Ecobee-Integration: U S E R   I N T E R A C T I O N   R E Q U I R E D !!
19:23:10.215 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # 1. Login to www.ecobee.com using your 'DEFAULT_USER' account
19:23:10.216 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # 2. Enter the PIN 'null' in My Apps within the next null minutes.
19:23:10.218 [INFO ] [inding.ecobee.internal.EcobeeBinding] - # NOTE: Any API attempts will fail in the meantime.
19:23:10.218 [INFO ] [inding.ecobee.internal.EcobeeBinding] - #########################################################################################
19:23:10.219 [WARN ] [inding.ecobee.internal.EcobeeBinding] - Periodic poll skipped for 'DEFAULT_USER'.
19:26:10.225 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Querying Ecobee API for instance DEFAULT_USER
19:26:10.229 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Authorizing this binding with the Ecobee API.
19:26:10.237 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Request: AuthorizeRequest[appKey=ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI,scope=smartWrite]
19:26:10.667 [TRACE] [inding.ecobee.internal.EcobeeBinding] - Response: AuthorizeResponse[error=invalid_client,errorDescription=Authentication error, invalid authentication method, lack of credentials, etc.,errorURI=https://tools.ietf.org/html/rfc6749#section-5.2,ecobeePin=<null>,authToken=<null>,scope=<null>,expiresIn=<null>,interval=<null>]

Why are you doing that? You need a real appkey to get a PIN. The wiki says you have to register a new app as a developer, which will yield the appkey you then supply in your .cfg file.

Commenting out the required appkey configuration from the .cfg file still leaves the copy of its previous value inside the OSGi configuration service storage. If you specify a correct appkey in the .cfg file that you created above, it should then take effect.

There is no default value for appkey in the binding, because Ecobee API users should always safeguard their appkey to ensure it’s not abused by others, and the only sensible approach for open source is to have users self-serve by obtaining their own as needed.

Stupid me. Now it’s all working.

Many thanks and sorry for the commotion.

1 Like

Glad you got it working!

Thanks for documenting ecobee’s incorrect instructions.
I was working on another (non-openhab) application and…

After an hour or two of wasted time I found your post here,
removed the “/1” from the curl

and everything works.

Geez - they should fix their doc.

Where does the id for the thermostat come from to enter into items files?
I’m doing a reinstall
I got a pin back
I entered it, but nothing ever tries to connect
I have items in my items files…i am using the thermostat ID from my other install of openhab until i can get my new one up and running. Is this wrong? DO i need a new therm id

2017-03-28 18:18:44.046 [INFO ] [b.core.service.AbstractActiveService] - Ecobee Refresh Service has been started
2017-03-28 18:18:44.047 [INFO ] [inding.ecobee.internal.EcobeeBinding] - No Ecobee in-bindings have been found for selection.

On ecobee.com, when you look at your thermostat settings, it’s the string of numbers after the last slash in the URL.

Just a note, if you change your API key, you need to uncomment that line in your ecobee.cfg in order to get it to read the new one.