home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.6k stars 30.76k forks source link

RFLink connection issue #6997

Closed Skelly82 closed 7 years ago

Skelly82 commented 7 years ago

Home Assistant release (hass --version): 0.42.2

Python release (python3 --version): Python 3.4.2

Component/platform: RFlink/HASS running on RPi3/latest Raspbian

Description of problem: When connecting to RFLink HASS throws exception: [homeassistant.components.rflink] unhandled event of type: unknown

I tested the RFLink connected to pc, and RFLink sees all mine 433MHz devices, but when connected to HASS the RFLink just sends the inital information and then stops.

Expected: HASS connects to RFLink correctly.

Problem-relevant configuration.yaml entries and steps to reproduce:

rflink:
  port:  /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_95530343335351E031C2-if00
switch:
  - platform: rflink
sensor:
  - platform: rflink
logger:
  default: error
  logs:
    rflink: debug
    homeassistant.components.rflink: debug
  1. Connect RFLink device (homemade Arduino Mega 2560 with FS1000A) to RPi
  2. Add RFLink settings to configuration.yaml
  3. Check log

Traceback (if applicable):

17-04-09 15:06:05 INFO (MainThread) [homeassistant.components.rflink] Initiating Rflink connection
17-04-09 15:06:06 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink
17-04-09 15:06:06 DEBUG (MainThread) [rflink.protocol] connected
17-04-09 15:06:07 DEBUG (MainThread) [rflink.protocol] received data: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R46;
17-04-09 15:06:07 DEBUG (MainThread) [rflink.protocol] got packet: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R46;
17-04-09 15:06:07 DEBUG (MainThread) [rflink.protocol] decoded packet: {'protocol': 'unknown', 'firmware': 'RFLink Gateway', 'node': 'gateway', 'hardware': 'Nodo RadioFrequencyLink', 'revision': '46', 'version': '1.1'}
17-04-09 15:06:07 DEBUG (MainThread) [rflink.protocol] got event: {'firmware': 'RFLink Gateway', 'hardware': 'Nodo RadioFrequencyLink', 'revision': '46', 'version': '1.1', 'id': 'rflink'}
17-04-09 15:06:07 DEBUG (MainThread) [homeassistant.components.rflink] event of type unknown: {'firmware': 'RFLink Gateway', 'hardware': 'Nodo RadioFrequencyLink', 'revision': '46', 'version': '1.1', 'id': 'rflink'}
17-04-09 15:06:07 DEBUG (MainThread) [homeassistant.components.rflink] unhandled event of type: unknown

Additional info:

genestealer commented 7 years ago

@aequitas FYI

JohanLeirnes commented 7 years ago

Also getting this:

17-04-19 12:53:33 INFO (MainThread) [homeassistant.components.rflink] Connected to Rflink
17-04-19 12:53:33 DEBUG (MainThread) [rflink.protocol] connected
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] received data: 20;00;Nodo RadioF
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] received data: requencyLink - RFLink Ga
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] received data: teway V1.1 - R46;
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] got packet: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R46;
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'unknown', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '46'}
17-04-19 12:53:34 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'rflink', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '46'}
17-04-19 12:53:34 DEBUG (MainThread) [homeassistant.components.rflink] event of type unknown: {'id': 'rflink', 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', 'version': '1.1', 'revision': '46'}
17-04-19 12:53:34 DEBUG (MainThread) [homeassistant.components.rflink] unhandled event of type: unknown
JohanLeirnes commented 7 years ago

But It is also continuing for me and saying that its registering new devices althou nothing is registering.

17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] received data: 20;01;Mertik_
17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] received data: GV60;ID=07ffff;SWITCH=13
17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] received data: ;CMD=F;
17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] got packet: 20;01;Mertik_GV60;ID=07ffff;SWITCH=13;CMD=F;
17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'mertik_gv60', 'id': '07ffff', 'switch': '13', 'command': 'f'}
17-04-19 12:53:47 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'mertik_gv60_07ffff_13', 'command': 'f'}
17-04-19 12:53:47 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'mertik_gv60_07ffff_13', 'command': 'f'}
17-04-19 12:53:47 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] received data: 20;02;
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] received data: Aster;ID=0ffc;SWITCH=01;
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] received data: CMD=ON;
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] got packet: 20;02;Aster;ID=0ffc;SWITCH=01;CMD=ON;
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'aster', 'id': '0ffc', 'switch': '01', 'command': 'on'}
17-04-19 12:53:48 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:53:48 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:53:48 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] received data: 20;03;Aste
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] received data: r;ID=0ffc;SWITCH=01;CMD=
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] received data: ON;
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] got packet: 20;03;Aster;ID=0ffc;SWITCH=01;CMD=ON;
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'aster', 'id': '0ffc', 'switch': '01', 'command': 'on'}
17-04-19 12:53:52 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:53:52 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:53:52 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] received data: 20;04;As
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] received data: ter;ID=0ffc;SWITCH=01;CM
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] received data: D=ON;
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] got packet: 20;04;Aster;ID=0ffc;SWITCH=01;CMD=ON;
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'aster', 'id': '0ffc', 'switch': '01', 'command': 'on'}
17-04-19 12:54:02 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:54:02 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:54:02 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
17-04-19 12:54:07 DEBUG (MainThread) [rflink.protocol] received data: 20;05;Aster;ID=0ffc;
17-04-19 12:54:07 DEBUG (MainThread) [rflink.protocol] received data: SWITCH=01;CMD=ON;
17-04-19 12:54:07 DEBUG (MainThread) [rflink.protocol] got packet: 20;05;Aster;ID=0ffc;SWITCH=01;CMD=ON;
17-04-19 12:54:07 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'aster', 'id': '0ffc', 'switch': '01', 'command': 'on'}
17-04-19 12:54:07 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:54:07 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'aster_0ffc_01', 'command': 'on'}
17-04-19 12:54:07 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] received data: 2
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] received data: 0;06;Mertik_GV60;ID=07ff
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] received data: ff;SWITCH=13;CMD=F;
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] got packet: 20;06;Mertik_GV60;ID=07ffff;SWITCH=13;CMD=F;
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'mertik_gv60', 'id': '07ffff', 'switch': '13', 'command': 'f'}
17-04-19 12:54:08 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'mertik_gv60_07ffff_13', 'command': 'f'}
17-04-19 12:54:08 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'mertik_gv60_07ffff_13', 'command': 'f'}
17-04-19 12:54:08 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
aequitas commented 7 years ago

Thanks for the extensive report. I currently see no problem on the Rflink side. The messages you are seeing are normal debug messages and no exceptions. unhandled event of type: unknown is normal for the first event coming from the Rflink device which is not actual event that can be used.

Devices should be added automatically to the all_lights group. Maybe this group is hidden in your configuration? Try going to the internal state list http://<your-ha>/dev-state and see if any of the devices are listed there.

JohanLeirnes commented 7 years ago

Nothing showing up, but adding them manually does map them and they then do work. Wonder why the auto-add does not work. Its not throwing any errors.

aequitas commented 7 years ago

Could you reduce the config to the absolute minimum required to run Rflink, test it and post the complete config and results?

balloobbot commented 7 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

balloobbot commented 7 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍