RFLink Signal Learning mechanism is temperamental

Hi,

I’ve tried asking this on the letscontrolit forums but had no response. I’m hoping someone here has some knowledge of RFLink and can provide some advice.

I have a Digoo DG HOSA Door & Window Sensor (EV1527 device), which is detected as 2 different devices in RFLink:

20;C0;EV1527;ID=[REDACTED];SWITCH=03;CMD=ON; (Open)
20;C0;EV1527;ID=[REDACTED];SWITCH=09;CMD=ON; (Closed)
20;C1;SelectPlus;ID=[REDACTED];SWITCH=02;CMD=ON;CHIME=01;

I want to receive commands for open and closed as a Binary Sensor in home assistant so I’ve followed the instructions here and added a custom record using the RF Signal Learning mechanism and I now see commands in minicom like this when interacting with the sensor:

20;CA;RFCustom;ID=[REDACTED];SWITCH=0;CMD=OFF;
20;CA;RFCustom;ID=[REDACTED];SWITCH=0;CMD=ON;

It works well for a while but then RFLink seems to ‘forget’ the RFCustom record, and only receives the EV1527 and SelectPlus commands. The only solution I’ve found to resolve this is to press the reset button on the Arduino Mega. After resetting, RFLink debug begins to log commands from the RFCustom record again.

I don’t want to have to reset my Arduino all the time, and as it currently stands, I can’t trust RFLink to correctly receive commands when the door is opened. Is anyone aware of an issue with RFFind records that would cause this to happen?

Alternatively, given that I receive different commands for open and closed (Switch 03 and switch 09) without using the signal learning mechanism, could I associate these with a single device within home assistant (or within node-red) somehow so the switch 3 command shows the door as open and the switch 9 command shows it as closed?

Failing all of this, can anyone recommend an affordable 433mhz door sensor that works reliably with RFLink and home assistant?

Thanks

Use a template binary sensor.

I will try to answer some of your questions.

No, I am not familiar with the RFFind command

No, I have no experience with RF door sensors.

As @francisp has told you, the appropriate thing would be a binary_sensor.template. But first you should define the 2 devices as RFLink binary sensors. I think you will need to define a suitable off_delay value for them to detect state changes.
Also note that you can define the SelectPlus sensor as an aliases of the EV1527 sensors, so that the template also takes those signals into account.

1 Like

I defined a mqtt binary sensor, togethet with rflink fire_event and these 2 automations :

  alias: Achterdeur opened
  trigger:
  - event_data:
      entity_id: switch.achterdeuron
    event_type: button_pressed
    platform: event
  condition: []
  action:
  - service: mqtt.publish
    data:
      payload: 'ON'
      topic: sensor/achterdeur
      retain: true
- id: '1567517199999'
  alias: Achterdeur closed
  trigger:
  - event_data:
      entity_id: switch.achterdeuroff
    event_type: button_pressed
    platform: event
  condition: []
  action:
  - service: mqtt.publish
    data:
      payload: 'OFF'
      topic: sensor/achterdeur
      retain: true
1 Like

Thanks guys. I’ll give it a go!

Thanks for your answer.

I’ve done as you said and I see the sensor change when I interact with it, however the off_delay is a problem because it resets the state so both the on and off RFLink binary sensors just show as off most of the time.

I have my sensor mounted on a gate and I want to know if the gate has been left open. How can I configure it so that the open state remains on if the gate has been left open?

This is what I have so far:

binary_sensor:
  - platform: rflink
    devices:
      ev1527_12345_03:
         name: Side Gate Sensor Open
         off_delay: 1
      ev1527_12345_09:
         name: Side Gate Sensor Closed
         off_delay: 1
  - platform: template
    sensors:
      side_gate:
        device_class: door
        value_template: "{{ is_state('binary_sensor.side_gate_sensor_open', 'on') }}"

Try removing the off_delay.

That just results in both sensors staying on. I need them to toggle one another when changed.