Danielhiversen/pyRFXtrx

Adding support for Bangood PIR sensor

Closed this issue · 2 comments

stone commented

Home Assistant release (hass --version): 0.39.3
Python release (python3 --version): Python 3.4.2
Component/platform: Orange Pi One, Debian GNU/Linux 8.7 (jessie)

I got a couple of:

http://www.banggood.com/433MHZ-Wireless-PIR-Motion-Detector-for-Home-Alarm-Home-Security-p-941723.html

Homeassistant gives me:

Mar 25 17:43:14 red hass[547]: 17-03-25 17:43:14 DEBUG (Thread-13) [homeassistant.components.rfxtrx] Receive RFXCOM event from (Device_id: 92c3d9 Class: LightingDevice Sub: 0, Pkt_id: 0913008c92c3d9018c70)
Mar 25 17:43:14 red hass[547]: 17-03-25 17:43:14 DEBUG (Thread-13) [homeassistant.components.rfxtrx] Device_id: 92c3d9 device_update. Command: Unknown command (0x92c3d9)

It looks like it only transmits when movement is detected.

Within rfxmgr it is known as a Lightning4 device, I do not know myself how to add support for it but,
I'm happy to help with packet captures etc.

stone commented

Some more information:

Added a print statement to parse(data) in lowlevel.py and got:

Sensor1:
Recv: 0x09 0x13 0x00 0x3a 0xae 0xab 0x99 0x01 0x45 0x70

Sensor2:
Recv: 0x09 0x13 0x00 0x41 0x92 0xc3 0xd9 0x01 0x8a 0x70

RFXmgr packet log:
Sensor1:

------------------------------------------------
Packettype    = Lighting4
subtype       = PT2262
Sequence nbr  = 1
Code          = AEAB99 decimal:11447193
S1- S24  = 1010 1110 1010 1011 1001 1001 
Pulse         = 325 usec
Signal level  = 7  -64dBm
------------------------------------------------

Sensor2:

------------------------------------------------
Packettype    = Lighting4
subtype       = PT2262
Sequence nbr  = 1
Code          = 92C3D9 decimal:9618393
S1- S24  = 1001 0010 1100 0011 1101 1001 
Pulse         = 396 usec
Signal level  = 7  -64dBm
------------------------------------------------

If I add "0xc3" to COMMAND in class Lightning4() I get Sensor2
to work, but the other one sends 0xab, any tips on how to implement this?

Update home-assistant to the latest version and use the rfxtrx binary sensor component. Then you should be able to use your sensors.

This component has been written for that purpose. Feel free to ask if there is any problem!