The following code works for me, but it failed for some others. I was wondering if a few of you using appdaemon, could run this from your appdaemon apps directory and see if it works for you? It should just reach over to HA and get your location configuration information. I’m trying to figure out why it works for some and not others.
2017-01-30 08:24:31.015104 WARNING ------------------------------------------------------------
2017-01-30 10:12:55.007932 WARNING ------------------------------------------------------------
2017-01-30 10:12:55.009351 WARNING Unexpected error during loading of testloc.py:
2017-01-30 10:12:55.009752 WARNING ------------------------------------------------------------
2017-01-30 10:12:55.012545 WARNING Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/appdaemon/appdaemon.py", line 675, in readApp
conf.modules[module_name] = importlib.import_module(module_name)
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 "/home/pi/appdaemon/conf/apps/testloc.py", line 1, in <module>
from homeassistant.util import location
ImportError: No module named 'homeassistant'
2017-01-30 10:12:55.013042 WARNING ------------------------------------------------------------
Ok, that explains a few things. Now to figure out where the python libraries are on your system… Login as your homeassistant user and see if it’s in there then?
the user you run home assistant as. I’m not familiar with the AIO install so I’m kind of flying blind here. But the library where the python libraries are for python is probably where we need to be.
Yeah I got the part about which user, I wasn’t understanding what to do once I was logged in. The ls command is going to show the same thing no matter which user I’m logged in as, right?