Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Controllers
  3. Home Assistant
  4. Permissions of /dev/ttyUSBMySensorsGateway

Permissions of /dev/ttyUSBMySensorsGateway

Scheduled Pinned Locked Moved Home Assistant
5 Posts 3 Posters 1.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oneyb
    wrote on last edited by
    #1

    Dear All,
    thank you for all the work done and all the help in advance. I have a hassbian controller and gateway working nicely with MySensors 2.2. I am happy.

    One annoyance with the RPi gateway are the permissions of /dev/ttyUSBMySensorsGateway, which are by default owned by root and the root group. Modifying the permissions manually allows Home Assistant to happily read messages from the serial port until the next reboot (sudo chmod 777 /dev/ttyUSBMySensorsGateway).

    How do you manage this? Ideally I would add the user homeassistant to the dialout group but this would not help because the group of this serial port is root, if I got it right. Likely this is a problem of udev rules. But how do you manage it?

    I will put my setup on github as soon as it's cleaned up and tell you about it. Good stuff.

    Thanks for the advice.

    Cheers
    Brian

    mfalkviddM 1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      You can probably add a udev rule in /etc/udev/rules.d/

      1 Reply Last reply
      0
      • O oneyb

        Dear All,
        thank you for all the work done and all the help in advance. I have a hassbian controller and gateway working nicely with MySensors 2.2. I am happy.

        One annoyance with the RPi gateway are the permissions of /dev/ttyUSBMySensorsGateway, which are by default owned by root and the root group. Modifying the permissions manually allows Home Assistant to happily read messages from the serial port until the next reboot (sudo chmod 777 /dev/ttyUSBMySensorsGateway).

        How do you manage this? Ideally I would add the user homeassistant to the dialout group but this would not help because the group of this serial port is root, if I got it right. Likely this is a problem of udev rules. But how do you manage it?

        I will put my setup on github as soon as it's cleaned up and tell you about it. Good stuff.

        Thanks for the advice.

        Cheers
        Brian

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @oneyb you should be able to use

        --my-serial-groupname=<GROUP>
        

        in the configure command to allow access to a group that the Home assistant user is member of.

        1 Reply Last reply
        0
        • O Offline
          O Offline
          oneyb
          wrote on last edited by
          #4

          Thank you @hek and @mfalkvidd for the quick replies! I did not receive a notification, so I had no idea anyone had had a look.

          @mfalkvidd, indeed I like the group solution and just missed that option. Because I occasionally upload firmware with my Pi, I have the group 'dialout', which suits this purpose well. So, I tried it and it worked like a charm. I think that should be mentioned on the install page.

          For the record:

          ./configure  --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-serial-groupname=dialout
          make
          

          I try to keep everything documented how I do things (for myself). I have an ansible playbook in my RPi ansible management repository.

          For my configuration, please see:
          https://github.com/oneyb/rpi-embed-dev/blob/master/install-mysensors-gateway-raspberry.yaml

          Thanks again!

          mfalkviddM 1 Reply Last reply
          1
          • O oneyb

            Thank you @hek and @mfalkvidd for the quick replies! I did not receive a notification, so I had no idea anyone had had a look.

            @mfalkvidd, indeed I like the group solution and just missed that option. Because I occasionally upload firmware with my Pi, I have the group 'dialout', which suits this purpose well. So, I tried it and it worked like a charm. I think that should be mentioned on the install page.

            For the record:

            ./configure  --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSBMySensorsGateway --my-transport=nrf24 --my-rf24-irq-pin=15 --my-serial-groupname=dialout
            make
            

            I try to keep everything documented how I do things (for myself). I have an ansible playbook in my RPi ansible management repository.

            For my configuration, please see:
            https://github.com/oneyb/rpi-embed-dev/blob/master/install-mysensors-gateway-raspberry.yaml

            Thanks again!

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @oneyb thanks for your suggestion, and sorry for the late reply.

            I worry that the install page is large enough as it is. People tend to be afraid of long texts, and just ignore stuff if there is too much text. Therefore, we try to keep the guides as minimal as possible, but still covering the most common cases. The full documentation is still available for those who want to dive deeper. If you have any idea on how to handle it differently, you're very welcome to speak up.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            13

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular