Core: Component: RF-Link - Doesn't work on latest HASS.IO

Created on 28 Sep 2017  路  8Comments  路  Source: home-assistant/core

Running the latest HASSIO release running on Raspberry PI 3

*Component/platform: RFLink *

Description of problem:
Attempting to connect my RF-LINK using the RF-LINK-plugin/component.

HASSIO detects the device, which can be seen in dmesg:

dmesg

[ 1590.999938] usb 1-1.5: new full-speed USB device number 4 using dwc_otg
[ 1591.114586] usb 1-1.5: New USB device found, idVendor=2341, idProduct=0242
[ 1591.114606] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 1591.114619] usb 1-1.5: Product: Genuino Mega 2560
[ 1591.114631] usb 1-1.5: Manufacturer: Arduino LLC (www.arduino.cc)
[ 1591.114643] usb 1-1.5: SerialNumber: 75435353035351B08281
[ 1591.152394] cdc_acm 1-1.5:1.0: ttyACM0: USB ACM device
[ 1591.159219] usbcore: registered new interface driver cdc_acm
[ 1591.159239] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

Also seen in the hassio host hardware query:

hassio host hardware

{
  "serial": [
    "/dev/ttyACM0"
  ],
  "input": [],
  "disk": [],
  "audio": {
    "0": {
      "name": "bcm2835 - bcm2835 ALSA",
      "type": "ALSA",
      "devices": {
        "0": "digital audio playback",
        "1": "digital audio playback"
      }
    }
  }
}

However, the /dev/serial/by-id/usb-id01234 directory (as described in the documentation) doesn't exist:

ls -la /dev/

drwxr-xr-x    5 root     root           340 Sep 28 15:37 .
drwxr-xr-x   48 root     root          4096 Sep 28 15:37 ..
lrwxrwxrwx    1 root     root            13 Sep 28 15:37 fd -> /proc/self/fd
crw-rw-rw-    1 root     root        1,   7 Sep 28 15:37 full
-rw-r--r--    1 root     root           580 Sep 28 15:49 kmsg
drwxrwxrwt    2 root     root            40 Sep 28 15:37 mqueue
crw-rw-rw-    1 root     root        1,   3 Sep 28 15:37 null
lrwxrwxrwx    1 root     root             8 Sep 28 15:37 ptmx -> pts/ptmx
drwxr-xr-x    2 root     root             0 Sep 28 15:37 pts
crw-rw-rw-    1 root     root        1,   8 Sep 28 15:37 random
drwxrwxrwt    2 root     root            40 Sep 28 15:37 shm
lrwxrwxrwx    1 root     root            15 Sep 28 15:37 stderr -> /proc/self/fd/2
lrwxrwxrwx    1 root     root            15 Sep 28 15:37 stdin -> /proc/self/fd/0
lrwxrwxrwx    1 root     root            15 Sep 28 15:37 stdout -> /proc/self/fd/1
crw-rw-rw-    1 root     root        5,   0 Sep 28 15:37 tty
crw-rw-rw-    1 root     root        1,   9 Sep 28 15:37 urandom
crw-rw-rw-    1 root     root        1,   5 Sep 28 15:37 zero

Expected:
The device should popup at /dev/serial/by-id/usb-id_____ as described in the documentation at https://home-assistant.io/components/rflink/

All 8 comments

when using hassio, your usb devices are redirected to /dev/tty... so in your configuration you can put /dev/ttyACM0

Awesome! So this is just a documentation error! :-)

I added the following lines to /config/configuration.yaml

rflink:
  port: /dev/ttyACM0

logger:
  default: error
  logs:
    rflink: debug
    homeassistant.components.rflink: debug

After a reboot, the log was populated with RF-Link entries, so I guess everything is ok :-)

2017-09-28 19:34:37 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
2017-09-28 19:34:37 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink
2017-09-28 19:34:37 DEBUG (MainThread) [rflink.protocol] connected
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] received data: 20;00;Nodo RadioFreque
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] received data: ncyLink - RFLink Gateway
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] received data: V1.1 - R47;
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] got packet: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R47;
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'unknown', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '47'}
2017-09-28 19:34:38 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'rflink', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '47'}
2017-09-28 19:34:38 DEBUG (MainThread) [homeassistant.components.rflink] event of type unknown: {'id': 'rflink', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '47'}
2017-09-28 19:34:38 DEBUG (MainThread) [homeassistant.components.rflink] unhandled event of type: unknown
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] received data: 20;01;Oregon
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] received data: TempHygro;ID=12850;TEMP=
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] received data: 007b;HUM=72;HSTATUS=3;BA
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] received data: T=OK;
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] got packet: 20;01;Oregon TempHygro;ID=12850;TEMP=007b;HUM=72;HSTATUS=3;BAT=OK;
2017-09-28 19:34:43 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'oregon temphygro', 'id': '12850', 'temperature': 12.3, 'temperature_unit': '掳C', 'humidity': 72, 'humidity_unit': '%', 'humidity_status': 'wet', 'battery': 'ok'}

I got the hint installing a Z-wave usb stick: https://home-assistant.io/hassio/zwave/

@aequitas perhaps should know about this.

This issue is not Rflink/HASS specific but more Serial/HASSIO specific. I think it might be best to reraise this issue on the Hassio repository: https://github.com/home-assistant/hassio

If you have multiple serial devices the approach of using a numbered instead if 'id' based serial device might cause things to break if after a reboot the devices are detected in a different order ('id' based are unique across reboots/installations).

FWIW, I'm using Hassio 0.64 for my configuration with the latest hass 0.54 and it's working fine with id's. Don't know which version you are running?

http://hassio.local:8123/hassio/advanced shows:

Supervisor
Version = 0.64
Beta channel = false
Latest available version = 0.64

Home Assistant
Current version = 0.54
Latest version = 0.54

Same versions here, I'm using the RPi3 images, maybe that might make a difference? I don't remember if I did anything special to make it work.

Closing since issue is with hassio serial device handling and original issue seems resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soldag picture soldag  路  143Comments

winterscar picture winterscar  路  251Comments

nodkan picture nodkan  路  161Comments

neotrunks picture neotrunks  路  169Comments

Ciqsky picture Ciqsky  路  129Comments