Add a rfxtrx PT2262 lightening4 door sensor, how to configure?

Hi

I bought some Door sensors (https://community.openmqttgateway.com/t/digoo-433mhz-new-door-window-alarm-sensor/413) and I want to add them to Home Assistant.

I’m really struggling to this as I found different ways to add them, apparantely (just in HA, or with nod-red, or templates…), especially when I see that a lot of breaking changes has been made in the most recent version of HA 0.114.4

When i look into the logs in HA I got this:

OPEN:
2020-09-04 19:23:19 DEBUG (MainThread) [homeassistant.components.rfxtrx] Receive RFXCOM event: {‘packet_type’: 19, ‘sub_type’: 0, ‘type_string’: ‘PT2262’, ‘id_string’: ‘111e73’, ‘data’: ‘09130001111e7301a170’, ‘values’: {‘Command’: ‘Unknown command (0x111e73)’, ‘Rssi numeric’: 7}}

CLOSE
2020-09-04 19:23:22 DEBUG (MainThread) [homeassistant.components.rfxtrx] Receive RFXCOM event: {‘packet_type’: 19, ‘sub_type’: 0, ‘type_string’: ‘PT2262’, ‘id_string’: ‘111e79’, ‘data’: ‘09130002111e7901a170’, ‘values’: {‘Command’: ‘Unknown command (0x111e79)’, ‘Rssi numeric’: 7}}

Could anyone help me please how I can change the data above into a door/window switch?
ps: it’s a lightening 4 and the ‘data’ doesn’t always return the exact value…

Any help would be much appreciated!

My system:

  • RPi 3
  • HassOS 4.12
  • Home assistant 0.114.4
  • RFXCom (USB)
  • Node-red installed

I think you need to use following configuration:

rfxtrx:
  device: "/some_device_path"
  devices:
    09130001111e7301a170:
      data_bits: 4
      command_on: 0x3
      command_off: 0x9

If that works you can set the device class through customization to door.

Hi, Thx Rob! that did it!
I’m now able to view the sensor on my dashboard.
Now I have to get a nice and shiny door/window icon. :slight_smile: