Docker is damn useful but has some glitches, that’s true, but this one is rather a feature than a bug. We just have to deal with it accordingly, and I already do so with wheelstore.
Thanks Will try that in the weekend. I’am traveling now so I do not want to Mess with the system while being away from the family
I have installed hassio with docker on an Ubuntu 16.04 server. Therefore I can use the Hass.io add-ons.
in that case my advice is to get away from the hassio addon for appdaemon.
use the normal appdaemon docker version (or even better install appdaemon in venv.)
the addon from appdaemon does not bring you any advantages.
@ReneTode thanks for the tip I will look into it. It was however very easy to add until I ran into the connectivity problem
@ReneTode When one already has a working Docker, why should he prefer venv over an official Docker image? Apart from supposedly being easy to setup and maintain, using the Docker image has some more advantages. For instance, when you upgrade your distribution (e.g. from Debian 9 to 10, which will be released this spring/summer), the system-wide Python version will change from 3.5 to 3.7 and thus all your venvs will be broken and have to be set up from scratch again. This isn’t necessary with the Docker image.
What has to be coped with is the caching problem for the Docker image, which I will provide a PR for sometime next week, but then it’s a quite solid choice.
EDIT: Another advantage of using the official Docker image is that, when one runs into problems, you know exactly what his environment looks like, because the image defines it so tightly.
thats only true, if you know the docker yourself and only provide that.
i dont have docker, so i never know what people have for an environment when they have docker.
for me its way easier to support venvs then docker
i didnt think about a python upgrade. i guess thats an advantage against the disadvantages.
Well, when people use the docker image, you exactly know what OS AppDaemon runs on, which exact Python version, what the directory structure looks like, and so on. That can greatly help with tracing problems.
However, you have to know what the image you provide looks like
Might not be applicable to you in particular, but is a real advantage in general.
I, for instance, run my whole network infrastructure in Docker, including DNS, LDAP, RADIUS, VPN, MotionEye, CUPS, DLNA, Samba, Home Assistant, Mosquitto, AppDaemon… All runs on one single machine, but nicely isolated from each other, with macvlan networking (each service has its own IP) and backed by a central firewall (which also runs virtualized ).
Well, Docker rocks, as long as the images are designed in a reasonable way.
in all the time i supported users, i never found anything that it would make a difference what they use as OS (except windows) and because they use HA, they always use a python version which is high enough, so i never noticed anything there what was important too.
the directory structure isnt that important, except the config directory.
so all these advantages dont bring anything for me. for me the biggest disadvantage is that i dont have knowledge from docker and that people who dont have much knowledge from docker try to do more advanced stuff and then struggle.
you love docker, and i have no need for it, and it makes my live hard
If you have any question I might be able to help you with: feel free to ask
I love venvs, too, and AppDaemon might not be the application that benefits most from being used under Docker, but if there wasn’t an image for it already, I’d have built my own, just to be able to run it dockerized .
next time there is a docker related question here on the forum, ill call you
and yeah i can see advantages from docker, but mostly for none python programs.
and with every install i think people should think about the advantages and disadvantages (or at least thats how i look at it) but in general people just use 1 or the other. no matter what the advantages or disadvantages.
I’d do it as follows: If I already had Docker up and running with success or plan to have multiple applications, I would set AppDaemon up as a container as well to have it all in one ecosystem, but I probably wouldn’t spin up Docker and learn how to use it properly just for running AppDaemon.
I think that could also be a reasonable suggestion for new users needing to decide for a installation method.
I Am sorry if I remove the “https://github.com/efficiosoft/hass-apps/archive/master.zip” from the python packages I do get an error again (witch it is is not present). This is the error log:
Up to here it all seems fine:
Collecting feedparser (from appdaemon>=3.0->hass-apps==0.20190105.0)
Using cached https://files.pythonhosted.org/packages/91/d8/7d37fec71ff7c9dbcdd80d2b48bcdd86d6af502156fc93846fb0102cb2c4/feedparser-5.2.1.tar.bz2
But then it get an error collecting bcrypt:
Collecting bcrypt (from appdaemon>=3.0->hass-apps==0.20190105.0)
Downloading https://files.pythonhosted.org/packages/ce/3a/3d540b9f5ee8d92ce757eebacf167b9deedb8e30aedec69a2a072b2399bb/bcrypt-3.1.6.tar.gz (42kB)
Could not find a version that satisfies the requirement cffi>=1.1 (from versions: )
No matching distribution found for cffi>=1.1
Causing it to fail:
[establish] INFO - Removing temporary directory ...
[install] ERROR - No record exists for package 'https://github.com/efficiosoft/hass-apps/archive/master.zip'.
2019-01-20 12:18:11.197093 WARNING AppDaemon: ------------------------------------------------------------
2019-01-20 12:18:11.197683 WARNING AppDaemon: Unexpected error loading module: /config/appdaemon/apps/hass_apps_loader.py:
2019-01-20 12:18:11.197920 WARNING AppDaemon: ------------------------------------------------------------
2019-01-20 12:18:11.202187 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 2026, in check_app_updates
self.read_app(mod["name"], mod["reload"])
File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 1809, in read_app
self.modules[module_name] = importlib.import_module(module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/appdaemon/apps/hass_apps_loader.py", line 26, in <module>
from hass_apps.loader import *
ModuleNotFoundError: No module named 'hass_apps'
As said with the master in the python packages all runs without errors.
That can only be due to a temporary unavailability of PyPi or suchlike. I just tried 5 minutes ago and it worked. Could you do it again and, in case it fails, post the full log please, not just some excerpts. You can upload it here: https://gist.github.com/
Unfortunately it still fails. This is the full log: https://gist.github.com/taste66/e0ee14583864d0163e24c90f2b2a5c06#file-gistfile1-txt
Oh, how I hate these hassio addon images. Probably it’s due to pip being version 10 vs 18 (latest), download hass_apps_loader.py again.
Sorry that did not help: https://gist.github.com/taste66/892dfec26422d49209f29e6c794dfba1#file-gistfile1-txt
Ok, fetch both files again and retry.
Sorry: https://gist.github.com/taste66/e1d327e62ccc39448cc7bca39a8b327b#file-gistfile1-txt
I understand if you give up this seems to be very difficult
That seems really weird.
Using cached https://files.pythonhosted.org/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar.gz
should not be possible with the updated hass_apps_loader.py, because it calls pip with --no-cache-dir.