[SOLVED] RFLink and CC2531 usb stick not working together

Hi

I’m trying to have a CC2531 (zigbee2mqtt) and RFLink USB key to work together.

My config for zigbee2mqtt is

{
  "data_path": "/share/zigbee2mqtt",
  "homeassistant": true,
  "permit_join": false,
  "mqtt_base_topic": "zigbee2mqtt",
  "mqtt_server": "mqtt:/IP",
  "serial_port": "/dev/ttyACM0",
  "disable_led": true,
  "mqtt_user": "user",
  "mqtt_pass": "pass"
}

and this is the RFLink config

rflink:
  port: /dev/ttyACM1
  wait_for_ack: false

The RFLink does not work and this is the log

2019-01-21 19:21:17 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2019-01-21 19:21:17 ERROR (MainThread) [homeassistant.components.rflink] Error connecting to Rflink, reconnecting in 10
Traceback (most recent call last):
  File "/usr/local/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/ttyACM1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/rflink.py", line 228, in connect
    transport, protocol = await connection
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.6/site-packages/serial_asyncio/__init__.py", line 410, in create_serial_connection
    ser = serial.serial_for_url(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/serial/__init__.py", line 88, in serial_for_url
    instance.open()
  File "/usr/local/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/ttyACM1: [Errno 2] No such file or directory: '/dev/ttyACM1'
2019-01-21 19:21:27 WARNING (MainThread) [homeassistant.components.rflink] disconnected from Rflink, reconnecting
2019-01-21 19:21:27 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2019-01-21 19:21:27 ERROR (MainThread) [homeassistant.components.rflink] Error connecting to Rflink, reconnecting in 10
Traceback (most recent call last):
  File "/usr/local/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/ttyACM1'

Is there a way to let them work together?

Thanks

Do they work seperately?

I’ve tryied, and they work separately, I tried both on ttyACM0

Are you sure youve connected on port /dev/ttyACM1? Maybe it’s another port?

1 Like

I’ve a RPi3, how can I check the names of the four USB port?

Assuming you’re using HassIO, go to the “Hass.IO” screen, then choose “System” at the top, then under “Host system” click “Hardware”.

You should see a list of all connected devices there.

I have only the two USB sticks, CC2531 and RFLink and this is what I get

serial:

* /dev/ttyAMA0
* /dev/ttyACM0
* /dev/ttyACM1

That’s odd.

Some USB serial devices show up as more than one device though, such as combination Z-Wave and Zigbee sticks would show up as 2 serial ports.
I know the CC2531 shows up as a single port though.

You can try removing the CC2531, restarting HA, and see which device disappears from the device list, then reinsert and see what it shows up as.

In the meantime, I’ve inverted the configuration port, so I’ve assigned ttyACM0 to RFLink and ttyACM1 to CC2531 and now seems to work.

The positions of USB sticks connected to the RPi is the same, as it was the same when I was using only CC2531 with ttyACM0 and no RFLink.

Really strange.

Hi Woody,

I’m now experencing the same. Can you clarify: Wich port do you have the both devices connected? What settings did you provide for RF link and the cc2531?

Thanks in advance!

Hi @sholofly

What I did is to add first the RFLink and che which serial port show up (go to the “Hass.IO” screen, then choose “System” at the top, then under “Host system” click “Hardware”), in my case tty/ACM0, and I added to the configuration.yaml.
Rebooted, then added the CC2531 and did the same thing (before starting the Zigbee2Mqtt addon), check the serial port, in my case tty/ACM1, and then modify the config in the addon and start the addon.

1 Like

Thanks mate, it’s running!