Support for RFLink Gateway

It depends on your Linux version, if it has support for udev and if udev is installed/enabled/configured correctly. (for reference: https://wiki.archlinux.org/index.php/persistent_block_device_naming)

Thank you, did a new install but now with Hassbian and now it works.

Another question ( sorry, just starting to learn HA)
I have added

sensor:
  platform: rflink
  new_devices_group: "New Rflink Lights"

But in the logs it’s complaining with the following message.

17-03-28 08:59:07 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.rflink]: 
[new_devices_group] is an invalid option for [sensor.rflink]

I have the same problem as you, I have just start to play with HASS

And i also notice that the auto discovery don’t work.

I’m using the following code and auto discovery is working.

rflink:
  port: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0

sensor:
  platform: rflink
#   new_devices_group: "New"

light:
  platform: rflink
  device_defaults:
    fire_event: true
    signal_repetitions: 2
  devices:
    newkaku_0000c6c2_1:
      name: Living room

the device above is just for testing.
Though, after setting it up you don’t want auto discovery anymore since you don’t want to control the lights from others.
Maybe removing this would help.

discovery:

@passie @pixiandreas discovery is not related to rflink. A recent change removed support for the new_devices_group. Some mess still needs to be cleaned up for that.

Thsi is what i get in the log
I got some debug text but that all.

And from configfile:
# Discover some devices automatically
discovery:

But the device don’t show up in the GUI ?

17-03-29 18:16:14 INFO (MainThread) [homeassistant.components.http] Serving 
/api/12345678901234567890/lights to 192.168.6.144 (auth: True)
packet {'command': 'off', 'switch': '03', 'protocol': 'eurodomest', 'node': 'gateway', 'id': '0d509e'}
packet {'command': 'off', 'switch': '03', 'protocol': 'eurodomest', 'node': 'gateway', 'id': '0d509e'}
17-03-29 18:16:17 INFO (MainThread) [homeassistant.components.http] Serving 
/api/camera_proxy/camera.ffmpeg to 192.168.6.199 (auth: True)
17-03-29 18:16:18 INFO (Thread-1) [homeassistant.components.device_tracker.nmap_tracker] 
Scanning...
packet {'command': 'off', 'switch': '03', 'protocol': 'eurodomest', 'node': 'gateway', 'id': '0d509e'}

You can completely ignore the discovery in regard to Rflink. Can you post your Rflink config. Also can you enable debug logging and show the output:

logger:
  default: info
  logs:
    rflink: debug
    homeassistant.components.rflink: debug
1 Like

Here is my config

rflink:
port: /dev/ttyUSB1

And here is the debug:

17-03-30 19:00:17 DEBUG (MainThread) [rflink.protocol] received data:
20;05;Eurodomest;ID=0d509e;SWITC
17-03-30 19:00:17 DEBUG (MainThread) [rflink.protocol] received data: H=03;CMD=OFF;
17-03-30 19:00:17 DEBUG (MainThread) [rflink.protocol] got packet: 20;05;Eurodomest;ID=0d509e;SWITCH=03;CMD=OFF;
17-03-30 19:00:17 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘command’: ‘off’, ‘protocol’: ‘eurodomest’, ‘node’: ‘gateway’, ‘switch’: ‘03’, ‘id’: ‘0d509e’}
17-03-30 19:00:17 DEBUG (MainThread) [rflink.protocol] got event: {‘id’: ‘eurodomest_0d509e_03’, ‘command’: ‘off’}
17-03-30 19:00:17 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {‘id’: ‘eurodomest_0d509e_03’, ‘command’: ‘off’}
17-03-30 19:00:17 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
packet {‘command’: ‘off’, ‘protocol’: ‘eurodomest’, ‘node’: ‘gateway’, ‘switch’: ‘03’, ‘id’: ‘0d509e’}

and one more:

17-03-30 19:00:06 DEBUG (MainThread) [rflink.protocol] received data: 20;04;EV1527;ID=099fc0;SWITCH=02
17-03-30 19:00:06 DEBUG (MainThread) [rflink.protocol] received data: ;CMD=ON;
17-03-30 19:00:06 DEBUG (MainThread) [rflink.protocol] got packet: 20;04;EV1527;ID=099fc0;SWITCH=02;CMD=ON;
17-03-30 19:00:06 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘command’: ‘on’, ‘protocol’: ‘ev1527’, ‘node’: ‘gateway’, ‘switch’: ‘02’, ‘id’: ‘099fc0’}
17-03-30 19:00:06 DEBUG (MainThread) [rflink.protocol] got event: {‘id’: ‘ev1527_099fc0_02’, ‘command’: ‘on’}
17-03-30 19:00:06 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {‘id’: ‘ev1527_099fc0_02’, ‘command’: ‘on’}
17-03-30 19:00:06 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device
packet {‘command’: ‘on’, ‘protocol’: ‘ev1527’, ‘node’: ‘gateway’, ‘switch’: ‘02’, ‘id’: ‘099fc0’}

Hi aequitas,

Thanks for the excellent work on support for the RFLink gateway. The fact HA is now supporting RFLink made me migrate to HA.

Unfortunately I can’t get it working because the new_devices_group is no longer working. Do you have a suggestion on how to find out the device names without the new_devices_group feature?

Regards,
Ruud

Sorry for the late response. Output looks good. Let me check if there is not a bug since the latest changes and come back on it.

New devices should be added to Hass automatically unless the automatic add config option is set to false. Maybe your configuration does not show ungrouped devices on you frontpage? Check the states debugging screen if devices are listed there. And check logging if you can see any errors.

Thanks, works fine now!

I have added some devices (kaku lights ) with rflink and added them to there groups. Every time I restart HA the devices are gone. When i press the remote they become visible again. what should i do so HA remembers these lights after a reboot?

@passie You need to add your kaku lights to your configuration.yaml file.

E.G.

light:
  platform: rflink
  device_defaults:
    fire_event: true
    signal_repetitions: 2
  devices:
    kaku_7654321_1: #replace with your lights
      name: Living room 1
    kaku_1234567_1: #replace with your lights
      name: Living room 2

@DarkFox can you mark your post as “Solution” as it’s now been implemented :slight_smile:

Oh sorry, I haven’t been keeping an eye on this thread. I’ve done so. :slight_smile:

I just setup my RFLink today and got it working and showing the status of my milights on Hass but I can’t control the lights thought Hass, any thoughts?

Also the normal switch (created from the real hub) from the light I tested stopped working.

2017-06-24 17:07:23 DEBUG (MainThread) [homeassistant.components.rflink] Sending command: on to Rflink device: milightv1_354a_01 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] sending command: {‘protocol’: ‘milightv1’, ‘id’: ‘354a’, ‘switch’: ‘01’, ‘command’: ‘on’} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] writing data: ‘10;milightv1;354a;01;on;\r\n’ 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] received data: 20;B4;CMD UNKNOWN; 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] got packet: 20;B4;CMD UNKNOWN; 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] command response: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] packet acknowledged 2017-06-24 17:07:23 DEBUG (MainThread) [homeassistant.components.rflink] Sending command: on to Rflink device: milightv1_354a_01 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] sending command: {‘protocol’: ‘milightv1’, ‘id’: ‘354a’, ‘switch’: ‘01’, ‘command’: ‘on’} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] writing data: ‘10;milightv1;354a;01;on;\r\n’ 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] waiting for acknowledgement 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] received data: 20;B5;CMD UNKNOWN; 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] got packet: 20;B5;CMD UNKNOWN; 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] decoded packet: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] command response: {‘node’: ‘gateway’, ‘protocol’: ‘unknown’, ‘response’: ‘command_unknown’, ‘ok’: False} 2017-06-24 17:07:23 DEBUG (MainThread) [rflink.protocol] packet acknowledged

How do i trigger automation based on this button?
Something like with rfxcom where you can trigger based on event and button pressed.

2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] received data: 20;C1;
2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] received data: EV1527;ID=0b15fe;SWITCH=
2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] received data: 04;CMD=ON;
2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] got packet: 20;C1;EV1527;ID=0b15fe;SWITCH=04;CMD=ON;
2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] decoded packet: {'node': 'gateway', 'protocol': 'ev1527', 'id': '0b15fe', 'switch': '04', 'command': 'on'}
2017-08-06 22:42:17 DEBUG (MainThread) [rflink.protocol] got event: {'id': 'ev1527_0b15fe_04', 'command': 'on'}
2017-08-06 22:42:17 DEBUG (MainThread) [homeassistant.components.rflink] event of type command: {'id': 'ev1527_0b15fe_04', 'command': 'on'}
2017-08-06 22:42:17 DEBUG (MainThread) [homeassistant.components.rflink] device_id not known, adding new device

This doesnt work:

  trigger:
   - platform: event
     event_type: command
     event_data:
       id: "ev1527_0b15fe_04"
       command: "on"
  action:
    - service: notify.rolf
      data_template:
        message: test

I had some trouble with some switches a while ago - a quick test may help:

trigger the switch physically and see what happens in the front end - it should set the state to ON.
then in the hass frontend turn the swith off again and try your switch again (physicaly or in hass) this should trigger your notification - hopefully - in my setup I have it triggering when it goes form off to on and I have an automation to switch it back off again so I can trigger it again.

let me know if you want me to post my code.

Has anyone had trouble with aliases in RFLink.

I have a weather station and pool temperature that report as several different devices to RFLink.

I have added aliases to the config but it only registers the value to the sensor when the primary device ID is received by RFLink - if an alias reports its state to RFLink it doesn’t update the sensor.

Has anyone had experience similar to this?