Skip to content

Switching on a light to replicate a PTM215 switch #126

@rnusser

Description

@rnusser

Although this project might be abandoned, I was hoping someone would be able to help me getting this code to work.

I am unable to get any lights to switch on or off. I have changed the assemble_radio_packet function in enocean_example.py to the following:

def assemble_radio_packet(transmitter_id):
    return RadioPacket.create(
            rorg=0xF6,
            rorg_func=0x02,
            rorg_type=0x02,
            sender=[0xfe, 0xf2, 0x86, 0x22],
            R1='Button AI',
            EB='pressed',
            T21=True,
            NU=True)

When I run the program the output is almost identical to the actual debug info I get when physically activating the switch:

This is the output wen the function is called to switch off the light:

2021-11-16 17:24:27,323 - enocean.protocol.packet - WARNING - Replacing destination with broadcast address.
2021-11-16 17:24:27,429 - enocean.communicators.SerialCommunicator - INFO - Sending packet
2021-11-16 17:24:27,432 - enocean.communicators.SerialCommunicator - DEBUG - FE:F2:86:22->FF:FF:FF:FF (-255 dBm): 0x01 ['0xf6', '0x10', '0xfe', '0xf2', '0x86', '0x22', '0x30'] ['0x3', '0xff', '0xff', '0xff', '0xff', '0xff', '0x0'] OrderedDict([
('R1', {'description': 'Rocker 1st action', 'unit': '', 'value': 'Button AI', 'raw_value': 0}), 
('EB', {'description': 'Energy bow', 'unit': '', 'value': 'pressed', 'raw_value': 1}), 
('R2', {'description': 'Rocker 2nd action', 'unit': '', 'value': 'Button AI', 'raw_value': 0}), 
('SA', {'description': '2nd action', 'unit': '', 'value': 'No 2nd action', 'raw_value': 0}), 
('T21', {'description': 'T21', 'unit': '', 'value': True, 'raw_value': 1}), 
('NU', {'description': 'NU', 'unit': '', 'value': True, 'raw_value': 1})])
2021-11-16 17:24:27,542 - enocean.communicators.SerialCommunicator - DEBUG - 0x02 ['0x0'] [] OrderedDict()

And here is the debug output when pressing the switch manually to switch off the light:

2021-11-16 17:16:27,938 - enocean.communicators.SerialCommunicator - DEBUG - FE:F2:86:22->FF:FF:FF:FF (-64 dBm): 0x01 ['0xf6', '0x10', '0xfe', '0xf2', '0x86', '0x22', '0x30'] ['0x0', '0xff', '0xff', '0xff', '0xff', '0x40', '0x0'] OrderedDict()
R1: {'description': 'Rocker 1st action', 'unit': '', 'value': 'Button AI', 'raw_value': 0}
EB: {'description': 'Energy bow', 'unit': '', 'value': 'pressed', 'raw_value': 1}
R2: {'description': 'Rocker 2nd action', 'unit': '', 'value': 'Button AI', 'raw_value': 0}
SA: {'description': '2nd action', 'unit': '', 'value': 'No 2nd action', 'raw_value': 0}
T21: {'description': 'T21', 'unit': '', 'value': True, 'raw_value': 1}
NU: {'description': 'NU', 'unit': '', 'value': True, 'raw_value': 1}

The second list of values start with a 0x0 when coming from the light switch, and a 0x3 when sent by the function. This could be the repeater_count, but I am not sure.

Has anyone got one of these switches working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions