core: RFLink, UnicodeDecodeError: 'utf-8'

Home Assistant release with the issue: 0.93.1

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Component/platform: https://www.home-assistant.io/components/rflink/

Description of problem: RFLink does not work

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

rflink:
  port: /dev/ttyACM0

Traceback (if applicable):

Error doing job: Exception in callback <bound method SerialTransport._read_ready of SerialTransport(<uvloop.Loop running=True closed=False debug=False>, <rflink.protocol.RflinkProtocol object at 0x7f4f014a6b00>, Serial<id=0x7f4f01227390, open=True>(port='/dev/ttyACM0', baudrate=57600, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=False, dsrdtr=False))>
Traceback (most recent call last):
  File "uvloop/cbhandles.pyx", line 66, in uvloop.loop.Handle._run
  File "/usr/local/lib/python3.7/site-packages/serial_asyncio/__init__.py", line 106, in _read_ready
    self._protocol.data_received(data)
  File "/usr/local/lib/python3.7/site-packages/rflink/protocol.py", line 46, in data_received
    data = data.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x98 in position 2: invalid start byte

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 52 (23 by maintainers)

Commits related to this issue

Most upvoted comments

Could anyone having this problem with Ubuntu try the following and see if it helps?

Without the NetworkManager, you will be not able to control your host network setup over the UI. The modemmanager package will interfere with any Z-Wave or Zigbee stick and should be removed or disabled. Failure to do so will result in random failures of those integrations. For example you can disable with sudo systemctl disable ModemManager and remove with sudo apt-get purge modemmanager

Hi Guy’s,

I have a workaround for you thats fixed the RFLink issues for me. This workaround has been rock solid for me. Maybe it can help someone else too.

  1. install ser2net on ubuntu > apt-get install ser2net
  2. add the line “1234:raw:300:/dev/ttyACM1:57600 8DATABITS NONE 1STOPBIT” to /etc/ser2net.conf" Where 1234 is the port number (if port 1234 is not free change the port number to a free one). Also make sure that you put in the right serial port. In my case it is /dev/ttyACM1
  3. change the homeassistant rflink config to (see https://www.home-assistant.io/components/rflink/ for more information):

rflink: host: [IP-Address of the host where ser2net is running] port: 1234 wait_for_ack: false

  1. restart ser2net > sudo systemctl restart ser2net.service
  2. restart Home Assistant

I tried the same as @olskar but that didn’t work for me. Receiving the same error and the light doesn’t turn on or off.

My portainer install is a separate docker container not a hass.io addon.