Error rfxcom

HASS gives me the next error:

2018-02-25 19:52:53 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall cover.open_cover: entity_id=['cover.rolluik']>
Traceback (most recent call last):
  File "/root/.homeassistant/deps/lib/python3.6/site-packages/serial/serialposix.py", line 537, in write
    n = os.write(self.fd, d)
OSError: [Errno 5] Input/output error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/core.py", line 1010, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/cover/__init__.py", line 172, in async_handle_cover_service
    yield from getattr(cover, method['method'])(**params)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/cover/rfxtrx.py", line 72, in open_cover
    self._send_command("roll_up")
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/rfxtrx.py", line 390, in _send_command
    self._event.device.send_open(rfx_object.transport)
  File "/root/.homeassistant/deps/lib/python3.6/site-packages/RFXtrx/__init__.py", line 148, in send_open
    transport.send(pkt.data)
  File "/root/.homeassistant/deps/lib/python3.6/site-packages/RFXtrx/__init__.py", line 640, in send
    self.serial.write(pkt)
  File "/root/.homeassistant/deps/lib/python3.6/site-packages/serial/serialposix.py", line 571, in write
    raise SerialException('write failed: {}'.format(e))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

When i restart HASS the problem is gone but it comes everytime back…
Before version 0.63 i dont have any issues.

1 Like

looks like it’s failing to write to the device. Maybe the device is momentarily losing connection?

I try it on a other pc and i have the same problem.
I can change the USB hub and cable but it is strange that everything works after a reboot .
But a couple of hours later i have this problem.

This a windows PC? Do you have a setting to keep the usb ports powered when entering sleep/hibernation?

no the first one was a odroid with ubuntu and the second one a pc with debian.
Could it be a problem with python?

Could be, but I would be suspect of hardware before software. Especially USB. USB has been a thorn in my side in the past, but I typically deal with it on windows platforms. USB has a tendency to disconnect and power off based on OS settings. When the io error occurs, can you reach it from another software package outside HA?

Hi

Same here with an odroid C2 with the HASSIO Image for Odroid C2 (with an updated HomeAssistant 115.X).
I have to restart often Home Assistant for RFXCOM to work again.

Had the same with my ubuntu 20.04 install. I disabled usb power suspend and it seems to be working fine now, had no more errors.

1 Like

Hi,

Someone already tried to disabled the usb power autosuspend of the Odroid C2 with a HassIO OS ?