MySensors serial gateway, HA unable to connect

Hello,

Starting with the I’m still quite a noob with all this.
However the situation is like this:

I have one Arduino Nano node with DHT11 sensor attached to it. It communicates with NFR24L01+. The code is more or less from MySensors library.

I use a NFR24L01+ on the Rapsberry as serial Gateway (/dev/ttyMySensorsGateway) as said in here: https://www.mysensors.org/build/raspberry

My configuration.yaml is pretty simple. The default startup lines and then MySensors serial addittions on the bottom:
mysensors:
gateways:

  • device: ‘/dev/ttyMySensorsGateway’
    baud_rate: 115200
    optimistic: false
    persistence: false

The gateway seems to work fine nut when I launch ‘hass’ I get this:
INFO:mysensors.gateway_serial: Trying to connect to /dev/ttyMySensorsGateway
ERROR:mysensors.gateway_serial: Unable to connect to /dev/ttyMySensorsGateway

I followed the manual installation here:

Any help?

I don’t have a serial gateway, but the most common cause of this is the homeassistant user not being in the correct group to have permission to access the serial port.

I think the group it has to be in is dialout, but I’m not entirely sure. You can check which groups homeassistant is in with

pi@raspberrypi:~ 
$ id homeassistant 
uid=1001(homeassistant) gid=1001(homeassistant) groups=1001(homeassistant),29(audio),44(video),999(spi),998(i2c),997(gpio)
pi@raspberrypi:~ 
$ 

Thank you, the ownership of the serial was under root. I changed it to dialout and it seems this solved the problem.

1 Like