I’ve just tried updating to the latest version of the remote folder (SVN reports version 7334), and using PyHarmony 1.0.9. I’m getting a little further now.
HASS loads the component properly and gets a token but it hangs on:
Nov 11 19:53:20 btpiserver hass[9656]: DEBUG:homeassistant.components.remote.harmony:retrieving configuration from hub using token: XXXX
@iandday That did the trick! I’ll get it set up with some switches and some automation today and report back my findings. Excellent work! I’m excited to test it out.
I’ve created an Input_Select with an item for each activity. I then created scripts to start each activity.
From there I created two sets of automations. One that selects the correct input on the selector when an activity is selected from the Harmony Remote. The other set watches for state changes on the input selector and launches the correct script when an activity is selected.
I’d be happy to post my code if anyone is interested.
For my (with the latest component/remote from the harmony branch) it fails to install pyharmony.
(homeassistant_venv) homeassistant@homepi:~ $ hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
16-11-12 17:20:24 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.remote.harmony. Make sure all dependencies are installed
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/loader.py", line 139, 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 "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/remote/harmony.py", line 17, in <module>
import pyharmony
ImportError: No module named 'pyharmony'
I previously had it installed manually but removed it after reading that HA should be able to do it itself once the component is loaded.
I install pyharmony manually and this is what I get in the logs:
16-11-12 17:29:04 INFO (MainThread) [homeassistant.loader] Loaded remote.harmony from homeassistant.components.remote.harmony
16-11-12 17:29:04 INFO (Thread-3) [homeassistant.components.remote.harmony] Loading Harmony component: Family Room
16-11-12 17:29:05 CRITICAL (Thread-3) [pyharmony.auth] Received response code 400 from Logitech.
16-11-12 17:29:05 CRITICAL (Thread-3) [pyharmony.auth] Data:
{"ErrorCode":1,"Id":"24b069b7-bee0-4fa9-b0cc-b2991edad1f2","Message":"Authentication failure BadCredentials : Unable to authenticate user's mail with the corresponding password via LIP:: [email protected]","Source":"GetUserAuthToken"}
Logitech login failed for remote: Family Room
You don’t actually need to manually install pyharmony anymore. Hass will automatically install the current version (v1.0.10) on boot. So long as you add the remote component and update your configuration.yaml, you should be all set.
@mefistofelis I’ve created a new thread so as not to hijack this one with my full code:
@danpow That same thread also goes over how I installed it for me. It will be a bit different for you since you’re using a virtual environment but I bet you can make it work.
No I’m afraid my skills lie in JavaScript, Go and Swift. That said I do have experience of unit testing on all those platforms so I’ll do some research and see if I can pitch in.
Been meaning to learn python properly for a while anyways!
Maybe PM me with the specific issue with coverage you’re having?
I completely wiped my setup yesterday and Hass was able to install 1.0.9 without any action in my part beyond adding the remote folder to components and updating my yaml. This was done on an RPi3 with an AIO installed build.
@iandday looks like it’s still creating the .conf file on every startup rather than just the first launch. I assume this is unintended behaviour? I know you built it so that a manual sync can be triggered later. This does add a fair bit off time to load time in HASS.
DEBUG:homeassistant.components.remote.harmony:writing hub configuration to file: /home/pi/.homeassistant/harmony_living_room_tv.conf
That was the intended behavior, to overwrite the conf file at each boot to catch any changes made to the hub’s configuration by other applications. Now that you bring it up it’s much more likely that HASS will be rebooting that the hub’s configuration will change. I’ll change it to write the conf file only if it’s not present and to overwrite it when the sync service is called
give it a shot, I’ll be interested to see the increase in startup times you see while on a rpi, I have hass on esxi so the time difference was negligible.