Kerui D026 door / window sensor & RFXTRXe

Have a Kerui D026 window sensor and RFXtrxe hub

Have followed the component setup at https://www.home-assistant.io/components/binary_sensor.rfxtrx/
X10 and lighting4 enabled

I see the code in the logs per setup above, however on HA restart, the codes keep changing

Extract from log after restart

2018-09-06 22:30:49 WARNING (MainThread) [homeassistant.components.switch] Setup of platform hadockermon is taking over 10 seconds.
2018-09-06 22:31:06 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-09-06 22:31:22 INFO (Thread-3) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 09130005b941ee013260 (Device ID: b941ee Class: LightingDevice Sub: 0)
2018-09-06 22:31:24 INFO (Thread-3) [homeassistant.components.rfxtrx] rfxtrx: found possible device b941e7 for b941ee with the following configuration:
data_bits=4
command_on=0xe
command_off=0x7

2018-09-06 22:31:24 INFO (Thread-3) [homeassistant.components.binary_sensor.rfxtrx] Added binary sensor 09130006b941e7013760 (Device ID: b941e7 Class: LightingDevice Sub: 0)

Extract from configuration.yaml before restart

#RfxTrx
rfxtrx:
device: /dev/ttyUSB0
debug:

binary_sensor:
platform: rfxtrx
automatic_add: true

0913004bb941ee013960:
name: gate_contact1
device_class: opening
data_bits: 4
command_on: 0xe
command_off: 0x7

Any tips on how to successfully add these sensors?

Hello,
I have the same problem, did you succeed?

Yes, have them working reliably. As far as i recall, watch the logs carefully and only do one thing at a time, i.e. open close and tamper. Copy code out for each item.

Have found them very reliable, even outdoors.

1 Like

Hello,
thank you.
I detect my sensors well but I can not configure them, can you show me your configuration?
(No on / off)

sure, no problem

#RfxTrx
rfxtrx:
  device: /dev/ttyUSB0
#  debug:

binary_sensor:
  - platform: rfxtrx
    automatic_add: false

    devices:
      09130000043eee013b60:
        name: front_gate_contact
        device_class: opening
        data_bits: 4
        command_on: 0xe
        command_off: 0x7

      09130003043eeb013b60:
        name: front_gate_tamper
        device_class: problem
        off_delay:
          seconds: 5

Thank you for the configuration, it’s the same that I put pretty much but it does not work.
Indeed I have a D025 with only the return of ON.

I will surely change for D026.

binary_sensor:
  platform: rfxtrx
  automatic_add: true
  devices:
    08200019d680700279:
      name: entrƩe
      device_class: opening
      data_bits: 4
      command_on: 0xe
      off_delay:
        seconds: 10

Any news here?
I have a similar problem. My Kerui sensor is detected as a Security1 sensor like yours @sypeer.
And I’m only able to get it working as an rfxtrx.sensor. With all the states open/close/tamper status.
The downside is, that the sensors are only updated every 30 seconds… so there is no way to use that to immediately do something if the door is opened.
That’s where I need to get it working as a binary sensor.
So, like I said at the beginning, any news?

Might not be an ideal solution as it means buying more bits, but I am using the Sonoff RF Bridge

I have the sensors responding instantly. Also got it working with PIR Sensors

The d026 kerui are instantaneous with rfxtrx here as binary sensors

I still have not succeeded
Sorry

Well, my IDs I get look like this: ā€œ0820000786bee08269ā€
So as you might see its recognized as a Security1 (20) type device. The only ā€œworkingā€ configs use a 0913… So they are of the type ā€œlighting4ā€ (13).
I guess that there might be a problem … But I’m just guessing at the moment.
RfxMngr also shows it as a Security1 type, btw.
And another info I’m using a RfxComXL … which also could be an issue.

I also struggled with the Kerui D026 device. Now working perfectly. What helped for me was the following:

In RFXcom (RFXtrx433E) I disbled the X10 protocol. Now the doorsensor is detected as described in the home-assistant documentation of the RFXtrx binary sensor documentation.

Im pretty new with the RFXCOM. Can you explain how to disable X10 on it? I will for sure try it.
Thanks for the help.

You need to plug the rfxtrx into your laptop and switch off x10

Program here
http://www.rfxcom.com/epages/78165469.mobile/en_GB/?ObjectPath=/Shops/78165469/Categories/Downloads

Thanks for the fast reply. Gonna dig into it today and post the outcome.

In addition to fergalom.

In RFXmanager you can check if your Kerui is detected correctly. If you trigger your sensor. In the debug window of RFXmanager you see that it is detected as a lightning4 device.

success…

Hi all.

Update. I have disabled X10 and saw on the RFXcom lighting 4 wasn’t enabled also. I enabled it. After went back to Home Assistant.
set the automatic on true and triggered the sensor.
Outcome was 3 codes. I tried all 3 codes in the below setup, and the 2nd was working. Now my sensors work all. i have 4 of them working fine. Thanks all for the support! HA is awesome :slight_smile:

devices:
      0913001ef7b86e013d50:
        name: schuifpui_contact
        device_class: opening
        data_bits: 4
        command_on: 0xe
        command_off: 0x7
1 Like

I know this is a very old topic, but I thought it would be best to add my question to this for clarity.

So, I have 3 of these Keriu D026 sensors and followed this topic a few times in different ways, as i’m not that good with adding sensors yet.

In the RFX configuration I have manually added the device (using the settings in this topic):
lightning4 protocol
eventcode: 091300301001e7013d80
bits: 4
command_on: 0xe
command_off: 0x7

After submitting, I can see that the RFX addon has added a device, although I never seem to find out which is the latest addition. But anyway, after a lot of searching (search for PT2262) I find a new device: PT2262 386ee0

When checking the device info for this, I see 3 entities:
Controls, Sensors, Signal strength

However, these don’t change if I trigger the sensor. I see the LED switching on/off when I move the magnet, but nothing changes in the state of the sensor. The logbook only mentions:
PT2262 386ee0 turned on 12 minutes ago

No new log entries are coming when i trigger the device of use the tamper switch.

I have no idea what else to do or try. All people in this thread seem to have it working successfully, but I feel like I have it working partly. The sensor seems to be added okay, but there are no usable items to detect a door opening. All I seem to have is a sensor that is present and ON.

Besides this, I have also added code to configuration.yaml

platform: rfxtrx
automatic_add: false
devices:
091300301001e7013d80
name: voordeur_keriu
device_class: opening
data_bits: 4
command_on: 0xe
command_off: 0x7

I figures, after restarting HA, I must be able to find an entity named ā€˜voordeur_keriu’ and use it…but no such result, I’m afraid

Like I said, pretty new to this, but could use a bit of help here. I feel like I’m missing some trivial step here.