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. Raspberry gateway cant communicate with Home assistant.

Raspberry gateway cant communicate with Home assistant.

Scheduled Pinned Locked Moved Home Assistant
7 Posts 2 Posters 1.3k Views 2 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.
  • B Offline
    B Offline
    badisensors
    wrote on last edited by
    #1

    Hi,
    I am running homeassistant in raspberry (manuall installataion on rasbian) and i had a serial usb gateway with arduino working fine with my first test node. I saw i could make gateway directly on raspberry so i decided to do it for more compact design. I built the raspberry gateway following these instructions https://www.mysensors.org/build/raspberry
    with configuration of serial port
    --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020
    All tests passed and communication from node to gateway established and working fine (i saw from debugging that node was sending values and gateway reaceiving the values. The problem is that Homeassistant cant open port ttyUSB020 with error:
    ''Unable to connect to /dev/ttyUSB020
    util/async_.py (ERROR)''
    How can i make the homeassistant to open port ,so get the data and show me the sensor on the UI?
    Thank you.

    mfalkviddM 1 Reply Last reply
    0
    • B badisensors

      Hi,
      I am running homeassistant in raspberry (manuall installataion on rasbian) and i had a serial usb gateway with arduino working fine with my first test node. I saw i could make gateway directly on raspberry so i decided to do it for more compact design. I built the raspberry gateway following these instructions https://www.mysensors.org/build/raspberry
      with configuration of serial port
      --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020
      All tests passed and communication from node to gateway established and working fine (i saw from debugging that node was sending values and gateway reaceiving the values. The problem is that Homeassistant cant open port ttyUSB020 with error:
      ''Unable to connect to /dev/ttyUSB020
      util/async_.py (ERROR)''
      How can i make the homeassistant to open port ,so get the data and show me the sensor on the UI?
      Thank you.

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

      Welcome to the forum @badisensors

      Which user and group is homeassistant running as? Maybe its group needs access by adding --my-serial-groupname=<GROUP>

      1 Reply Last reply
      0
      • B Offline
        B Offline
        badisensors
        wrote on last edited by badisensors
        #3

        Thank you very much. I followed the instructions here:
        https://www.home-assistant.io/docs/installation/raspberry-pi/
        to manually install the homeassistant so if i understood well the user is homeassistant and groups ''dialout'' and ''gpio'' added with command :
        $ sudo useradd -rm homeassistant -G dialout,gpio

        So do i need to build again the gateway adding --my-serial-groupname=<gpio> ?

        mfalkviddM 1 Reply Last reply
        0
        • B badisensors

          Thank you very much. I followed the instructions here:
          https://www.home-assistant.io/docs/installation/raspberry-pi/
          to manually install the homeassistant so if i understood well the user is homeassistant and groups ''dialout'' and ''gpio'' added with command :
          $ sudo useradd -rm homeassistant -G dialout,gpio

          So do i need to build again the gateway adding --my-serial-groupname=<gpio> ?

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

          @badisensors that sounds reasonable. Yes, start over from the ./configure step. Make sure you add all arguments to configure on one line.

          Edit: so the full configure command will be

          ./configure --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020 --my-serial-groupname=gpio
          
          1 Reply Last reply
          0
          • B Offline
            B Offline
            badisensors
            wrote on last edited by badisensors
            #5

            I did it and i made a reboot, but nothing changed. Again i see the error about port unable to connect in USB020 in homeassistant. Any other idea?

            PS: when i run the test gateway command i see:
            Dec 04 12:22:01 INFO Starting gateway...
            Dec 04 12:22:01 INFO Protocol version - 2.3.0
            Dec 04 12:22:01 DEBUG Serial port /dev/ttyUSB020 (115200 baud) created
            Dec 04 12:22:01 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,VER=2.3.0
            Dec 04 12:22:01 DEBUG TSF:LRT:OK
            Dec 04 12:22:01 DEBUG TSM:INIT
            Dec 04 12:22:01 DEBUG TSF:WUR:MS=0
            Dec 04 12:22:01 DEBUG TSM:INIT:TSP OK
            Dec 04 12:22:01 DEBUG TSM:INIT:GW MODE
            Dec 04 12:22:01 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
            Dec 04 12:22:01 DEBUG MCO:REG:NOT NEEDED
            Dec 04 12:22:01 DEBUG MCO:BGN:STP
            Dec 04 12:22:01 DEBUG MCO:BGN:INIT OK,TSP=1
            Dec 04 12:22:20 DEBUG TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:68
            Dec 04 12:22:55 NOTICE RF24: Recovered from a bad interrupt trigger.

            1 Reply Last reply
            0
            • B Offline
              B Offline
              badisensors
              wrote on last edited by badisensors
              #6

              I have something new. Homeassistant write now that node 1 is unknown in the info section and i still dont see the sensor in UI

              So the gateway not connected to USB020 port :
              2018-12-04 12:37:29 INFO (MainThread) [mysensors] Connected to Serial<id=0xb0c1cf30, open=True>(port='/dev/ttyUSB020', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False)

              and then:

              2018-12-04 12:37:44 WARNING (MainThread) [homeassistant.components.mysensors.gateway] Gateway /dev/ttyUSB020 not ready after 15.0 secs so continuing with setup

              and later:

              18-12-04 12:39:45 WARNING (MainThread) [mysensors] Node 1 is unknown

              1 Reply Last reply
              0
              • B Offline
                B Offline
                badisensors
                wrote on last edited by
                #7

                OK SOLVED!
                I reinstalled the last version of mysensors library and i uploaded again the sketch to arduino node and now i can see my light sensor!

                Thank you very much for your help.
                Best Regards

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


                20

                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