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. Unable to connect to /dev/ttyUSB0 [Solved]

Unable to connect to /dev/ttyUSB0 [Solved]

Scheduled Pinned Locked Moved Home Assistant
21 Posts 6 Posters 8.8k Views 5 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.
  • David PinnockD Offline
    David PinnockD Offline
    David Pinnock
    wrote on last edited by
    #3

    Thanks @gohan !! Another google about accessing usb and found some detail about adding to the dialout group. So I did this:

    sudo adduser homeassistant dialout

    It doesn't work unless you reboot but its now connecting to the usb!! I'm getting other errors about my sensors now but this is progress at least! Thanks :)

    K 1 Reply Last reply
    1
    • David PinnockD David Pinnock

      Thanks @gohan !! Another google about accessing usb and found some detail about adding to the dialout group. So I did this:

      sudo adduser homeassistant dialout

      It doesn't work unless you reboot but its now connecting to the usb!! I'm getting other errors about my sensors now but this is progress at least! Thanks :)

      K Offline
      K Offline
      kobipes
      wrote on last edited by
      #4

      @david-pinnock

      Did you solved it ? What did you do ? I have the same problem and I'm frustrated

      mfalkviddM 1 Reply Last reply
      0
      • K kobipes

        @david-pinnock

        Did you solved it ? What did you do ? I have the same problem and I'm frustrated

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

        @kobipes doesn't his latest post describe exactly what he did?

        K 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @kobipes doesn't his latest post describe exactly what he did?

          K Offline
          K Offline
          kobipes
          wrote on last edited by
          #6

          @mfalkvidd
          Actually he did but under Hssio the "sudo" keyword is not acknowledged. Tried without this 'super user do' keyword but nothing

          nitroburnN 2 Replies Last reply
          1
          • K kobipes

            @mfalkvidd
            Actually he did but under Hssio the "sudo" keyword is not acknowledged. Tried without this 'super user do' keyword but nothing

            nitroburnN Offline
            nitroburnN Offline
            nitroburn
            wrote on last edited by
            #7
            This post is deleted!
            1 Reply Last reply
            0
            • K kobipes

              @mfalkvidd
              Actually he did but under Hssio the "sudo" keyword is not acknowledged. Tried without this 'super user do' keyword but nothing

              nitroburnN Offline
              nitroburnN Offline
              nitroburn
              wrote on last edited by
              #8

              @kobipes said in Unable to connect to /dev/ttyUSB0 [Solved]:

              @mfalkvidd
              Actually he did but under Hssio the "sudo" keyword is not acknowledged. Tried without this 'super user do' keyword but nothing

              Hassio is different.

              1. Install SSH/Console addon (I don't remember which addon I used, I think both the console and ssh server worked)
              2. Connect via ssh client or using the addon you chose as root.
              3. Type 'hassio help' in the console
              4. One of the bountiful commands you should have seen listed, 'hassio host hardware', lists available hardware and what /dev/ they're under
              5. If you don't see the device listed or no idea which one it is, unplug run the command again plug in and repeat. Look for the item that disappears and returns.

              If smashing face onto keyboard at this point, check out the 'dmesg | grep tty' or 'dmesg | grep usb' and look for your device. If you don't see it after running either of those commands, proceed to start a fire in your immediate surroundings.

              1. By now you should have figured out what /dev/* your whatever is plugged into. If you haven't been consumed by the fire yet and know which /dev/ path your usb whateverthingy is under from dmesg, the magic fix is, in the console run:
              curl -d '{"devices": ["ttyAMA0"]}' http://hassio/homeassistant/options
              

              replace the ttyAMA0 with your device you want to have hassio make sweet bit-by-bit usb love with.

              Source: Google.com

              K 1 Reply Last reply
              2
              • K Offline
                K Offline
                kobipes
                wrote on last edited by
                #9
                This post is deleted!
                1 Reply Last reply
                0
                • nitroburnN nitroburn

                  @kobipes said in Unable to connect to /dev/ttyUSB0 [Solved]:

                  @mfalkvidd
                  Actually he did but under Hssio the "sudo" keyword is not acknowledged. Tried without this 'super user do' keyword but nothing

                  Hassio is different.

                  1. Install SSH/Console addon (I don't remember which addon I used, I think both the console and ssh server worked)
                  2. Connect via ssh client or using the addon you chose as root.
                  3. Type 'hassio help' in the console
                  4. One of the bountiful commands you should have seen listed, 'hassio host hardware', lists available hardware and what /dev/ they're under
                  5. If you don't see the device listed or no idea which one it is, unplug run the command again plug in and repeat. Look for the item that disappears and returns.

                  If smashing face onto keyboard at this point, check out the 'dmesg | grep tty' or 'dmesg | grep usb' and look for your device. If you don't see it after running either of those commands, proceed to start a fire in your immediate surroundings.

                  1. By now you should have figured out what /dev/* your whatever is plugged into. If you haven't been consumed by the fire yet and know which /dev/ path your usb whateverthingy is under from dmesg, the magic fix is, in the console run:
                  curl -d '{"devices": ["ttyAMA0"]}' http://hassio/homeassistant/options
                  

                  replace the ttyAMA0 with your device you want to have hassio make sweet bit-by-bit usb love with.

                  Source: Google.com

                  K Offline
                  K Offline
                  kobipes
                  wrote on last edited by kobipes
                  #10

                  @nitroburn thank for the detailed explanation but already tried what you suggested without success. After typing
                  'hassio host hardware' I've got : "Error decoding json invalid character ':' after top-level value: 404: Not Foundc"

                  0_1524427758321_ffe651db-b43a-49ab-9302-ead99d7a49b5-image.png

                  also tried what you suggest with "dmesg | grep usb" and got :

                  0_1524427942452_9c9d3feb-2725-4bb0-96aa-b23d4f948777-image.png

                  as you can see, the usb port is : ttyUSB0 (exactly as typed in the attached configured file - see below) , so why the heck am I getting error in the config file ?! Where am I wrong ??

                  This is the config file (written according to [link text](https://www.home-assistant.io/components/mysensors/ guidance) :

                  0_1524428296671_6948ae83-14d3-4dbe-9cfa-78fb96a0bd27-image.png

                  but I still get this error again and again :
                  0_1524428452720_f845e667-d2b7-4e17-8b10-f1260a7edec1-image.png

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kobipes
                    wrote on last edited by kobipes
                    #11

                    googling of this problem (same error message) brought me to this link : link text

                    but I can't see what am I doing different ? Does anybody have a clue ?

                    1 Reply Last reply
                    0
                    • gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #12

                      Don't you have a spare esp8266 and make an ethernet gateway? At least to get the mysensors network working

                      K 1 Reply Last reply
                      0
                      • gohanG gohan

                        Don't you have a spare esp8266 and make an ethernet gateway? At least to get the mysensors network working

                        K Offline
                        K Offline
                        kobipes
                        wrote on last edited by kobipes
                        #13

                        @gohan Actually I have the ESP8266-12 and I'll give it a try also (at the same time, ordered the WizNET (W5100) Ethernet module and the ENC28J60 Ethernet module but it will take time until I'll get it) , just wanted to solve the problem with the serial gateway ... :neutral_face:

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          kobipes
                          wrote on last edited by kobipes
                          #14

                          @gohan I thought that the esp8266 may be just a replacement to the WizNET (W5100) or the ENC28J60 (suggested in the mysensors instructions to built Ethernet / MQTT gateways). But from what I understand, upon your link you gave me, I don't see the nrf24 module connected to the ESP8266-12 , but the ESP8266-12 module solely.

                          Note that I need the nrf24 to be a part of the Ethernet gateway in order to be able to communicate with the nodes

                          1 Reply Last reply
                          0
                          • gohanG Offline
                            gohanG Offline
                            gohan
                            Mod
                            wrote on last edited by
                            #15

                            What link? BTW look at the "connecting the radio" page, you will see how to wire the radio on all arduino boards

                            K 1 Reply Last reply
                            0
                            • gohanG gohan

                              What link? BTW look at the "connecting the radio" page, you will see how to wire the radio on all arduino boards

                              K Offline
                              K Offline
                              kobipes
                              wrote on last edited by kobipes
                              #16

                              @gohan this : link text.
                              I know how to connect the nrf to the arduino board but I don't know how to connect the esp8266-12 with the nrf and the arduino (it does not explained in the link).

                              1 Reply Last reply
                              0
                              • gohanG Offline
                                gohanG Offline
                                gohan
                                Mod
                                wrote on last edited by
                                #17

                                you don't need the arduino board on the gateway, the ESP8266 will be running the sketch and will use the NRF24 radio for the mysensors network and the wifi interface to talk to the controller

                                K 1 Reply Last reply
                                0
                                • gohanG gohan

                                  you don't need the arduino board on the gateway, the ESP8266 will be running the sketch and will use the NRF24 radio for the mysensors network and the wifi interface to talk to the controller

                                  K Offline
                                  K Offline
                                  kobipes
                                  wrote on last edited by
                                  #18

                                  @gohan OK I see . I'll try it today. Thanks

                                  1 Reply Last reply
                                  0
                                  • K Offline
                                    K Offline
                                    kobipes
                                    wrote on last edited by
                                    #19
                                    This post is deleted!
                                    1 Reply Last reply
                                    0
                                    • K Offline
                                      K Offline
                                      kobipes
                                      wrote on last edited by
                                      #20

                                      Today, when I connected the arduino through the usb port in the raspberry pi 3, then entered the /dev directory, I saw this :
                                      0_1524933413755_a34f22b8-7f2e-40b3-9c1f-e72f6a410ea7-image.png

                                      Isn't that weird ? what is the "p" is doing there between the tty and the USB0 ? also tried accessing this "ttypUSB0" but still get an error

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        Rincewind
                                        wrote on last edited by
                                        #21

                                        I am having the exact same issue as kobipes. I am also on hass.io and I have not been able to resolve it. I am using an Arduino Nano with the RF24l01 connected to a Pi using USB (ttyUSB0). No go, configuration errors as stated from your post.

                                        However when I use an Arduino Uno on ttyACM i managed to get it working as long as you cold boot the Pi during config changes.

                                        Any help will be really appreciated!

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


                                        17

                                        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