Home Assistant - Docker Compose

Currently reading
Home Assistant - Docker Compose

60
35
drfrankenstein.co.uk
NAS
1821+, 1815+
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. Android
Hi all, I am falling into the rabbit hole of Home Assistant and have had it up and running just fine in Docker via the Diskstation docker interface, however I have a few Zigbee devices on their way and need to look at passing through the receiver dongle to Home Assistant.

I followed the guide here I am not using the same stick but the premise is the same and I seem to have the hardware element sorted and have found my Sonoff Zigbee Dongle is using /dev/ttyACM0

However In order to passthrough hardware you need to deploy the container using docker-compose, I get the premise of the compose file as pretty used to seeing examples of them however for the one I have created when I try to start the container I get a number of errors.

Below is the docker-compose.yml it's more than likely I am missing something really simple but could do with a pointer as I have spent the last 3 hours on this!

command I am running via ssh
docker-compose -f /volume1/docker/homeassistant/docker-compose.yml up -d
docker-compose.yml
version: "3"
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:stable
volumes:
- /volume1/docker/homeassistant:/config
devices:
- /dev/ttyACM0:/dev/ttyACM0:rwm
environment:
- TZ=Europe/London
restart: always
network_mode: host
Errors
Traceback (most recent call last):
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "requests/adapters.py", line 449, in send
File "urllib3/connectionpool.py", line 727, in urlopen
File "urllib3/util/retry.py", line 403, in increment
File "urllib3/packages/six.py", line 734, in reraise
File "urllib3/connectionpool.py", line 677, in urlopen
File "urllib3/connectionpool.py", line 392, in _make_request
File "http/client.py", line 1252, in request
File "http/client.py", line 1298, in _send_request
File "http/client.py", line 1247, in endheaders
File "http/client.py", line 1026, in _send_output
File "http/client.py", line 966, in send
File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "docker/api/client.py", line 205, in _retrieve_server_version
File "docker/api/daemon.py", line 181, in version
File "docker/utils/decorators.py", line 46, in inner
File "docker/api/client.py", line 228, in _get
File "requests/sessions.py", line 543, in get
File "requests/sessions.py", line 530, in request
File "requests/sessions.py", line 643, in send
File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "bin/docker-compose", line 3, in <module>
File "compose/cli/main.py", line 67, in main
File "compose/cli/main.py", line 123, in perform_command
File "compose/cli/command.py", line 69, in project_from_options
File "compose/cli/command.py", line 132, in get_project
File "compose/cli/docker_client.py", line 43, in get_client
File "compose/cli/docker_client.py", line 170, in docker_client
File "docker/api/client.py", line 188, in __init__
File "docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
[29191] Failed to execute script docker-compose
 
Code:
sudo docker-compose -f /volume1/docker/homeassistant/docker-compose.yml up -d

That should be the default use case of using sudo . :)

I've been told not to use 'SUDO SU' untill explicitly needed, and not just because it's easier to use. Just to keep ur system safer.
 
Noted, I clearly wasn't thinking straight last night, I am going to spend some time this weekend creating docker-compose files for all my containers as it's so much quicker than using the interface once you get used to the layout.
 
I am going to spend some time this weekend creating docker-compose files for all my containers as it's so much quicker than using the interface once you get used to the layout.

Creating a Docker-Compose for al your running containers? Maybe you will also find this post useful .

I also want to dive into this one day.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I am also trying to setup a Z-wave USB dongle and am getting stuck after following the same steps as...
Replies
1
Views
1,030
Macvlan. The reason I choose it is because of you @Telos, you pointed out that tutorial in an old thread...
Replies
7
Views
10,511
Keep in mind that my conribution is from a GTX 1080 Ti overclocked and is worth 250+W ... when the NAS is...
Replies
147
Views
17,420
I can’t find any option to restore just the settings. 1710356648 Phew, managed to fix it. Within the...
Replies
4
Views
390
Good to hear. Deluge has not been updated for almost two years now as an app, nevertheless. But it gives...
Replies
12
Views
958
  • Question
Open an issue on that GitHub page. The developers will be glad to assist. OP has posted two threads on...
Replies
5
Views
962
I'm happy with email notifications but in v0.3.3 of dockcheck the author added apprise notifications...
Replies
4
Views
1,041

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top