Setting up ecobee binding in OH2

I’ve been trying to get the ecobee binding to work in a new installation from the online snapshot of OpenHAB 2. I’ve installed the binding using feature:install, and set the appkey and scope using config:edit, but I cannot get it log the PIN message to activate it with ecobee.com. I must be missing something, but I cannot seem to figure it out. Has anyone else succeeded in activating the ecobee binding in OpenHAB 2?

I just got this running myself. You have add the items before it will give you the PIN. Add an item if you have not already.

As per the binding page:

After you have installed the binding JAR in your addons directory, configured your openhab.cfg file, added items to your .items file and started OpenHAB (if not previously started), when the binding performs its first poll, it will discover that is has not yet been authorized by the Ecobee servers, and will retrieve a four-character PIN from the Ecobee server. This PIN will appear prominently in your openhab.log file:

-tp

I think the different behavior under OH2 might be related to this issue.

Thanks, I got it working. I was confused by OH2’s new paper interface, and didn’t realize that I needed to setup the ecobee binding (items & rules) just as you would for OH1.

I had ecobee working fine in OH2. But now I am not getting any data back and getting this error on log:

2016-10-15 01:01:38.627 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, org.openhab.binding.ecobee.EcobeeActionProvider, id=370, bundle=213/mvn:org.openhab.binding/org.openhab.binding.ecobee/1.9.0-SNAPSHOT]: 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)[213:org.openhab.binding.ecobee:1.9.0.201609250111]
	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$UpdateConfiguration.run(ConfigurationManager.java:1753)[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]

Anyone familiar with this error? Please, help!

Thanks,
Tadey

granularity applies to all accounts so remove home. from that config line. Hope that helps!

1 Like

Thank you for such a fast response.

Here is my ecobee.cfg file

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

# 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 (optional, defaults to 5000)
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 (optional, defaults to 6000)
quickpoll=6000

# Time in ms to allow an API request to complete (optional, defaults to 20000)
vtimeout=20000

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

I have just one ecobee, so I am not defining multiple ones. I am not sure where “home.” comes from. Everything was working fine and then it just stopped. I have not made any changes to config when it stopped working. Not sure what exactly happened.

Some observations:

  1. I see a typo: vtimeout.
  2. You can comment out (make # the first character on the line) those config settings which are the same as the default value (so you could comment out granularity, quickpoll, timeout, and tempscale.
  3. If there is a home in your log, it’s because openHAB is picking up some configuration that has home in it. Any chance there is an openhab.cfg file in the wrong place or with the wrong contents?
  4. Do you know you ought to be able to configure the binding via the PaperUI, even though it’s a 1.x binding?

I suspect that somehow duplicate configuration information has somehow entered your setup, but I can’t say how.

Thanks for reply.

  1. Not sure how that v got there. It is not in my config. Probably during pasting. (explains why ‘v’)

  2. I tried that as well. ecoobee.cfg

     ################################ Ecobee Binding ######################################
     #
     # the private API key issued be Ecobee to use the API (required, replace with your own)
     appkey=RoTbHNfsXXXXXXXXXXXXXXXXXXSMqt0Y
     
    
     # 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 (optional, defaults to 5000)
     #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 (optional, defaults to 6000)
     #quickpoll=6000
    
     # Time in ms to allow an API request to complete (optional, defaults to 20000)
     #timeout=20000
    
     # the temperature scale to use when sending or receiving temperatures
     # optional, defaults to Fahrenheit (F)
     #tempscale=F
    
  3. Still shows home in logs.

     2016-10-16 12:38:21.009 [ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, org.openhab.binding.ecobee.EcobeeActionProvider, id=356, bundle=213/mvn:org.openhab.binding/org.openhab.binding.ecobee/1.9.0-SNAPSHOT]: 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)[213:org.openhab.binding.ecobee:1.9.0.201609250111]
     	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]
    
  4. I installed binding using PaperUI. but still added items and cfg files. Is there other way to do it?

This might be a conflict in which binding config settings are being used. You can enter binding configuration in PaperUI for this and a few other 1.x bindings, so I would temporarily move out your conf/services/ecobee.cfg as possibly redundant/ignored, and find and edit the configuration in the PaperUI. I haven’t tried it in awhile so take this advice with a grain of salt.

Sorry for noob question, but where would I do it?

Extenstions show ecobee binding installed:

But in Configuration > Bindings, there is no ecobee binding shown:

There is no ecobee in Configuration > Things either.

Where do I find it?

@dapanda, Please see above linked topic. This ought to get you past the issue.

Are you still active on this forum? I have a question re the ecobee binding, things, and how to access the ecobee sensor data to use in an openhab2 rule.

Regards,

Tom

Hi Tom,

There isn’t much more to say about the binding than 1) being a 1.x binding, there are no Things, just Items, and 2) what is documented here. If that doesn’t address your questions, please reply here.

Dear John,

I appreciate you taking the time to reply. I had been studying the documents you made reference to, and any other forum topics I could find over the last few weeks. I am new to all of this, but in the last month have purchased my first Raspi3, installed openHAB2 on it, installed bindings for my NEEO remote, and an Aeotec z-stick which now controls my motorized Somfy blinds based on time of day rules. Yet, as I am sure you have experienced, there are always times when one or two things that seem obvious to some, become hurdles that you need more direct help with from others.

My questions are:

  1. I am using the paper UI, and that is how I installed the ecobee binding and action. I see mention of needing to put the snapshot/jar file of the binding in a configuration folder. I have looked, but I don’t know where to find this file, or if I even need to. I had to do this with two snapshot files for my NEEO bindings, but they were easy to find on github.

  2. I believe I understand how items and rules work, and that there will be no ‘Things’ visable in my openHAB2 paper UI. What I do not understand is where, if at all, I can see the states, data, or values that are being used or generated by the items and rules I create, (or the thermostat, sensors, etc. and their states wrt temp. etc) Will they show up in the ‘Rules’ or ‘Configuration’ sections of the paper UI, or in any openHAB2 UI? Are the creation of sitemaps part of this?

My main reason for exploring the ecobee binding was to take advantage of the remote temperature readings of the sensors, and use those in rules to fine tune the operation of the motorized shades and Hue lights in my home. I have just purchased an Aeon MultiSensor 6, which from my research, might be a simpler yet equally effective alternative to accomplishing my goal. I do not however want to give up on making the ecobee binding work, as I am learning a lot of skills that I know I can apply in future projects.

Any information and insight you can provide is greatly appreciated.

Thank you,

Tom

Hi Tom, you don’t need to handle JAR files directly. Installing a binding and action via the Paper UI is enough. In the case of a 1.x binding, you will have to edit text files to create and bind items, and then use a sitemap text file to see the items in a client like the Basic or Classic UI (or some other UIs). You can use the ecobee remote sensors in UIs and in rules by using the items you’ve bound above.