@Knapoc: I already checked the Dockerfile and tried to use it (i did not copy it though), but it fails when it comes to compiling.
Also: As far as I understood, Python is an interpreted language and the goal of my Docker build would be having a suitable runtime environment for my RaspberryPi3, not a compile suite.
As homeassistant should download the requirements, my current Dockerfile looks very simple:
Building a appropriate image is not problem, however running a container with this image fails. It looks like inside the container the required modules are not downloaded automatically. Hereās an example:
INFO:homeassistant.util.package:Attempting install of sqlalchemy==1.2.2
INFO:homeassistant.setup:Setting up recorder
INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: domain=recorder, service=purge>
Exception in thread Recorder:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/recorder/__init__.py", line 196, in run
from .models import States, Events
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/recorder/models.py", line 6, in <module>
from sqlalchemy import (
ModuleNotFoundError: No module named 'sqlalchemy'
However, if I mimic the behaviour of the official build using a requirements file and installing dependencies during Docker build - it works.
@flamingm0e good day. Couple of questions
Is there a way to prioritise container startup on boot? Basically I need the last to be HA.
Is it possible to āexportā a command from the container? In the previous set up I had a temp sensor that was command line based. With docker the command does nothing as possibly the package is not in the HA container, but it is in the base OS (Ubuntu 18.04)
What package? Where is this sensor connected? What is your command?
If you have something directly connected to your host, and you want to present that to your running container, you use bind mounts. You donāt go the other way.
Thank you,
So I would say depends-on
Mqtt, Zoneminder, etcā¦
The sensor is the cpu temp from the lm sensors Ćŗtil in Ubuntu.
Before docker I had a command line sensor as āsensorsā and with a value template I got the number.
Thank you for your help.
After reading your post last weekend I spent 2 entire days learning and setting it up and itās great.
Incorporated portainer in panel frame so upgrade is one click from within the HA browser.
Set up watchtower etc, really pleased with the way it all works and I really appreciate the fact that if I break something I just kill it and start again with 2 clicks.
Has its quirks like this sensor, but thereās a way around as you pointed.
One thing really concerned me was the countless complaints about zwave set up. In my case of course it didnāt work right away, but after a bit of reading got it going.
Thank you again
Then you donāt need persistent storage. Though this will completely open up portainer so I would suggest you have it behind something else doing auth.
You seem to know your onions when it comes to all this, so hoping you could help
Iāve managed to setup a reverse proxy to route a DuckDNS domain via https to Home Assistant running in a Docker container, using traefik.
Do you know if itās possible to also access it locally via the IP address, or the machine name (192.168.0.5:8123 or my-server.local) as well as the external domain name? (MY-DOMAIN.duckdns.org).
I thought I read that this was possible somewhere, but maybe I was wrong, or itās only possible with nginx?
I can post my docker-compose.yml and traefik.toml code if it helps.
This is a great idea for a post and thank you so much for taking the time to do this. I have been wanting to get into Docker for a while but have never had the time. I may take a closer look at this later tonight
John
Hass anyone created a custom docker image? say you wanted a few extra python scripts / libs runningā¦ and you normally would have to go into docker interactive and then do a PIP3 installā¦ ā¦ however iām looking to build my own docker imageā¦ sorta a forkā¦anyone know how to do thatā¦
I want to take the base imageā¦so its updated by the hassbian teamā¦ but then re-run my scripts ontop of it everytime there is a update to the base;ā¦so then i have a new docker image to use.