Skip to content

Add support for JCHENG SECURITY Contact and PIR sensors#3448

Draft
hertzg wants to merge 1 commit intomerbanan:masterfrom
hertzg:add-jcheng-security-sensors
Draft

Add support for JCHENG SECURITY Contact and PIR sensors#3448
hertzg wants to merge 1 commit intomerbanan:masterfrom
hertzg:add-jcheng-security-sensors

Conversation

@hertzg
Copy link

@hertzg hertzg commented Jan 24, 2026

Summary

Add decoders for JCHENG SECURITY sensors:

  • Contact Sensor (Jcheng-Contact): Door/window contact sensor with 16-bit ID, reports closed state, battery status, and event flag
  • PassiveIR Sensor (Jcheng-PIR): PIR motion sensor with 12-bit ID, reports motion, tamper, and battery status

Both sensors use OOK PWM modulation at 433.92MHz with 25-bit messages.

Protocol Details

Contact Sensor (25 bits):

PPPP IIII IIII IIII IIII OBSX XX
  • P: 4-bit preamble (0xF)
  • I: 16-bit sensor ID
  • O: is_on flag
  • B: battery_ok
  • S: state (1=closed, 0=open)

PIR Sensor (25 bits):

PPPP PPPP IIII IIII IIII TMBX XX
  • P: 8-bit preamble (0xAA)
  • I: 12-bit sensor ID
  • T: tamper flag
  • M: motion detected
  • B: battery_low

Notes

  • Decoders are disabled by default as there is no checksum/CRC in the protocol
  • Users can enable with -R 292 (contact) or -R 293 (PIR)

Test data

I can provide test recordings for the Contact Sensor only. Unfortunately, I no longer have the PIR sensor device.

@zuckschwerdt: Would you prefer I remove the PIR decoder from this PR and submit it as Contact Sensor only? I can add the PIR decoder later if/when I have access to the device again.

Test plan

  • Add test recordings for Contact Sensor to rtl_433_tests
  • Verify decoding with actual sensor recordings

Add decoders for JCHENG SECURITY sensors:
- Contact Sensor: door/window sensor with 16-bit ID
- PassiveIR Sensor: PIR motion sensor with 12-bit ID

Both use OOK PWM modulation at 433.92MHz with 25-bit messages.
Disabled by default as there is no checksum/CRC.
@zuckschwerdt
Copy link
Collaborator

Thanks! The code looks great. If there is no checksum and no advanced decoding I'd always recommend to use a flex decoder. Given that there is the 0xa/0xaa check it might warrant a full decoder though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants