Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hue Tap: missing commands (Philips 8718696743133/EnOcean PTM 215Z) #18088

Closed
dieneuser opened this issue Jun 22, 2023 · 10 comments
Closed

Hue Tap: missing commands (Philips 8718696743133/EnOcean PTM 215Z) #18088

dieneuser opened this issue Jun 22, 2023 · 10 comments
Labels
problem Something isn't working

Comments

@dieneuser
Copy link

What happened?

I have successfully connected an Enocean PTM switch - it will shown as Hue Tap. Unfortunately, only the individual buttons are published. As soon as I press and release the upper and lower buttons together, I get an error message. The action payload is for those buttons null.

2023-06-22 16:50:20Hue Tap: missing command '98'
Info 2023-06-22 16:50:20MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:19+02:00","linkquality":90}'
Debug 2023-06-22 16:50:20Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":99,"frameCounter":606,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:20Hue Tap: missing command '99'
Info 2023-06-22 16:50:20MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:19+02:00","linkquality":90}'
Debug 2023-06-22 16:50:22Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":100,"frameCounter":607,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:22Hue Tap: missing command '100'
Info 2023-06-22 16:50:22MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:20+02:00","linkquality":90}'
Debug 2023-06-22 16:50:22Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":101,"frameCounter":608,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:22Hue Tap: missing command '101'
Info 2023-06-22 16:50:22MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:21+02:00","linkquality":90}'

Under the link (https://www.zigbee2mqtt.io/devices/PTM_215Z.htm) all possible actions of the module are listed - only these (https://www.zigbee2mqtt.io/devices/8718696743133.html) work for me, although the module is labeled with PTM 215Z and sends the codes 98, 99, 100 and 101. Is there an error in the integration?

What did you expect to happen?

I expect all the buttons to deliver a mqtt action with payload.

How to reproduce it (minimal and precise)

multiple join and rejoin of the button switch.

Zigbee2MQTT version

1.31.2

Adapter firmware version

20210708

Adapter

CC2652P Sonoff_Zigbee_3.0_USB_Dongle_Plus

Debug log

Debug 2023-06-22 16:50:09Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":34,"frameCounter":601,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Info 2023-06-22 16:50:09MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"press_1","last_seen":"2023-06-22T16:50:08+02:00","linkquality":87}'
Info 2023-06-22 16:50:09MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"","last_seen":"2023-06-22T16:50:08+02:00","linkquality":87}'
Info 2023-06-22 16:50:09MQTT publish: topic 'zigbee2mqtt/Test Schalter/action', payload 'press_1'
Debug 2023-06-22 16:50:11Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":16,"frameCounter":602,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Info 2023-06-22 16:50:11MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"press_2","last_seen":"2023-06-22T16:50:10+02:00","linkquality":87}'
Info 2023-06-22 16:50:12MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"","last_seen":"2023-06-22T16:50:10+02:00","linkquality":87}'
Info 2023-06-22 16:50:12MQTT publish: topic 'zigbee2mqtt/Test Schalter/action', payload 'press_2'
Debug 2023-06-22 16:50:13Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":18,"frameCounter":603,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Info 2023-06-22 16:50:13MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"press_4","last_seen":"2023-06-22T16:50:12+02:00","linkquality":87}'
Info 2023-06-22 16:50:13MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"","last_seen":"2023-06-22T16:50:12+02:00","linkquality":87}'
Info 2023-06-22 16:50:13MQTT publish: topic 'zigbee2mqtt/Test Schalter/action', payload 'press_4'
Debug 2023-06-22 16:50:17Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":17,"frameCounter":604,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Info 2023-06-22 16:50:17MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"press_3","last_seen":"2023-06-22T16:50:15+02:00","linkquality":87}'
Info 2023-06-22 16:50:17MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":"","last_seen":"2023-06-22T16:50:15+02:00","linkquality":87}'
Info 2023-06-22 16:50:17MQTT publish: topic 'zigbee2mqtt/Test Schalter/action', payload 'press_3'
Debug 2023-06-22 16:50:20Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":98,"frameCounter":605,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948


2023-06-22 16:50:20Hue Tap: missing command '98'
Info 2023-06-22 16:50:20MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:19+02:00","linkquality":90}'
Debug 2023-06-22 16:50:20Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":99,"frameCounter":606,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:20Hue Tap: missing command '99'
Info 2023-06-22 16:50:20MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:19+02:00","linkquality":90}'
Debug 2023-06-22 16:50:22Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":100,"frameCounter":607,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:22Hue Tap: missing command '100'
Info 2023-06-22 16:50:22MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:20+02:00","linkquality":90}'
Debug 2023-06-22 16:50:22Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":101,"frameCounter":608,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-22 16:50:22Hue Tap: missing command '101'
Info 2023-06-22 16:50:22MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-22T16:50:21+02:00","linkquality":90}'
@dieneuser dieneuser added the problem Something isn't working label Jun 22, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 22, 2023

Can you provide the data/database.db entry of your device?

@dieneuser
Copy link
Author

@Koenkk
Could you explain what exactly I need to do? I'm just starting with Zigbee2MQTT since yesterday.

What I discovered in the meantime is that in the fromZigbee.js and philips.js the data for the pressed keys are missing:

98: 'press_3_and_4'
99: 'release_3_and_4'
100: 'press_1_and_2'
101: 'release_1_and_2'

Previously I used the deconz integration in HA, everything worked correctly there.

@Koenkk
Copy link
Owner

Koenkk commented Jun 23, 2023

You can find this file in the z2m data folder (next to configuration.yaml)

@dieneuser
Copy link
Author

...so, here the data for the Philips Hue Tap/PTM 215Z module from my database.db file:

{
  "id": 3,
  "type": "GreenPower",
  "ieeeAddr": "0x0000000000482097",
  "nwkAddr": 8343,
  "manufId": null,
  "modelId": "GreenPower_2",
  "epList": [
    242
  ],
  "endpoints": {
    "242": {
      "epId": 242,
      "inClusterList": "",
      "outClusterList": "",
      "clusters": "",
      "binds": "",
      "configuredReportings": "",
      "meta": ""
    }
  },
  "interviewCompleted": true,
  "meta": {},
  "lastSeen": 1687463857716,
  "defaultSendRequestWhen": "immediate"
}

@dieneuser
Copy link
Author

dieneuser commented Jun 23, 2023

I have changed the files fromZigbee.js and philips.js directly in the Z2MQTT container for testing. After a restart the switch works as expected and there are no more error messages. Could you adjust the lines in the project? Or how would I solve the problem cleanly with an external converter in my local installation? Then I could start migrating from Deconz to Z2MQTT.

fromZigbee.js
line: 5520
from: const lookup = {0x22: 'press_1', 0x10: 'press_2', 0x11: 'press_3', 0x12: 'press_4'};
to: const lookup = {0x22: 'press_1', 0x10: 'press_2', 0x11: 'press_3', 0x12: 'press_4', 0x62: 'press_3_and_4', 0x63: 'release_3_and_4', 0x64: 'press_1_and_2', 0x65: 'release_1_and_2'};

philips.js
line: 2617
from: exposes: [e.action(['press_1', 'press_2', 'press_3', 'press_4'])],
to: exposes: [e.action(['press_1', 'press_2', 'press_3', 'press_4', 'press_3_and_4', 'release_3_and_4', 'press_1_and_2', 'release_1_and_2'])],

@Koenkk
Copy link
Owner

Koenkk commented Jun 24, 2023

Could you check if the issue is fixed with the following external converter: https://gist.github.com/Koenkk/302b6af0aaa020e347314788f2e67b12

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m, check if issue is fixed

@dieneuser
Copy link
Author

Unfortunately the converter does not work, it seems that it is not used. I get again/still the error message that the commands 98, 99, 100 and 101 are missing.

2023-06-25 09:30:34Successfully changed options
Info 2023-06-25 09:30:34MQTT publish: topic 'zigbee2mqtt/bridge/response/options', payload '{"data":{"restart_required":false},"status":"ok","transaction":"hlclq-1"}'
Debug 2023-06-25 09:30:41Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":100,"frameCounter":920,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-25 09:30:41Hue Tap: missing command '100'
Info 2023-06-25 09:30:41MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-25T09:30:41+02:00","linkquality":76}'
Debug 2023-06-25 09:30:42Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":101,"frameCounter":921,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-25 09:30:42Hue Tap: missing command '101'
Info 2023-06-25 09:30:42MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-25T09:30:42+02:00","linkquality":76}'
Debug 2023-06-25 09:30:44Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":98,"frameCounter":922,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-25 09:30:44Hue Tap: missing command '98'
Info 2023-06-25 09:30:44MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-25T09:30:44+02:00","linkquality":76}'
Debug 2023-06-25 09:30:44Received Zigbee message from 'Test Schalter', type 'commandNotification', cluster 'greenPower', data '{"commandFrame":{"raw":{"data":[134,62,255],"type":"Buffer"}},"commandID":99,"frameCounter":923,"gppGddLink":255,"gppNwkAddr":16006,"options":21664,"payloadSize":0,"srcID":4726935}' from endpoint 242 with groupID 2948
Error 2023-06-25 09:30:44Hue Tap: missing command '99'
Info 2023-06-25 09:30:44MQTT publish: topic 'zigbee2mqtt/Test Schalter', payload '{"action":null,"last_seen":"2023-06-25T09:30:44+02:00","linkquality":76}'

But I also give that the mapping table from fromZigbee: [fz.enocean_ptm215z] will not fit - I only get the commands in fromZigbee: [fz.hue_tap] with the extension from my post for the ids 98, 99, 100 and 101. Other codes are not transferred.

I think that my PTM215Z module is the same as in the Philips Hue Tap - which is integrated here but only with the primary buttons and must be supplemented with the remaining 4 commands in the library fromZigbee.js. #18088 (comment)

image
image

@Koenkk
Copy link
Owner

Koenkk commented Jun 25, 2023

  • Where did you buy this model?
  • It seems your device is a bit exotic, it hijacks the Hue Tap ieeeAddr format, therefore I propose the following
    • Extend the lookup in fz.hue_tap
    • But not add it to the e.action() of Hue Tap (since if it is a real Hue Tap, these actions are not supported). Note that this is only used for the doc generation (so functionally everything will work)

@dieneuser
Copy link
Author

My switches are from Berker/Hager: https://hager.com/de/loesungen/berker-schalterprogramme/friends-of-hue from the Friends of Hue series. I think all manufacturers of these switches use the same module from the Hue Tap.
Your suggestion of the implementation sounds good. Do you extend the lookup in fz.hue_tap?

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Jun 25, 2023
@Koenkk
Copy link
Owner

Koenkk commented Jun 25, 2023

Integrated the fix!

Changes will be available in the dev branch tomorrow. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants