RFXCOM/PT2262 How does it work?


I am using the RFXCOM binding, which works well for a few ARC outlets I have.

I have a few PT2262 power outlets though that I cannot seem to get working.
They worked unter FHEM, and I also have a remote that I can use with them.

When I capture the command with RFXmngr those are the two commands:


Packettype = Lighting4
subtype = PT2262
Sequence nbr = 60
Code = 410554 decimal:4261204
S1- S24 = 0100 0001 0000 0101 0101 0100
Pulse = 322 usec
Signal level = 7 -64dBm


Packettype = Lighting4
subtype = PT2262
Sequence nbr = 43
Code = 41155F decimal:4265311
S1- S24 = 0100 0001 0001 0101 0101 1111
Pulse = 322 usec
Signal level = 7 -64dBm

The device ID is “0100 0001 000”, and the on/off code os 1/0. For that one quite easy.
How do I configure it in openhab though?

thank you

OH2 finds a ligthing4 device that i see in my inbox, but when adding It does nothing at all. Signal strength is aparently good though.

Command is: rfxcom:lighting4:a984fad0:5381:command

Any idea how to proceed?


Hey Daniel. I’m using PT2262 a lot and they work pretty well.

I assume you grabbed the COMMAND of your outlets using the original remote and have the same house-code set in the remote and the outlet. I’ll just describe, how I set this up in OpenHAB 2:

  • create things/rfxcom.things

  • add your bridge:

      Bridge rfxcom:bridge:rfxtrx433e [ serialPort="/dev/rfxtrx433e" ] { }
  • optionally restart openhab2 (if using the SysV/Systemd service, just type shutdown in the karaf console and wair, otherwise restart however you want)

  • Press a button on your remote, that switches your desired outlet

  • If you have a new inbox item, type inbox in the karaf console

  • If not, type log:set DEBUG org.openhab.binding.rfxcom and press again

  • Make note of the decimal deviceID and the Pulse length

  • Add them to your things. My file looks like this:

      Bridge rfxcom:bridge:rfxtrx433e [ serialPort="/dev/rfxtrx433e" ] {
          // Outlets
          Thing lighting4 10101_A [deviceId="1115397.318", subType="PT2262"]
          Thing lighting4 00000_A [deviceId="5588229.318", subType="PT2262"]
          // Weather
          Thing temperaturehumidity 39169 [deviceId="39169", subType="TH5"]
          Thing temperaturehumidity 57089 [deviceId="57089", subType="UNKNOWN"]
          Thing temperature         513   [deviceId="513",   subType="TEMP2"]
          // Wall Switches
          Thing lighting2 work   [deviceId="69236.3", subType="AC"]
          Thing lighting2 living [deviceId="69236.2", subType="AC"]
          Thing lighting2 kitchen [deviceId="239864.3", subType="AC"]

You can see my naming scheme for the outlets are the DIP switches and the device char (A-E)

// Thing <CLASS> <HHHHH_D> [ deviceId="<DECIMAL_ID>.<PULSE>", subType="<SUBCLASS>" ]
// CLASS      : Base protocol [lighting4, ...]
// HHHHH      : DIP Switch: 1=HIGH, 0=LOW
// D          : DIP Switch: Device: One of [A-E]
// DECIMAL_ID : ID shown by RFXCOM
// PULSE      : Modulation pulse length
// SUBCLASS   : Vendor-specific sub protocol
  • Link your item to a channel of the thing. For this, open the PaperUI, go to Things, select the thing you want to link and copy the channel name, for example the most intersting one, Command: rfxcom:lighting4:rfxtrx433e:10101_A:command
  • add {channel="rfxcom:lighting4:rfxtrx433e:10101_A:command"}
  • Enjoy

I learned that there might be some weird combinations of House-Code and Device-Code that just won’t work with my RFXCOM Transceiver. Then change to another house code and try again.

If you have any questions, ask me anytime! I’ve been through all of the problems that could ever happen with these. At least that’s how I feel like :wink:

@gersilex: thank you, now one of three switches works.

I bought 3 switches and one remote in a pack, so they are the same switches.
One of the three has an ID, and one bit 1/0 (on/off).
The others though have an ID, and the last two bits are on/off (10 on, 01 off). This seems to be very common with PT2262 switches, can Openhab handle that?

My definition of the switches from fhem:

define coffee TRX_LIGHT PT2262 10010011110 light 0:off,1:on define power_Beamer TRX_LIGHT PT2262 1001010111 Brennenstuhl_B 10:off,01:on define audioplayer TRX_LIGHT PT2262 1001011101 audio_bedroom 10:off,01:on


Maybe you hit that weird behaviour I found. [quote=“gersilex, post:4, topic:19660”]
I learned that there might be some weird combinations of House-Code and Device-Code that just won’t work with my RFXCOM Transceiver.

Honestly, I never dug into that problem really. I just changed the House Code, but that happened to my in OpenHAB1 times.

In the rfxcom binding 2 you can see how the message (or command) is beind decoded.

It looks like there are 4 bits used for the command, instead of 1 or 2 bits you encountered. Probably they are not all used, but at least reserved. There is some bit shifting and masking happening, but unfortunately I’m not able to understand or even read what’s happening there. But it looks quite promising and well laid out.

I recommend you to just try it and if it doesn’t work, report it as GitHub issue and/or change the house code and try again :slight_smile:

Thank you.

I added a github issue, as I think this happens regularily, and the PT2262 is supposed to often have multi-bit on/off codes, and in implementations in other HA-systems it is handled correctly.

Great, thanks. Can you show us how the other Systems handle this? I already went to the Fhem source code to understand the Pioneer AVR protocol. Is the RFXCOM implementation handling the ON and OFFs or is one forced to give the command like you did in your post before?

to be completely hones, I have no idea how FHEM handles it from the programming perspective, but the configuration is the following:

define audioplayer TRX_LIGHT PT2262 1001011101 audio_bedroom 10:off,01:on
This is the definition, so here I define the ID and the on/off code, which can be different length.

The right source should be this, but I am unsure what to look for.