Hass.io 0.70 - RFXTRX Error

I’m just in the process of downgrading my config to 0.69.1 because I just updated to 0.70 and now I’m getting a RFXTRX error:

018-05-29 00:39:07 ERROR (MainThread) [homeassistant.setup] Error during setup of component rfxtrx
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/serial/serialposix.py", line 244, in open
    self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11I6NWQ-if00-port0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/RFXtrx/__init__.py", line 606, in connect
    self.serial = serial.Serial(self.port, 38400, timeout=0.1)
  File "/usr/lib/python3.6/site-packages/serial/serialutil.py", line 182, in __init__
    self.open()
  File "/usr/lib/python3.6/site-packages/serial/serialposix.py", line 247, in open
    raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 2] could not open port /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11I6NWQ-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A11I6NWQ-if00-port0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 146, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/rfxtrx.py", line 101, in setup
    rfx_object = rfxtrxmod.Connect(device, None, debug=debug)
  File "/usr/lib/python3.6/site-packages/RFXtrx/__init__.py", line 718, in __init__
    self.transport = transport_protocol(device, debug)
  File "/usr/lib/python3.6/site-packages/RFXtrx/__init__.py", line 601, in __init__
    self.connect()
  File "/usr/lib/python3.6/site-packages/RFXtrx/__init__.py", line 609, in connect
    port = glob.glob('/dev/serial/by-id/usb-RFXCOM_*-port0')[0]
IndexError: list index out of range
2018-05-29 00:39:07 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of light.rfxtrx. Setup failed for dependencies: rfxtrx
2018-05-29 00:39:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform light.rfxtrx: Could not setup all dependencies.
2018-05-29 00:39:07 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of switch.rfxtrx. Setup failed for dependencies: rfxtrx
2018-05-29 00:39:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.rfxtrx: Could not setup all dependencies.

Change rftxtrx in configuration.yaml:

rfxtrx:
device: /dev/ttyUSB0

1 Like

Oh! Cool, I’ll give this a try.
Was this a ‘breaking’ change that I missed in the release notes?

Also on my Home assistant container the folder; /dev/serial/by-id/ is gone.

Any idea how to fix?

Same issue for rflink
That is I can no longer see anything in /dev/serial on hass.io

Change rftxtrx in configuration.yaml:

rfxtrx:
device: /dev/ttyUSB0

Hi,

Have you tried this and know if it’s working?

Hi,

I can confirm that this is working by running hassio under Ubuntu 16.04

This isnt a solution for me,
I’ve multiple USB devices and after a reboot the number is variable
So sometimes its /dev/ttyUSB01 and another time its /dev/ttyUSB00…

I can also confirm that this work under Ubuntu server.
Someone should update the component site:

My RFxtrx433E transceiver have stopped working since update to >0.70. I don’t get any error sin log but all my 433MHz sensors have disappeared.

I have tried different ways to specify path in configuration.yaml. Could someone please tell me what command in putty I need to show the correct path to the RFXtrx?

I had a similar problem with RFLink to solve this I ssh’ed into HASSIO and ran:

hassio hw info

I got:

{
    "result": "ok",
    "data": {
        "serial": [
            "/dev/ttyACM0",
            "/dev/ttyAMA0"
        ],
        "input": [
            "HID 1710:8812"
        ],
        "disk": [],
        "gpio": [
            "gpiochip0",
            "gpiochip100"
        ],
        "audio": {
            "0": {
                "name": "bcm2835 - bcm2835 ALSA",
                "type": "ALSA",
                "devices": {
                    "0": "digital audio playback",
                    "1": "digital audio playback"
                }
            }
        }
    }
}

I used the serial paths as the PATH_TO_DEVICE in the config.

hopefully that will work for you.

1 Like