Hesitant to post - I’m not sure if this will help or make things worse, but I was getting errors in the 0.0.3.alpha.1 version of python-lyric init.py yesterday. When I opened init.py in vi, it said “File truncated unexpectedly” or something like that. I’m relatively new to this world, so not sure if github might corrupt files occasionally? Anyway, I switched to the master branch in components/lyric.py, and that seemed to resolve the issue.
Here is what I got. I am using a straight install on Debian.
2017-08-09 17:03:05 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.climate.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/homeassistant/loader.py", line 142, in get_component
module = importlib.import_module(path)
File "/usr/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/usr/local/lib/python3.4/dist-packages/homeassistant/components/climate/lyric.py", line 16, in <module>
from custom_components.lyric import DATA_LYRIC
ImportError: No module named 'custom_components'
2017-08-09 17:03:05 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.lyric
2017-08-09 17:03:05 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.lyric: Platform not found.
OK, that’s what I was affraid of, the devices part is empty. So you don’t get any devices from the API. That’s not something my library is doing, but a problem at the Honeywell side.
Try removing your lyric.conf, re-authenticate, and I noticed they changed the last step, where you have to choose what devices you want to give access too. Make sure the thermostat is checked!
Edit: whoops, missed the services.yaml snippet above. I’ve deleted most of my comment since it’s not constructive, but I’m leaving the following just because
Also, while I have your attention… “OK! All good. Got the respons! You can close” You’re missing the e in “response”.
Everything is working now. We need to make sure that the thermostat is checked for it to appear in HA. The climate entity is there. Now, we need to add some more instructions to the services and looks like we may be ready for a PR soon
I’ve mixed in services.yaml from down in /srv/homeassistant into custom_components along with the additional lyric entry up above. Now I’m getting the following, which looks similar to Honeywell Lyric Thermostat however I do not see a resolution to that user’s issue. I’m on the version listed in post 84.
2017-08-10 09:23:51 DEBUG (Thread-11) [custom_components.lyric] proceeding with discovery of platforms
2017-08-10 09:23:51 DEBUG (Thread-11) [custom_components.lyric] setup done of component
2017-08-10 09:23:51 DEBUG (Thread-8) [custom_components.climate.lyric] Set up Lyric climate platform
2017-08-10 09:23:51 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
yield from self.hass.async_add_job(entity.update)
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 302, in update
self._scheduleSubType = self.device.scheduleSubType
File "/srv/homeassistant/lib/python3.4/site-packages/lyric/__init__.py", line 695, in scheduleSubType
if ('scheduleType' in self._lyric_api._device(self._locationId, self._deviceId)) & ('scheduleSubType' in self._lyric_api._device(self._locationId, self._deviceId)['scheduleType']):
KeyError: 'scheduleType'
I created the custom_components folder. Many thanks.
I see Config file not found: /home/homeassistant/.homeassistant/custom_components/climate/services.yaml and several mentions of services above. What goes in that file?
Seeing these in the logs (not been able to pinpoint what is causing them):
2017-08-10 12:33:05 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.lyric_t5_thermostat fails
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 225, in async_update_ha_state
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 361, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 296, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/climate/lyric.py", line 286, in update
self._location = self.device.where
File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 455, in where
return self._lyric_api._location(self._locationId)['name']
File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 999, in _location
for location in self._locations:
File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 1010, in _locations
value = self._get('locations')
File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 972, in _get
response.raise_for_status()
File "/srv/homeassistant/lib/python3.5/site-packages/requests/models.py", line 928, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=XXXXXXXXXXXX