rtl_433 icon indicating copy to clipboard operation
rtl_433 copied to clipboard

Kerui decoder mislabels leak sensor state (cmd = 0xD should be "water", not discarded)

Open Jackhammer88 opened this issue 2 months ago • 4 comments

Hi!

I think there is a mistake in src/devices/kerui.c related to how the last 4 bits (cmd) are interpreted.

The current decoder assumes that:

case 0x5: cmd_str = "water"; break;

However, I have Kerui leak / water sensors (tested on multiple units), and their transmitted cmd value is 0xD, not 0x5.

Example raw codes from my sensors

These are 24-bit payloads received both via my own receiver (Arduino + Rust)

010011011011000011111101   → cmd = 0xD
001110100011001111111101   → cmd = 0xD
001110110110000011111101   → cmd = 0xD

The last 4 bits (1101) are clearly 0xD, which in current code is treated as unknown → DECODE_ABORT_EARLY.

Jackhammer88 avatar Oct 01 '25 08:10 Jackhammer88

The protocol used is the famous EV1527 OTP encoder, 24-bit (+1 sync) PWM. It's somewhat of a "standard" shared by many devices. Every manufacturer or product might define their own usage of the (4) data bits.

We'd need specific details about the devices to add support, e.g. full name and product number. Also this decoder should someday be removed in favour of flex decoders, which then would be hackable by users!

zuckschwerdt avatar Oct 01 '25 09:10 zuckschwerdt

@Jackhammer88 What's the path to closing this issue? Perhaps a PR with a Kerui-specific flex decoder?

gdt avatar Oct 20 '25 14:10 gdt

@gdt I can’t open a PR myself right now because I don’t have an RTL-SDR to validate the changes. I can provide the state values/protocol details, but I’ll need someone with hardware to test.

Jackhammer88 avatar Oct 20 '25 14:10 Jackhammer88

You can open a PR and say it's draft. Then someone with the device and a dongle can test, and we can fix it. I'm trying to push everything towards codebase-improved and then closed, since otherwise we end up with 1000 open issues and no one can wade through them and the overall situation is dysfunctional.

gdt avatar Oct 20 '25 14:10 gdt