I installed hassio in a docker, i love home assistant but i’m stuck with forwarding devices.
My problem is i got 2 usb dongles (zigbee and zwave)
The problem i got is that, if i use in the config file /dev/ttyACM0 and /dev/ttyACM1
When i reboot sometimes the usb dongles exchange number so it doesn’t work anymore.
So i wanna use /dev/serial/by-id/ to be sure that it can’t change
From my research i understood that i should use docker-compose file to set what and how devices are forward to the docker.
But i don’t understood how to start with this.
Should I just create the file and it will automagically work ?
If so can i just define the home assistant config ? or i need to define every addons ?
I’m afraid of breaking my installation with bad configuration.
So how can I easily forward devices to home assistant, without breaking anything ?
I dont use hass.io but I do use docker compose and serial id. All I needed to do was pass the serial id folder location though to the docker container. This is the hass part of my compose file.
I don’t use hassio directly i also use docker but without the docker compose and that’s my problem i don’t understand how to start with docker compose.
the config you gave me, should I just copy it in a docker-compose.yaml file and that’s it ? (i don’t have this file)
can i get the config used right now ? (i guess it’s the default one but not sure)
I used two guides to help me to understand how to use Docker compose DigitalOcean and smart home beginner. Have a read through both of them and you will be up and running in no time.
Cool didn’t know that (glad to avoid docker compose if i don’t need to)
so i can just had --devices=/dev/serial/by-id/*** to the command ?
but can you tell me where is that file ?
There is a school of thought in the very large clustering situations (FAANG+M -type companies, Lyft, Indeed, etc) that use a “Gitops” mentality: the config is checked into version-control as much as possible.
The non-obvious benefit of docker-compose is that you’ve got your complete config to launch the docker container in one place. In 6 months when you’ve forgotten the config (or in my case, 2 weeks) you may need to go digging for it; me, I just re-run the “docker-compose up -d”.
Version-controlling it means “oh, crap, what did I break? revert to yesterday”.
You don’t need to explain much to anyone, it’s just “yeah, I use docker-compose. the compose file is version-controlled to catch my changes”. The skills you build doing this convey elsewhere. It’s good and common practice.
… also, like @michaelmcarthur above, if someone else needs help, you have the current config right there, and can help others.
Send me a PM if you want more, I’ve kinda distracted this channel a bit (sorry).
… but go with the “docker-compose”. Edit the example above to suit your environment, and kick it off. If you’re unsure, post your config here, or to me in a PM, I’ll build you one if it helps you get started.
Thank you
in that case i need to confirm something:
with docker compose do you need to manually configure every new addons ?
that’s the reason i’m kind of afraid of docker compose because if that’s mean i can’t install addons from hassio anymore it’s a big step back ?
and the maintenance of docker-compose vs nothing to do because the addons interface manage it for you … i feel like i’m getting into something more complicate.
I will do it if i need to, but i’ll be glad to keep my system as easy as possible (easy to operate and to maintain)
you’re correct: the “docker-compose” route is really the non-hassio route. The “add-ons” are all orchestrated by the hassio-supervisor, so non-hassio is non-addons.
“docker-compose” is really “better than remembering a complex ‘docker run -d’ command”; running a docker command also gets you homeassistant, not hassio, so no add-ons.
The best-of-both-worlds would be a docker-compose config to run the hassio-supervisor, using it to pull and install your first hassio image. Essentially, the hassio-supervisor becomes your docker-manager, replacing docker-compose, but I’m sure you could use a docker-compose argument to record your commands for hassio-supervisor, if you knew them. THAT is the direction I’d prefer to go personally, but when I have time to investigate.
Yep sorry about that but if you follow along the code, you see the home assistant docker container is already privileged which means it should see every device connected.
yes home assistant see the device but not the /dev/serial/by-id/ folder only the device directly as /dev/ttyACM0
my problem is similar as :
specially :
so do you think the solution could be to open a feature request ? or maybe add :
str(self.sys_config.path_extern_share):
{‘bind’: ‘/dev/serial/by-id’, ‘mode’: ‘rw’},
to homeassistant.py at line 74 ?
Hey Micheal, thanks for posting, I’ve been searching on how to do that myself.
Would you mind posting a few examples of how you have this configured in your configuration.yaml file?
is it just as easy as entering:
device: /dev/serial/by-id/the_name-of_your_device
Thanks
it finally works…
the crazy parts is that i just tried again and now it knows about /dev/serial/by-id
i now have the supervisor in version 143 so i guess it’s fixed in that version