Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/serial in hassio #485

Closed
Baseje opened this issue May 29, 2018 · 11 comments
Closed

/dev/serial in hassio #485

Baseje opened this issue May 29, 2018 · 11 comments

Comments

@Baseje
Copy link

Baseje commented May 29, 2018

I receive the following error in hassio;
No such file or directory: ‘/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1YUV6ZC-if00-port0’

Also for my z-wave stick i receive the error.

On my docker host i see the folder /dev/serial/by-id/…
But in my docker container (Home assistant) there is no folder /dev/serial/by-id/

Please help!

@Baseje
Copy link
Author

Baseje commented May 30, 2018

See also; home-assistant/core#14680

@balloob
Copy link
Member

balloob commented May 30, 2018

The issue you linked is for the Dockerfile of Home Assistant. Hassio has it's own Dockerfile.

@frankhommers
Copy link

Yeah I would like a feature to add my own user specified /dev/* entries.

@michaelarnauts
Copy link

michaelarnauts commented Jun 1, 2018

The default hass Dockerfile doesn't do anything to map files of /dev of the host to the docker container. If you need access to a specific device, you need to map it through a volume. Typically, this is configured in a docker-compose.yml file for your setup.

I guess you don't have a volume for /dev/serial/by-id. By looking at the hass.io code really quick, it seems that hass.io manages this itself. I don't see how a update of the container os could change this.

I guess the related code is here:
-> https://github.com/home-assistant/hassio/blob/dev/hassio/docker/addon.py#L93

Actually, this seems more likely: https://github.com/home-assistant/hassio/blob/dev/hassio/docker/homeassistant.py#L35

@notoriousbdg
Copy link

It looks like home-assistant/hassio-build@5fb60ff might be the culprit.

@Baseje
Copy link
Author

Baseje commented Jun 4, 2018

I've fixed this by another container by adding the following lines in the docker-compose file;

devices:
- /dev/ttyUSB0:/dev/ttyUSB0
- /dev/serial/by-id/usb-FTDI_P1_Converter_Cable_P11RSL4D-if00-port0

I'm not able to edit the docker-compose file because its managed by the hassio.supervisor container i guess.

Maybe you can check if this is a possible solution for hassio and the /dev/serial folder

@pvizeli
Copy link
Member

pvizeli commented Jun 8, 2018

We can read the udev handling for home-assistant...

@Baseje
Copy link
Author

Baseje commented Jun 10, 2018

So it looks like an Hassio problem, please check!

@Baseje
Copy link
Author

Baseje commented Jun 25, 2018

Fixed in 0.72!

@Baseje Baseje closed this as completed Aug 13, 2018
@rghiglianovich
Copy link

rghiglianovich commented Nov 8, 2018

Actually it doesn't seem fixed , at least in 0.81.6
OR there is another issue with similar behavior:

I can see, via GUI hass.io System / hardware or via dmesg or via core-ssh:/dev# hassio hw info, a /dev/ttyACM0

but nothing appears under /dev/tty*
example:


core-ssh:/dev# hassio hw info
{
    "result": "ok",
    "data": {
        "serial": [
            "/dev/ttyAMA0",
            "/dev/ttyACM0"
        ],
        "input": [],
        "disk": [],
        "gpio": [
            "gpiochip0",
            "gpiochip128"
        ],
        "audio": {
            "0": {
                "name": "bcm2835_alsa - bcm2835 ALSA",
                "type": "ALSA",
                "devices": [
                    {
                        "chan_id": "0",
                        "chan_type": "digital audio playback"
                    },
                    {
                        "chan_id": "1",
                        "chan_type": "digital audio playback"
                    }
                ]
            }
        }
    }
}
core-ssh:/dev# ls -al
total 470
drwxr-xr-x    5 root     root           340 Nov  8 21:47 .
drwxr-xr-x    1 root     root          4096 Nov  8 21:47 ..
lrwxrwxrwx    1 root     root            13 Nov  8 21:47 fd -> /proc/self/fd
crw-rw-rw-    1 root     root        1,   7 Nov  8 21:47 full
-rwxr-xr-x    1 root     root        476800 Oct 27 18:33 init
drwxrwxrwt    2 root     root            40 Nov  8 21:47 mqueue
crw-rw-rw-    1 root     root        1,   3 Nov  8 21:47 null
lrwxrwxrwx    1 root     root             8 Nov  8 21:47 ptmx -> pts/ptmx
drwxr-xr-x    2 root     root             0 Nov  8 21:47 pts
crw-rw-rw-    1 root     root        1,   8 Nov  8 21:47 random
drwxrwxrwt    2 root     root            40 Nov  8 21:42 shm
lrwxrwxrwx    1 root     root            15 Nov  8 21:47 stderr -> /proc/self/fd/2
lrwxrwxrwx    1 root     root            15 Nov  8 21:47 stdin -> /proc/self/fd/0
lrwxrwxrwx    1 root     root            15 Nov  8 21:47 stdout -> /proc/self/fd/1
crw-rw-rw-    1 root     root        5,   0 Nov  8 21:47 tty
crw-rw-rw-    1 root     root        1,   9 Nov  8 21:47 urandom
crw-rw-rw-    1 root     root        1,   5 Nov  8 21:47 zero

@frenck
Copy link
Member

frenck commented Nov 19, 2018

@korenanzo Please don't comment on long-closed issues, please open a new one if the problem still exists (you can always refer to the older issues).

Reasoning: Since this issue is already closed for months, chances are, this is unrelated to this issue.

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants