question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Differentiate PTM215Z and PTM215ZE ZGP switches

See original GitHub issue

Hi,

I noticed the EnOcean PTM215ZE module is handled as a PTM215Z (commonly known as “Friends Of Hue” switch), but there are some differences between the two: commandID is not the same for every button event.

I’m trying to make a custom converter and device profile for the PTM215ZE, but since it’s tagged with the model ID “GreenPower_2” (because of the same Device Type: 0x02), I have no way to catch the device.

Here are the differences from the commissioning ZCL data (tested with a deconz adapter, 2 PTM215Z and 1 PTM215ZE):

  • frame.Payload.options
    • PTM215Z: 62149
    • PTM215ZE: 62081
  • frame.Payload.payloadSize
    • PTM215Z: 46
    • PTM215ZE: 27
  • frame.Payload.commandFrame.options
    • PTM215Z: 197
    • PTM215ZE: 129
The full ZCL data for one of the PTM215Z
{
    "frame": {
        "Header": {
            "frameControl": {
                "frameType": 1,
                "manufacturerSpecific": false,
                "direction": 0,
                "disableDefaultResponse": false,
                "reservedBits": 0
            },
            "transactionSequenceNumber": 205,
            "manufacturerCode": null,
            "commandIdentifier": 4
        },
        "Payload": {
            "options": 62149,
            "srcID": 24139860,
            "frameCounter": 717,
            "commandID": 224,
            "payloadSize": 46,
            "commandFrame": {
                "deviceID": 2,
                "options": 197,
                "extendedOptions": 242,
                "securityKey": {
                    "type": "Buffer",
                    "data": [
                        ...
                    ]
                },
                "keyMic": 2743600281,
                "outgoingCounter": 717
            }
        },
        "Command": {
            "ID": 4,
            "parameters": [
                {
                    "name": "options",
                    "type": 33
                },
                {
                    "name": "srcID",
                    "type": 35
                },
                {
                    "name": "frameCounter",
                    "type": 35
                },
                {
                    "name": "commandID",
                    "type": 32
                },
                {
                    "name": "payloadSize",
                    "type": 32
                },
                {
                    "name": "commandFrame",
                    "type": 1009
                }
            ],
            "name": "commisioningNotification"
        }
    },
    "address": 24139860,
    "endpoint": 242,
    "linkquality": 127,
    "groupID": 2948,
    "wasBroadcast": false,
    "destinationEndpoint": 1
}
The full ZCL data for the PTM215ZE
{
    "frame": {
        "Header": {
            "frameControl": {
                "frameType": 1,
                "manufacturerSpecific": false,
                "direction": 0,
                "disableDefaultResponse": false,
                "reservedBits": 0
            },
            "transactionSequenceNumber": 144,
            "manufacturerCode": null,
            "commandIdentifier": 4
        },
        "Payload": {
            "options": 62081,
            "srcID": 22046452,
            "frameCounter": 842,
            "commandID": 224,
            "payloadSize": 27,
            "commandFrame": {
                "deviceID": 2,
                "options": 129,
                "extendedOptions": 242,
                "securityKey": {
                    "type": "Buffer",
                    "data": [
                        ...
                    ]
                },
                "keyMic": 1919727306,
                "outgoingCounter": 842
            }
        },
        "Command": {
            "ID": 4,
            "parameters": [
                {
                    "name": "options",
                    "type": 33
                },
                {
                    "name": "srcID",
                    "type": 35
                },
                {
                    "name": "frameCounter",
                    "type": 35
                },
                {
                    "name": "commandID",
                    "type": 32
                },
                {
                    "name": "payloadSize",
                    "type": 32
                },
                {
                    "name": "commandFrame",
                    "type": 1009
                }
            ],
            "name": "commisioningNotification"
        }
    },
    "address": 22046452,
    "endpoint": 242,
    "linkquality": 127,
    "groupID": 2948,
    "wasBroadcast": false,
    "destinationEndpoint": 1
}

I think there is something to be done before the onDeviceJoinedGreenPower method of controller.ts create the model ID (GreenPower_${payload.deviceID}), but I don’t know where to start (maybe add some infos to GreenPowerDeviceJoinedPayload in greenPower.ts, then the controller can check those infos and build the model ID accordingly?).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Aug 31, 2021

Great, sounds like a much better way to identify those devices. I currently reverted all the green power changes since we don’t want to include them in the 1 September release.

Would be great if you could make the PRs again! (for zigbee-herdsman-converters and zigbee2mqtt.io)

1reaction
fredericseilercommented, Aug 5, 2021

Great, I’ll come back to you with a PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PTM 215ZE - EnOcean
PTM 215ZE enables the realization of energy harvesting wireless switches for EnOcean systems communicating based on the 2.4 GHz IEEE 802.15.4 radio standard ......
Read more >
Can not integrate PTM215z (friends of hue) to zigbee2mqtt
Hi I just tried to connect a senic switch (ptm215z enocean) with the ... switches based on the Zigbee 3.0 pre-certified PTM215ZE/PTM215Z and ......
Read more >
Switch Commissioning Procedure - Philips
This switch contains a PTM215Z EnOcean module internally as shown in Figure 1. For commissioning this switch into a group, the cover need...
Read more >
Koen Kanters zigbee-herdsman Issues - Giters
Schneider Electric Odace/Wiser 10A relay switch. Updated 5 days ago 1 ... Differentiate PTM215Z and PTM215ZE ZGP switches. Closed a year ago 22 ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found