Differentiate PTM215Z and PTM215ZE ZGP switches
See original GitHub issueHi,
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:
- Created 2 years ago
- Comments:22 (22 by maintainers)
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)
Great, I’ll come back to you with a PR.