Closed ldrrp closed 4 years ago
Troubleshooting here https://community.openhab.org/t/docker-snapshot-not-reading-my-serial-ports/88974/5
What's the exact command you use for creating the container? Does the issue also occur when you use one of the other distributions such as APT or the .tar.gz?
I'm not sure if it's related - I recently had some issues with Openhab via Docker where Openhab couldn't hit /dev/ttyACM0
- but for reasons that weren't clear to me.
After some explore around the forum, there's rumor that the openhab
user must also be a member of the group tty
in addition to dialout
As a hack - did the following in my Dockerfile
(which uses of course FROM openhab:2.5.0
)
RUN sed -i '2iadduser openhab tty' start.sh
This adds the command adduser openhab tty
to the start.sh
file (inherited from this repo) at line 2
This has seemingly worked for me (inspiration from the current entrypoint.sh file)
I would have expected to see "permission denied" somewhere - but no such entry was in my logs.
If this same "hack" works for you, I'll submit a PR to the repo proper.
It was all working before, so I'm not sure if this is actually a root cause or just random luck.
Let me know!
Sorry for late reply. I kind of gave up on openhab and moved to home assistant in docker because it picks up the tty devices.
My setup, Open Media Vault 4.x latest, openhab docker latest. I tried with multiple dongles.
@mindstorms6 You can see from the forum the issues we faced. i did try multiple ways of giving group access. Even down to setting the host os to make the tty devices 777 permission on boot. I was even able to hit it from inside openhab docker image but openhab was not able to see it.
@wborn I no longer have openhab setup but the gui in omv was used to make it, with everything being able to be set from it including custom parameters.
Everything is the same for home assistant and it works so i wont be going any further with troubleshooting this for openhab as i need to get my home back up after switching from smartthings
I no longer have openhab setup but the gui in omv was used to make it
Most likely the issue is that the serial libraries cannot not be properly loaded on OpenMediaVault because it doesn't allow the serial libraries in the temp dir to be set as executable since it mounts filesystems using the noexec
flag.
There's also a YouTube video about how to remove the noexec
flag to fix similar issues when using Plex/OpenVPN with Docker on OMV.
See also:
@wborn you should claim the bounty https://www.bountysource.com/issues/86212593-unable-to-access-serial-ports
I am having no luck under docker
Unable to detect nortek dongle for either communication protocol. "Offline - Communication Error"
The dropdown under the controller/coordinator does not show any serial dropdown like i see on videos. Im guessing something is missing. I have read over and over all the docs with no luck. Here is what i tried
Logs: