(if I run from inside the docker):
cat /home/jason/homeassistant/elk/elkm1.py
cat: /home/jason/homeassistant/elk/elkm1.py: No such file or directory
cat /usr/src/app/homeassistant/elk/elkm1.py
cat: /usr/src/app/homeassistant/elk/elkm1.py: No such file or directory
ls -la: (of /usr/src/app/homeassistant/components)
lrwxrwxrwx 1 root root 38 Nov 25 10:30 elkm1.py -> /home/jason/homeassistant/elk/elkm1.py
However, cat /home/jason/homeassistant/elk/elkm1.py works fine outside the docker.
Seems like it’s something broken with my symlink. It doesn’t seem to work pointing from inside to outside the docker file structure.
This is how I created them - from inside the docker -
docker exec -it ‘home-assistant’ /bin/bash
ln -s /home/jason/homeassistant/elk/elkm1.py /usr/src/app/homeassistant/components/elkm1.py
UPDATE:
Ok, figured out the issue, inside docker /home/jason/homeassistant is actually /config. So my links need to look like this:
ln -s /config/elk/elkm1.py /usr/src/app/homeassistant/components/elkm1.py
ln -s /config/elk/switch/elkm1.py /usr/src/app/homeassistant/components/switch/elkm1.py
ln -s /config/elk/sensor/elkm1.py /usr/src/app/homeassistant/components/sensor/elkm1.py
ln -s /config/elk/light/elkm1.py /usr/src/app/homeassistant/components/light/elkm1.py
ln -s /config/elk/climate/elkm1.py /usr/src/app/homeassistant/components/climate/elkm1.py
ln -s /config/elk/alarm_control_panel/elkm1.py /usr/src/app/homeassistant/components/alarm_control_panel/elkm1.py
I also run inside the docker:
python -m pip install pyelk
which seems to work (Successfully installed pyelk-0.1.9.dev23 pyserial-3.4)
Now HASS does boot and sees my sensors, switches on the elk.
I am seeing this error in the log though, not sure if it’s interfering at all with operations:
2017-11-26 07:41:42 ERROR (MainThread) [homeassistant.setup] Error during setup of component elkm1
Traceback (most recent call last):
File “/usr/src/app/homeassistant/setup.py”, line 193, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/local/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/local/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/elkm1.py”, line 145, in setup
import PyElk
ModuleNotFoundError: No module named ‘PyElk’