Danielhiversen/pyRFXtrx

lighting4 / PT2262 light switch problem

Closed this issue · 1 comments

I am unable to control my lighting4 / PT2262 (popular, cheap Brennenstuhl switches from Germany), despite them being correctly detected in HASS. When pushing the on/off button, the following six (!) devices are added to HASS (v0.52):

IDs appearing after pressing the ON button multiple times:
09130000154551014070
0913000115555f013d70
09130002154554013b70

IDs appearing after pressing the OFF button multiple times:
09130016155151013e70
09130019155551013e70
09130021155154013970

I split the ID into the entityID and packetID as listed here:


configuration.yaml:

light:
platform: rfxtrx
automatic_add: True
signal_repetitions: 1
devices:
09130000:
name: LED_1
packetid: 154551014070
09130001:
name: LED_2
packetid: 15555f013d70
09130002:
name: LED_3
packetid: 154554013b70


However I always get an invalid config error:

ERROR (MainThread) [homeassistant.config] Invalid config for [light.rfxtrx]: Rfxtrx device 154551014070 is invalid: Invalid device id for OrderedDict([('09130000', OrderedDict([('name', 'LED_1')])), ('09130001', OrderedDict([('name', 'LED_2'), ('packetid', '15555f013d70')])), ('09130002', OrderedDict([('name', 'LED_3'), ('packetid', '154554013b70')]))]) for dictionary value @ data['devices']. Got OrderedDict([('09130000', OrderedDict([('name', 'LED_1')])), ('09130001', OrderedDict([('name', 'LED_2'), ('packetid', '15555f013d70')])), ('09130002', OrderedDict([('name', 'LED_3'), ('packetid', '154554013b70')]))]). (See ?, line ?). Please check the docs at https://home-assistant.io/components/light.rfxtrx/

See below for the information exported from RFXMgnr:

ON button Code Info:

Packettype = Lighting4
subtype = PT2262
Sequence nbr = 85
Code = 154551 decimal:1394001
S1- S24 = 0001 0101 0100 0101 0101 0001
Pulse = 318 usec
Signal level = 8 -56dBm

OFF button Code Info:

Packettype = Lighting4
subtype = PT2262
Sequence nbr = 87
Code = 154554 decimal:1394004
S1- S24 = 0001 0101 0100 0101 0101 0100
Pulse = 313 usec
Signal level = 8 -56dBm

Finally, when I use the script "receive.py" these are the recored commands for the ON and OFF button:

ON:
Recv: 0x09 0x13 0x00 0x08 0x15 0x45 0x51 0x01 0x3b 0x70
<class 'RFXtrx.ControlEvent'> device=[<class 'RFXtrx.LightingDevice'> type='PT2262' id='154551'] values=[('Command', 'Unknown command (0x154551)'), ('Rssi numeric', 7)]

OFF:
Recv: 0x09 0x13 0x00 0x1d 0x15 0x45 0x54 0x01 0x39 0x60
<class 'RFXtrx.ControlEvent'> device=[<class 'RFXtrx.LightingDevice'> type='PT2262' id='154554'] values=[('Command', 'Unknown command (0x154554)'), ('Rssi numeric', 6)]

I couldn’t find any additional documentation about the "packetid:" flag in configuration.yaml - any clues if I split the detected ID correctly?

FYI, I'm also having an issue with the generated IDs as indicated in this issue report here.

FYI, I was able to get a workaround running using the command_line switch as described here:
http://wildebeestplain.blogspot.ch/2016/12/using-conrad-rsl-sockets-with-rfxcom.html