Hi squirtbrnr, I really appreciate your help. It seems a privileges issue, but I cannot find the checkbox you are indicating. I am using docker app form synology with a container for HA but, it seems I cannot change anything from the container or I don’t know where to look at. I mean, this is my conatiner GUI:
@Tinkerer Won’t work, he has to somehow pass it through to the container. On synology it looks like executing in “high privilege” is the same as Docker’s -- privileged option.
look at what marthocoo posted. you have to stop the container then go into the edit options to find the checkbox.
It is a permissions issue. you can solve it one of two ways: execute the container with high privileges or issue the following command on your Synology over SSH: sudo chmod 777 /dev/ttyACM0
The downside is every time you reboot your Synology or unplug the Z Wave stick and plug it back in (or it changes to /dev/ttyACM1) you have to re-run the command over SSH. That’s why I just execute the container with high privileges.
OK, I’ve tried it but I didn’t have a homeassistant group created, only administrators or users group. So I have tried with users but it didn’t do the trick (after stopping and restarting).
So I’ll try what squirtbrnr is saying, Thanks!
As my HA is almost new, I think I can try to create a new container from the latest software version image and thus creating it new with the high privilege option. I’ll report how it went! Thanks again!!
Thank guys!! Problem solved!!. And I didn’t have to launch another container because when stopped you can access to ‘edit’ and change privileges to high and that did the trick!! My zwave stick is now up and running. Thank you marthocoo, squirtbrnr and tinkerer even if I thought it was permissions related, I could have been DAYS to solve it, appreciate it sincerely!.
For what it is worth, I created the following docker-compose.yml file
(I use z-wave stick AND the NAS built-in DDNS AND the NAS built in Synology SSL certificate created by “Let’s Encrypt”)
I then SSH into my NAS, and changed directory to where this file is stored, and created it with:
sudo docker-compose up -d
in my configuration.yaml
zwave:
usb_path: /dev/ttyACM0
#Using the certifiate generated by NAS > Control Panel > Security > Certificate > Let's Encrypt
#In combination with DuckDNS NAS > Control Panel > External Access > DDNS > Customize
http:
# Secrets are defined in the file secrets.yaml
api_password: !secret http_password
server_port: 8123
# Uncomment this if you are using SSL/isTLS, running in Docker container, etc.
base_url: !secret fqdn
ssl_certificate: /certificate/fullchain.pem
ssl_key: /certificate/privkey.pem
cors_allowed_origins:
- https://google.com
- https://www.home-assistant.io
trusted_networks:
- 127.0.0.1
ip_ban_enabled: True
login_attempts_threshold: 5
Newbie trying to crash the party here…any help would be very much appreciated.
I’m in a similar boat of trying to get a brand new Aeotec Z-Stick Gen5 running on a DS918+. I’ve tried this a couple of times on my own and to simplify the trouble shooting I’ve burned it all down and have a clean Docker install, and I’m only trying to get the Z-stick working. Here’s what I’ve done and my results so far:
“Execute container using high privilege” was (and still is) checked prior to launching
Add the following to my configuration.yaml file: zwave: usb_path: /dev/ttyAMC0
Launch Home assistant and I get the following error:
“Invalid Config
The following components and platforms could not be set up:
*usb_path
*zwave
Please check your config”
If I SSH into my home assistant via sudo docker exec -it home_assistant_1 bash
…and then enter (as described by @Tinkerer ): ls -al /dev/ttyACM0
…I get the following: crw------- 1 root root 166, 0 Aug 20 16:13 /dev/ttyACM0
If from SSH I enter (as described by @marthocoo) : --device=/dev/ttyACM0
…I get: bash: --device=/dev/ttyACM0: No such file or directory
Any idea what I’m doing wrong? (or if I’ve just completely missed a setup tutorial somewhere?)
Should I be trying to use a docker-compose.yml file described by @shark711 ? (I have no idea how to use those, any pointers on where to start?
The command --device=/dev/ttyACM0 is part of the docker run command you issue from a ssh login into the NAS, not the docker container. So the pseudo full command would be something like:
sudo docker run --name=homeassistant -privileged --device=/dev/ttyACM0 homeassistant/home-assistant:latest
You’ll also have to link the config directory and any other folders as well using the -v switch
(to give full credit your post directed my bumbling a little better and I finally found Phil Hawthorne’s guide)
So, after doing some more digging/basic learning I have one more question: Is it true that I cannot add a device to an existing docker container? I will always need to delete and launch a new container in order to adjust what devices Home Assistant has access to?
yes and no. you can only attach a hardware device using the --device= command from a command line. the gui version of docker does not allow it, nor show it attached once it is running. If you use sudo docker create followed by sudo docker run <container_name> then you don’t need to add the -itd switch to the command and you can take the container down/up without having to recreate it every time. Also, privileged mode allows the container root access to system level stuff like /dev which can be used in conjunction with adding the device to the container.
Hi, afraid I am rather blank at this, but I am trying to set up Home Assistant on my Synology NAS and using an Aeotec Z-Wave stick. I have tried both Phil Hawthorne’s instructions (but that fails since I get the message that I don’t have permissions to create the homeassistant/config folder, even though logged on as admin) and running the setup from Docker like taggr, but getting the same issue when trying to add the Aeotec stick by modifying the configuration file, which I undertand is not a feasible approach. Feeling rather flat on a Friday night from not figuring this out. Any advice?
Do you have that set up in a docker? If you do, you need to “mount” the Local USB device in the docker list of devices. I don’t think you can do that from the Synology GUI (I checked mine and didn’t see it anywhere in there), so you’d need to get ssh access to execute docker-compose
If you run that command, it will check the present working directory for a docker-compose.yml file, so make sure you create that first.
This is what mine looks like, notice the devices section. In the volumes you only need the config line, i.e. first line in there.
This will automatically download the homeassistant/home-assistant image and configure and start it up. docker-compose.yml:
Make sure you have SSH access
In DSM Homepage > Control Panel > Terminal & SNMP > Terminal (tab)
[✓] Enable SSH Service
If you on Linux/Mac you can use the native ssh command, or using something like PuTTY if you on Windows
Login with you DSM admin user and password
Then execute
sudo docker-compose up -d
After home-assistant starts up, you then only need to go to:
Configuration > Integration > Z-Wave’s CONFIGURE
The above docker-compose.xml file mounts it to /zwaveusbstick, which is the default location the home-assistant integration checks. You no longer need to add it in configuration,yaml file
What you try from the front end is export the config file, modify it, and import it back in. I’ve not tried this as this seem like even more effort, but worth a try if you not comfortable with using SSH.
In you DSM homepage/GUI: Docker > Container > Select your container > Click Settings > Export > Export this to somewhere where you can edit the file
Then Modify your JSON
add the following in the root