My Ecobee used to function in HA now I an getting python errors. Running an RPI3 version 0.28.2.
16-09-16 08:41:19 homeassistant.bootstrap: Error during setup of component ecobee
Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/bootstrap.py”, line 102, in _setup_component
result = component.setup(hass, config)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/ecobee.py”, line 124, in setup
NETWORK = EcobeeData(hass.config.path(ECOBEE_CONFIG_FILE))
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/ecobee.py”, line 96, in init
self.ecobee = Ecobee(config_file)
File “/home/hass/.homeassistant/deps/pyecobee/init.py”, line 70, in init
self.update()
File “/home/hass/.homeassistant/deps/pyecobee/init.py”, line 275, in update
self.get_thermostats()
File “/home/hass/.homeassistant/deps/pyecobee/init.py”, line 138, in get_thermostats
if self.refresh_tokens():
File “/home/hass/.homeassistant/deps/pyecobee/init.py”, line 115, in refresh_tokens
self.request_pin()
File “/home/hass/.homeassistant/deps/pyecobee/init.py”, line 78, in request_pin
self.authorization_code = request.json()[‘code’]
KeyError: ‘code’
Looks like there’s something with the authorization code. Try unauthorizing and reauthorizing it via the Ecobee website and put the new api_key in the ecobee conf file, then reauthorize from Home Assistant again via configurator.
Just as an aside, if you’re using default_view and have tabs set up, chances are you won’t see the configurator.
Just comment out the default view and restart HASS. Your page will be a temporary mess, but it will load the configurator. Get your ecobee set up, then revert your default_view settings and restart again.
(Just in case someone finds this thread later but wonders why their configurator won’t appear.)
I read that the “configurator” is the way to re-init once a pin has been re-set on EcoBee, but the log file states “Please authorize your ecobee developer app with PIN code xxxx
Goto https://www.ecobee.com/consumerportal/index.html, click
My Apps, Add application, Enter Pin and click Authorize.
After authorizing, call request_tokens() method.”
How does one call the request_tokens() method from the UI? (Ecobee doesn’t show up as a service domain and while homeassistant domain does, it doesn’t have a service called request_tokens
As an aside, I was about ready to do the same thing with the default view but then I went to the Unused Entities page and discovered that it will display configurator items. I clicked the configurator on that page, it had me click a button, and everything started working correctly again. I had already tried unregistering/re-registering the thermostat, rebuilding my developer app API key, PIN authorization probably a dozen times, deleting the ecobee.conf file, but until I tried that configurator link it just wouldn’t go through.