zigbeefordomoticz / z4d-certified-devices

GNU General Public License v3.0
4 stars 5 forks source link

[Model Certification] - Aotec Zigbee Button #12

Closed shger21 closed 1 year ago

shger21 commented 1 year ago

Aotec Button is small button, which have three clicking operations for button single click double click long press It has also temperature sensor for ambient temperature

https://aeotec.com/products/aeotec-button/

* What do you expect
        It would be good, if after pairing Domoticz switch selector type widget is created with three levels,
       each level responding to different clicking operation.  
       With that, Domoticz scripting could be used for detecting button clicks and creating operations for different clicks.

       Normal temperature sensor is created for ambient temperature measurement.
  1. Document as much what works, what doesn't work, what do you miss, what do you need Aotech Button pairs with z4d. Three widgets are created Button Voltage Button Temperature Button Switch, type Door switch

    Button Temperature widget operates as expected and shows device ambient temperature.

    Button switch widget doesn't work satisfactorily: Only single click is detected and widget changes to "Door Open". After a while (30-60 seconds), widget changes back to "Door Closed" autonomously. Widget doesn't respond to double clicks and long presses. Sometimes also single click is not detected by widget.

Following snips for Debug log indicate that pressing button create 0500 cluster messages, where alarm1 and alarm2 are activated depending on click type. For single click, alarm1 is activated. For double click, alarm2 is activated. For long press, both alarm1 and alarm2 are activated. After widget stops responding to single click, I could still see 0500 cluster messages after clicking button, even though widget didn't respond. Seems some attribute reports are missing from log in that case.

  1. Debug Logs from single click, button short id 5cda: 2023-10-16 23:53:57,495 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000090d00010000000000, LQI: 45' 2023-10-16 23:53:57,496 INFO :b'zcl_decoders sending a default response for command 00' 2023-10-16 23:53:57,497 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: False Sqn: 0d ManufCode: None Command: 00 Data: 010000000000 Payload: 090d00010000000000' 2023-10-16 23:53:57,503 INFO :b'buildframe_8401_cmd - 5cda 01 0500 Data: 010000000000' 2023-10-16 23:53:57,507 INFO :b'Decode8401 - Reception Zone status change notification: 0d010500025cda000100000000' 2023-10-16 23:53:57,509 INFO :b'Decode8401 - MsgSQN: 0d MsgSrcAddr: 5cda MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0001 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-16 23:53:57,509 INFO :b'IAS Zone for device:5cda - alarm1: 1, alarm2: 0, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-16 23:53:57,510 INFO :b'Decode8401 MsgZoneStatus: 01 ' 2023-10-16 23:53:57,511 INFO :b'get_device_config_param: 5cda Config: MotionViaIASAlarm1' 2023-10-16 23:53:57,512 INFO :b'MotionViaIASAlarm1 = None' 2023-10-16 23:53:57,514 INFO :b'button = 01' 2023-10-16 23:53:57,516 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000080e0a0200190100, LQI: 45' 2023-10-16 23:53:57,536 INFO :b'zcl_decoders sending a default response for command 0a' 2023-10-16 23:53:57,543 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: True Sqn: 0e ManufCode: None Command: 0a Data: 0200190100 Payload: 080e0a0200190100' 2023-10-16 23:53:57,544 INFO :b'zcl_decoders Sqn: 14/0e ManufCode: None Command: 0a Data: 0200190100 ' 2023-10-16 23:53:57,546 INFO :b'buildframe_report_attribute_response - 5cda 01 0500 Data: 0200190100' 2023-10-16 23:53:57,547 INFO :b'Decode8102 - Attribute Reports: [5cda:01] MsgSQN: 0e ClusterID: 0500 AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0001<' 2023-10-16 23:53:57,548 INFO :b'scan_attribute_reponse - Sqn: 0e i_sqn: 0e Nwkid: 5cda Ep: 01 Cluster: 0500 MsgData: 0e5cda0105000002001900020001 Type: 8102' 2023-10-16 23:53:57,549 INFO :b'scan_attribute_reponse - 8102 idx: 28 Read Attribute Response: [5cda:01] ClusterID: 0500 MsgSQN: 0e, i_sqn: 0e, AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0001<' 2023-10-16 23:53:57,550 INFO :b'Decode8102 - LQI: 45 Received Cluster:0500 Attribute: 0002 Value: 0001 from (5cda/01)' 2023-10-16 23:53:58,127 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 45'

  2. after a while, autonomous messages in log and widget responds "Door Closed" 2023-10-16 23:54:58,070 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000080f0a0200190000, LQI: 45' 2023-10-16 23:54:58,071 INFO :b'zcl_decoders sending a default response for command 0a' 2023-10-16 23:54:58,072 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: True Sqn: 0f ManufCode: None Command: 0a Data: 0200190000 Payload: 080f0a0200190000' 2023-10-16 23:54:58,074 INFO :b'zcl_decoders Sqn: 15/0f ManufCode: None Command: 0a Data: 0200190000 ' 2023-10-16 23:54:58,075 INFO :b'buildframe_report_attribute_response - 5cda 01 0500 Data: 0200190000' 2023-10-16 23:54:58,076 INFO :b'Decode8102 - Attribute Reports: [5cda:01] MsgSQN: 0f ClusterID: 0500 AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0000<' 2023-10-16 23:54:58,079 INFO :b'scan_attribute_reponse - Sqn: 0f i_sqn: 0f Nwkid: 5cda Ep: 01 Cluster: 0500 MsgData: 0f5cda0105000002001900020000 Type: 8102' 2023-10-16 23:54:58,080 INFO :b'scan_attribute_reponse - 8102 idx: 28 Read Attribute Response: [5cda:01] ClusterID: 0500 MsgSQN: 0f, i_sqn: 0f, AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0000<' 2023-10-16 23:54:58,080 INFO :b'Decode8102 - LQI: 45 Received Cluster:0500 Attribute: 0002 Value: 0000 from (5cda/01)' 2023-10-16 23:54:58,581 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 45'

  3. double click, button short id still 5cda:

2023-10-16 23:58:36,503 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000091300020000000000, LQI: 48' 2023-10-16 23:58:36,504 INFO :b'zcl_decoders sending a default response for command 00' 2023-10-16 23:58:36,506 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: False Sqn: 13 ManufCode: None Command: 00 Data: 020000000000 Payload: 091300020000000000' 2023-10-16 23:58:36,509 INFO :b'buildframe_8401_cmd - 5cda 01 0500 Data: 020000000000' 2023-10-16 23:58:36,512 INFO :b'Decode8401 - Reception Zone status change notification: 13010500025cda000200000000' 2023-10-16 23:58:36,513 INFO :b'Decode8401 - MsgSQN: 13 MsgSrcAddr: 5cda MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0002 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-16 23:58:36,514 INFO :b'IAS Zone for device:5cda - alarm1: 0, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-16 23:58:36,515 INFO :b'Decode8401 MsgZoneStatus: 02 ' 2023-10-16 23:58:36,516 INFO :b'get_device_config_param: 5cda Config: MotionViaIASAlarm1' 2023-10-16 23:58:36,516 INFO :b'MotionViaIASAlarm1 = None' 2023-10-16 23:58:36,518 INFO :b'button = 02' 2023-10-16 23:58:36,520 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda02000008140a0200190200, LQI: 45' 2023-10-16 23:58:36,521 INFO :b'zcl_decoders sending a default response for command 0a' 2023-10-16 23:58:36,523 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: True Sqn: 14 ManufCode: None Command: 0a Data: 0200190200 Payload: 08140a0200190200' 2023-10-16 23:58:36,524 INFO :b'zcl_decoders Sqn: 20/14 ManufCode: None Command: 0a Data: 0200190200 ' 2023-10-16 23:58:36,526 INFO :b'buildframe_report_attribute_response - 5cda 01 0500 Data: 0200190200' 2023-10-16 23:58:36,526 INFO :b'Decode8102 - Attribute Reports: [5cda:01] MsgSQN: 14 ClusterID: 0500 AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0002<' 2023-10-16 23:58:36,527 INFO :b'scan_attribute_reponse - Sqn: 14 i_sqn: 14 Nwkid: 5cda Ep: 01 Cluster: 0500 MsgData: 145cda0105000002001900020002 Type: 8102' 2023-10-16 23:58:36,529 INFO :b'scan_attribute_reponse - 8102 idx: 28 Read Attribute Response: [5cda:01] ClusterID: 0500 MsgSQN: 14, i_sqn: 14, AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0002<' 2023-10-16 23:58:36,537 INFO :b'Decode8102 - LQI: 45 Received Cluster:0500 Attribute: 0002 Value: 0002 from (5cda/01)' 2023-10-16 23:58:37,141 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 45'

The "Received Cluster:0500 Attribute:...." message doesn't seem to always follow the single click, double click, long press value, sometimes there is "Value: 0000" even though this message follows "IAS Zone for device" message. Only reliable message seems to bee "IAS Zone" and alarm1 and alarm2 corresponding to button click.

  1. Here is example where Domoticz widget didn't respond to single click:

    2023-10-17 00:13:59,651 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000093600010000000000, LQI: 48' 2023-10-17 00:13:59,652 INFO :b'zcl_decoders sending a default response for command 00' 2023-10-17 00:13:59,653 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: False Sqn: 36 ManufCode: None Command: 00 Data: 010000000000 Paylo ad: 093600010000000000' 2023-10-17 00:13:59,655 INFO :b'buildframe_8401_cmd - 5cda 01 0500 Data: 010000000000' 2023-10-17 00:13:59,655 INFO :b'Decode8401 - Reception Zone status change notification: 36010500025cda000100000000' 2023-10-17 00:13:59,655 INFO :b'Decode8401 - MsgSQN: 36 MsgSrcAddr: 5cda MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0001 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-17 00:13:59,656 INFO :b'IAS Zone for device:5cda - alarm1: 1, alarm2: 0, tamper: 0, battery: 0, Support Reporting: 0, restore Re porting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-17 00:13:59,656 INFO :b'Decode8401 MsgZoneStatus: 01 ' 2023-10-17 00:13:59,656 INFO :b'get_device_config_param: 5cda Config: MotionViaIASAlarm1' 2023-10-17 00:13:59,656 INFO :b'MotionViaIASAlarm1 = None' 2023-10-17 00:13:59,656 INFO :b'button = 01' 2023-10-17 00:14:00,165 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 48' 2023-10-17 00:14:07,729 INFO :b'ZigateRead - MsgType: 8002, Data: 0001040402010102d58202000018f10a00002939f8, LQI: 48' 2023-10-17 00:14:07,730 INFO :b'zcl_decoders Zcl.ddr: 1 GlobalCommand: True Sqn: f1 ManufCode: None Command: 0a Data: 00002939f8 Payload: 18f10a00002939f8' 2023-10-17 00:14:07,731 INFO :b'zcl_decoders Sqn: 241/f1 ManufCode: None Command: 0a Data: 00002939f8 ' 2023-10-17 00:14:07,731 INFO :b'buildframe_report_attribute_response - d582 01 0402 Data: 00002939f8' 2023-10-17 00:14:07,732 INFO :b'Decode8102 - Attribute Reports: [d582:01] MsgSQN: f1 ClusterID: 0402 AttributeID: 0000 Status: 00 Type: 2 9 Size: 0002 ClusterData: >f839<' 2023-10-17 00:14:07,733 INFO :b'scan_attribute_reponse - Sqn: f1 i_sqn: f1 Nwkid: d582 Ep: 01 Cluster: 0402 MsgData: f1d58201040200000029 0002f839 Type: 8102' 2023-10-17 00:14:07,733 INFO :b'scan_attribute_reponse - 8102 idx: 28 Read Attribute Response: [d582:01] ClusterID: 0402 MsgSQN: f1, i_sq n: f1, AttributeID: 0000 Status: 00 Type: 29 Size: 0002 ClusterData: >f839<' 2023-10-1

  2. Select Plugin Raw Devices (json) Button device is "AstiaButton" in following export.

export.json

pipiche38 commented 1 year ago

Thanks. I'll see what I can do with that. make sure that you are on the latest stable7 7.1.004 as I'll most-likely require you to move to a particular branch.

Do you want to keep the Voltage widget (as I believe the Battery level is provided ) ?

Would you mind providing the same log when "holding" the button ?

shger21 commented 1 year ago

Yes, Voltage widget looks fine and lets keep it; there is currently "2.6V". Lets see what happens when battery is depleted.

Here is what happens with long press of button: 2023-10-17 00:39:35,153 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000096900030000000000, LQI: 48' 2023-10-17 00:39:35,154 INFO :b'zcl_decoders sending a default response for command 00' 2023-10-17 00:39:35,155 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: False Sqn: 69 ManufCode: None Command: 00 Data: 030000000000 Payload: 096900030000000000' 2023-10-17 00:39:35,157 INFO :b'buildframe_8401_cmd - 5cda 01 0500 Data: 030000000000' 2023-10-17 00:39:35,157 INFO :b'Decode8401 - Reception Zone status change notification: 69010500025cda000300000000' 2023-10-17 00:39:35,157 INFO :b'Decode8401 - MsgSQN: 69 MsgSrcAddr: 5cda MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0003 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-17 00:39:35,158 INFO :b'IAS Zone for device:5cda - alarm1: 1, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-17 00:39:35,158 INFO :b'Decode8401 MsgZoneStatus: 03 ' 2023-10-17 00:39:35,158 INFO :b'get_device_config_param: 5cda Config: MotionViaIASAlarm1' 2023-10-17 00:39:35,158 INFO :b'MotionViaIASAlarm1 = None' 2023-10-17 00:39:35,158 INFO :b'button = 03' 2023-10-17 00:39:35,667 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 48'

Button was again in the state where we don't get the attribute messages after clicking, hence only this short one above. Little bit trying and I managed to get the longer one also:

2023-10-17 00:42:29,631 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda020000097100030000000000, LQI: 48' 2023-10-17 00:42:29,632 INFO :b'zcl_decoders sending a default response for command 00' 2023-10-17 00:42:29,633 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: False Sqn: 71 ManufCode: None Command: 00 Data: 030000000000 Payload: 097100030000000000' 2023-10-17 00:42:29,636 INFO :b'buildframe_8401_cmd - 5cda 01 0500 Data: 030000000000' 2023-10-17 00:42:29,638 INFO :b'Decode8401 - Reception Zone status change notification: 71010500025cda000300000000' 2023-10-17 00:42:29,640 INFO :b'Decode8401 - MsgSQN: 71 MsgSrcAddr: 5cda MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0003 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-17 00:42:29,640 INFO :b'IAS Zone for device:5cda - alarm1: 1, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-17 00:42:29,641 INFO :b'Decode8401 MsgZoneStatus: 03 ' 2023-10-17 00:42:29,642 INFO :b'get_device_config_param: 5cda Config: MotionViaIASAlarm1' 2023-10-17 00:42:29,643 INFO :b'MotionViaIASAlarm1 = None' 2023-10-17 00:42:29,643 INFO :b'button = 03' 2023-10-17 00:42:29,647 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101025cda02000008720a0200190300, LQI: 48' 2023-10-17 00:42:29,647 INFO :b'zcl_decoders sending a default response for command 0a' 2023-10-17 00:42:29,648 INFO :b'zcl_decoders Zcl.ddr: 0 GlobalCommand: True Sqn: 72 ManufCode: None Command: 0a Data: 0200190300 Payload: 08720a0200190300' 2023-10-17 00:42:29,649 INFO :b'zcl_decoders Sqn: 114/72 ManufCode: None Command: 0a Data: 0200190300 ' 2023-10-17 00:42:29,650 INFO :b'buildframe_report_attribute_response - 5cda 01 0500 Data: 0200190300' 2023-10-17 00:42:29,652 INFO :b'Decode8102 - Attribute Reports: [5cda:01] MsgSQN: 72 ClusterID: 0500 AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0003<' 2023-10-17 00:42:29,660 INFO :b'scan_attribute_reponse - Sqn: 72 i_sqn: 72 Nwkid: 5cda Ep: 01 Cluster: 0500 MsgData: 725cda0105000002001900020003 Type: 8102' 2023-10-17 00:42:29,664 INFO :b'scan_attribute_reponse - 8102 idx: 28 Read Attribute Response: [5cda:01] ClusterID: 0500 MsgSQN: 72, i_sqn: 72, AttributeID: 0002 Status: 00 Type: 19 Size: 0002 ClusterData: >0003<' 2023-10-17 00:42:29,666 INFO :b'Decode8102 - LQI: 48 Received Cluster:0500 Attribute: 0002 Value: 0003 from (5cda/01)' 2023-10-17 00:42:30,283 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 48' 2023-10-17 00:42:37,461 INFO :b'ZigateRead - MsgType: 8011, Data: 005cda, LQI: 48'

shger21 commented 1 year ago

And to avoid confusion; these lines are some additional debug info I added to "Modules/input.py":

2023-10-17 00:39:35,158 INFO :b'button = 03'

I'm running: Oct 16 23:07:07 curder domoticz[2896260]: 2023-10-16 23:07:07.267 Status: ZiggiS: Zigbee for Domoticz (z4d) plugin stable7-7.1.001 started

No problems to move 7.1.004

pipiche38 commented 1 year ago

This looks an interesting button. The fact that it brings also temp is a nice to have. The button click are communicated via the Cluster0500 ( IAS) and after 30 seconds the button is sending an Off

Cluster 0x0500 Attributte 0x0002 - Value 0001 - Click Cluster 0x0500 Attributte 0x0002 - Value 0002 - Double Click Cluster 0x0500 Attributte 0x0002 - Value 0003 - Hold Cluster 0x0500 Attributte 0x0002 - Value 0000 - No activity (off)

Ok. so please upgrade to 7.1.004 and check that all still work.

Then switch to aotec-zigbee-button. ( git checkout aotec-zigbee-button )

remove the button from domoticz and plugin restart the plugin redo the pairing You should get 3 Widgets

then do your tests 1 click, 2 click , Hold to see what is happening

The debugging flag would be

Screenshot 2023-10-17 at 11 45 42
shger21 commented 1 year ago

After upgrade and restart and redoing the pairing, I do get the three widgets.

Temperature and voltage widgets are fine. However, switch selector does not work as expected.

Now I get after double click 2023-10-18 00:17:55,210 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101024efc020000090f00020000000000, LQI: 60' 2023-10-18 00:17:55,211 INFO :b'Decode8401 - Reception Zone status change notification: 0f010500024efc000200000000' 2023-10-18 00:17:55,907 INFO :b'Decode8401 - MsgSQN: 0f MsgSrcAddr: 4efc MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0002 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-18 00:17:55,907 INFO :b'IAS Zone for device:4efc - alarm1: 0, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-18 00:17:55,908 INFO :b'Decode8401 MsgZoneStatus: 02 ' 2023-10-18 00:17:55,908 INFO :b'get_device_config_param: 4efc Config: MotionViaIASAlarm1' 2023-10-18 00:17:55,908 INFO :b'MotionViaIASAlarm1 = None' 2023-10-18 00:17:55,921 INFO :b'ZigateRead - MsgType: 8011, Data: 004efc, LQI: 60'

But Domoticz widget doesn't change to "Double Click". It will stay at "Click". Similar message but different alarm1/alarm2 with single and long.

If I manually change Domoticz switch selector to "Double Click", there is message 2023-10-18 00:20:13,434 INFO :b"mgtCommand - You are trying to action not allowed for Device: AstiaButton Sw Type: [('01', '1676', 'Button_3')] and DeviceType: Button_3 Command: Set Level Level:20"

Then, after single click 2023-10-18 00:22:18,047 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101024efc020000091800010000000000, LQI: 48' 2023-10-18 00:22:18,049 INFO :b'Decode8401 - Reception Zone status change notification: 18010500024efc000100000000' 2023-10-18 00:22:18,061 INFO :b'Decode8401 - MsgSQN: 18 MsgSrcAddr: 4efc MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0001 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-18 00:22:18,061 INFO :b'IAS Zone for device:4efc - alarm1: 1, alarm2: 0, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-18 00:22:18,062 INFO :b'Decode8401 MsgZoneStatus: 01 ' 2023-10-18 00:22:18,062 INFO :b'get_device_config_param: 4efc Config: MotionViaIASAlarm1' 2023-10-18 00:22:18,063 INFO :b'MotionViaIASAlarm1 = None' 2023-10-18 00:22:18,576 INFO :b'ZigateRead - MsgType: 8011, Data: 004efc, LQI: 48'

and Domoticz widged changes to "Click". After changing Domoticz widget to other that "Click", widget will return to "Click" after clicking the button. It doesn't matter whether button is clicked is single, double or long, widget will always return to "Click".

pipiche38 commented 1 year ago

did you enable the ZclCluster debug parameter ?

shger21 commented 1 year ago

Yes I did, there are some bunch of stuff coming when I enable it

2023-10-18 10:02:17,939 INFO :b' _majdomo_formater: None' 2023-10-18 10:02:17,940 INFO :b' _majdomo_cluster: None' 2023-10-18 10:02:17,943 INFO :b' _majdomo_attribute: None' 2023-10-18 10:02:54,973 INFO :b"is_generic_zcl_cluster 0402/0000 and definition {'Enabled': True, 'Name': 'MeasuredValue', 'DataType': '29', 'Range': ['954d', '7fff'], 'SpecialValues': {'0800': 'temperature measurement is unknown'}, 'Acc': 'RP', 'Default': '', 'Mandatory': True, 'DomoClusterType': 'Temp', 'EvalExp': 'round(int(value) / 100, 1)', 'ActionList': ['check_store_value', 'upd_domo_device']}" 2023-10-18 10:02:54,973 INFO :b'Foundation Cluster - Nwkid: 4efc Ep: 01 Cluster: 0402 Attribute: 0000 Type: 29 Data: 0850 Source: 8102' 2023-10-18 10:02:54,974 INFO :b'compute_attribute_value - _decoding_value: None value: 2128' 2023-10-18 10:02:54,974 INFO :b"compute_attribute_value - _function: None FUNCTION_MODULE: {'compute_metering_conso': <function compute_metering_conso at 0x7fac371af0>, 'compute_electrical_measurement_conso': <function compute_electrical_measurement_conso at 0x7fac371b80>, 'current_position_lift_percent': <function CurrentPositionLiftPercentage at 0x7fac371c10>, 'legrand_operating_time': <function legrand_operating_time at 0x7f84116c10>, 'konke_onoff': <function konke_onoff at 0x7f84116b80>, 'chameleon_stge': <function chameleon_stge at 0x7f841169d0>}" 2023-10-18 10:02:54,975 INFO :b' . after evaluation value: 2128 -> 21.3' 2023-10-18 10:02:54,975 INFO :b'---> Data Action: check_store_value' 2023-10-18 10:02:54,975 INFO :b'---> Data Action: upd_domo_device' 2023-10-18 10:02:54,976 INFO :b'action_majdomodevice - 4efc/01 0402 0000 aeotec-button 21.3' 2023-10-18 10:02:54,976 INFO :b' _majdomo_formater: None' 2023-10-18 10:02:54,977 INFO :b' _majdomo_cluster: None' 2023-10-18 10:02:54,978 INFO :b' _majdomo_attribute: None'

However, nothing seems to come directly related to button click.

Maybe it is related what I reported earlier, sometimes I got more logging events when button is pressed, sometimes it just stopped and only the short ones with IAS Zone information appeared. The IAS Zone information seems to be the only reliable one that happens after button click.

After upgrade and re-pairing I don't seem to get the "more logging events" after click anymore, only the IAS message thing I reported.

pipiche38 commented 1 year ago

can you simply redo the same test as you did in introduction:

Logs for 1 click Logs for 2 clicks Logs for hold

shger21 commented 1 year ago

All three clicking functions do pretty much same:

1 click: 023-10-18 14:17:56,616 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101024efc020000090c00010000000000, LQI: 42' 2023-10-18 14:17:56,618 INFO :b'Decode8401 - Reception Zone status change notification: 0c010500024efc000100000000' 2023-10-18 14:17:56,623 INFO :b'Decode8401 - MsgSQN: 0c MsgSrcAddr: 4efc MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0001 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-18 14:17:56,624 INFO :b'IAS Zone for device:4efc - alarm1: 1, alarm2: 0, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-18 14:17:56,624 INFO :b'Decode8401 MsgZoneStatus: 01 ' 2023-10-18 14:17:56,625 INFO :b'get_device_config_param: 4efc Config: MotionViaIASAlarm1' 2023-10-18 14:17:56,625 INFO :b'MotionViaIASAlarm1 = None' 2023-10-18 14:17:57,127 INFO :b'ZigateRead - MsgType: 8011, Data: 004efc, LQI: 42'

2 clicks: 2023-10-18 14:21:08,228 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101024efc020000091100020000000000, LQI: 42' 2023-10-18 14:21:08,229 INFO :b'Decode8401 - Reception Zone status change notification: 11010500024efc000200000000' 2023-10-18 14:21:08,232 INFO :b'Decode8401 - MsgSQN: 11 MsgSrcAddr: 4efc MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0002 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-18 14:21:08,233 INFO :b'IAS Zone for device:4efc - alarm1: 0, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-18 14:21:08,233 INFO :b'Decode8401 MsgZoneStatus: 02 ' 2023-10-18 14:21:08,234 INFO :b'get_device_config_param: 4efc Config: MotionViaIASAlarm1' 2023-10-18 14:21:08,234 INFO :b'MotionViaIASAlarm1 = None' 2023-10-18 14:21:08,740 INFO :b'ZigateRead - MsgType: 8011, Data: 004efc, LQI: 42'

hold: 2023-10-18 14:21:47,745 INFO :b'ZigateRead - MsgType: 8002, Data: 00010405000101024efc020000091200030000000000, LQI: 42' 2023-10-18 14:21:47,755 INFO :b'Decode8401 - Reception Zone status change notification: 12010500024efc000300000000' 2023-10-18 14:21:47,761 INFO :b'Decode8401 - MsgSQN: 12 MsgSrcAddr: 4efc MsgEp:01 MsgClusterId: 0500 MsgZoneStatus: 0003 MsgExtStatus: 00 MsgZoneID: 00 MsgDelay: 0000' 2023-10-18 14:21:47,762 INFO :b'IAS Zone for device:4efc - alarm1: 1, alarm2: 1, tamper: 0, battery: 0, Support Reporting: 0, restore Reporting: 0, trouble: 0, acmain: 0, test: 0, battdef: 0' 2023-10-18 14:21:47,763 INFO :b'Decode8401 MsgZoneStatus: 03 ' 2023-10-18 14:21:47,763 INFO :b'get_device_config_param: 4efc Config: MotionViaIASAlarm1' 2023-10-18 14:21:47,764 INFO :b'MotionViaIASAlarm1 = None' 2023-10-18 14:21:48,271 INFO :b'ZigateRead - MsgType: 8011, Data: 004efc, LQI: 42'

pipiche38 commented 1 year ago

Can you check the Domoticz log to see if there is no errors ? this is weird as you get less logs than before, so i suspect a mistake on my end

shger21 commented 1 year ago

I can't see any errors, neither in Domoticz log nor plugin log with debug settings you provided.

Something seems to have changed, either with upgrade from 7.1.001 to 7.1.004 or with aotec-button. I don't get any "Read Attribute Response" to ClusterID:0500, like I did in logs before upgrade (see pre-upgrade log messages) There is "Read Attribute Response" to ClusterID:0006 which are from different zigbee device.

Button does not have any "0006" listed in EP1 raw devices, does it have any consequences?
On the other hand, it didn't have them before upgrade, either.

shger21 commented 1 year ago

Hold on, now I found some errors which happened during pairing process!

Oct 17 23:37:29 curder domoticz[2896260]: 2023-10-17 23:37:29.642 Status: ZiggiS: [None] NEW OBJECT: 4efc None Oct 17 23:37:30 curder domoticz[2896260]: 2023-10-17 23:37:30.431 Status: ZiggiS: [-] NEW OBJECT: 4efc Active Endpoint Response Ep: 01 LQI: 0 Oct 17 23:37:30 curder domoticz[2896260]: 2023-10-17 23:37:30.436 Status: ZiggiS: [-] NEW OBJECT: 4efc Request Simple Descriptor for Ep: 01 Oct 17 23:37:32 curder domoticz[2896260]: 2023-10-17 23:37:32.084 Status: ZiggiS: [0] NEW OBJECT: 4efc Model Name: aeotec-button Oct 17 23:37:32 curder domoticz[2896260]: 2023-10-17 23:37:32.084 Status: ZiggiS: [0] NEW OBJECT: 4efc Manufacturer Name: Samjin Oct 17 23:37:32 curder domoticz[2896260]: 2023-10-17 23:37:32.085 Status: ZiggiS: [None] NEW OBJECT: 4efc Request Node Descriptor Oct 17 23:37:33 curder domoticz[2896260]: 2023-10-17 23:37:33.484 #033[1;31mError: ZiggiS: . _cluster_zcl_attribute_retrieval 0500 not found in {'0000': { 'Description': 'Basic', 'Version': 1, 'Attributes': {'0000': {'Enabled': True, 'Name': 'ZCLVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'D efault': 8, 'Mandatory': True, 'SpecifStoragelvl1': 'ZCL Version', 'ActionList': ['check_store_value', 'store_specif_attribute']}, '0001': {'Enabled': True, 'Name': 'ApplicationVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'Default': 0, 'Mandatory': False, 'SpecifStoragelvl1': 'App Version', 'A ctionList': ['check_store_value', 'store_specif_attribute']}, '0002': {'Enabled': True, 'Name': 'StackVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Ac c': 'R', 'Default': 0, 'Mandatory': False, 'SpecifStoragelvl1': 'Stack Version', 'ActionList': ['check_store_value', 'store_specif_attribute']}, '0003': {'E nabled': True, 'Name': 'HWVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'Default': 0, 'Mandatory': False, 'SpecifStoragelvl1': 'HW Version' , 'ActionList': ['check_store_value', 'store_specif_attribute']}, '0004': {'Enabled': True, 'Name': 'ManufacturerName', 'DataType': '42', 'Acc': 'R', 'Defau lt': '', 'Mandatory': False, 'SpecifStoragelvl1': 'Manufacturer Name', 'ActionList': ['check_store_value', 'store_specif_attribute']}, '0005': {'Enabled': T rue, 'Name': 'ModelIdentifier', 'DataType': '42', 'Acc': 'R', 'Default': '', 'Mandatory': False, 'ActionList': ['check_store_value', 'basic_model_name']}, ' 0006': {'Enabled': True, 'Name': 'DateCode', 'DataType': '42', 'Acc': 'R', 'Default': '', 'Mandatory': False, 'SpecifStoragelvl1': 'SWBUILD_1', 'ActionList' : ['check_store_value', 'store_specif_attribute']}, '0007': {'Enabled': True, 'Name': 'PowerSource', 'DataType': '30', 'Range': ['00', 'ff'], 'Acc': 'R', 'D efault': 0, 'Mandatory': True, 'ActionList': ['check_store_value']}, '0008': {'Enabled': True, 'Name': 'GenericDevice-Class', 'DataType': '30', 'Range': ['0 0', 'ff'], 'Acc': 'R', 'Default': 255, 'Mandatory': False, 'ActionList': ['check_store_value']}, '0009': {'Enabled': True, 'Name': 'GenericDevice-Type', 'Da taType': '30', 'Range': ['00', 'ff'], 'Acc': 'R', 'Default': 255, 'Mandatory': False, 'ActionList': ['check_store_value']}, '000a': {'Enabled': True, 'Name' : 'ProductCode', 'DataType': '41', 'Acc': 'R', 'Default': '', 'Mandatory': False, 'ActionList': ['check_store_value']}, '000b': {'Enabled': True, 'Name': 'P roductURL', 'DataType': '42', 'Acc': 'R', 'Default': '', 'Mandatory': False, 'ActionList': ['check_store_value']}, '000c': {'Enabled': True, 'Name': 'Manufa cturerVersionDetails', 'DataType': '42', 'Acc': 'R', 'Default': '', 'Mandatory': False, 'ActionList': ['check_store_value']}, '000d': {'Enabled': True, 'Nam e' ..... Oct 17 23:37:33 curder domoticz[2896260]: 2023-10-17 23:37:33.690 #033[1;31mError: ZiggiS: . _cluster_zcl_attribute_retrieval 0500 not found in {'0000': {'Description': 'Basic', 'Version': 1, 'Attributes': {'0000': {'Enabled': True, 'Name': 'ZCLVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'Default': 8, 'Mandatory': True, 'SpecifStoragelvl1': 'ZCL Version', 'ActionList': ['check_store_value', 'store_specif_attribute']}, '0001': {'Enabled': True, 'Name': 'ApplicationVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'Default': 0, 'Mandatory': False, 'SpecifStoragelvl1': 'App Version', 'Ac ..... Oct 17 23:37:33 curder domoticz[2896260]: 2023-10-17 23:37:33.723 #033[1;31mError: ZiggiS: . _cluster_zcl_attribute_retrieval 0500 not found in {'0000': {'Description': 'Basic', 'Version': 1, 'Attributes': {'0000': {'Enabled': True, 'Name': 'ZCLVersion', 'DataType': '20', 'Range': ['00', 'ff'], 'Acc': 'R', 'D .... same thing about 5 times Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.934 ZiggiS: Assisted Pairing: Polling: ['4efc'] Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.934 ZiggiS: --> New device: 4efc Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: --> inDB , removed 4efc from List Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0000', 'ClusterDesc': 'Basic'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0001', 'ClusterDesc': 'Power Configuration'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0003', 'ClusterDesc': 'Identify'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0020', 'ClusterDesc': 'Poll Control'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0402', 'ClusterDesc': 'Temperature Measurement'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0500', 'ClusterDesc': 'IAS Zone'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0b05', 'ClusterDesc': 'Diagnostics'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ------> New Cluster: {'ClusterId': '0019', 'ClusterDesc': 'Over-the-Air Upgrade'} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: ----> New Ep: {'Ep': '01', 'Clusters': [{'ClusterId': '0000', 'ClusterDesc': 'Basic'}, {'ClusterId': '0001', 'ClusterDesc': 'Power Configuration'}, {'ClusterId': '0003', 'ClusterDesc': 'Identify'}, {'ClusterId': '0020', 'ClusterDesc': 'Poll Control'}, {'ClusterId': '0402', 'ClusterDesc': 'Temperature Measurement'}, {'ClusterId': '0500', 'ClusterDesc': 'IAS Zone'}, {'ClusterId': '0b05', 'ClusterDesc': 'Diagnostics'}, {'ClusterId': '0019', 'ClusterDesc': 'Over-the-Air Upgrade'}]} Oct 17 23:37:34 curder domoticz[2896260]: 2023-10-17 23:37:34.935 ZiggiS: --> New Device: {'NwkId': '4efc', 'ProvisionStatus': 'inDB', 'ProvisionStatusDesc': 'inDB', 'IEEE': '286d970001143d65', 'ProfileId': '', 'ProfileIdDesc': 'Unknow', 'ZDeviceID': '', 'ZDeviceIDDesc': 'Unknow', 'Model': 'aeotec-button', 'PluginCertified': 'yes', 'Ep': [{'Ep': '01', 'Clusters': [{'ClusterId': '0000', 'ClusterDesc': 'Basic'}, {'ClusterId': '0001', 'ClusterDesc': 'Power Configuration'}, {'ClusterId': '0003', 'ClusterDesc': 'Identify'}, {'ClusterId': '0020', 'ClusterDesc': 'Poll Control'}, {'ClusterId': '0402', 'ClusterDesc': 'Temperature Measurement'}, {'ClusterId': '0500', 'ClusterDesc': 'IAS Zone'}, {'ClusterId': '0b05', 'ClusterDesc': 'Diagnostics'}, {'ClusterId': '0019', 'ClusterDesc': 'Over-the-Air Upgrade'}]}]} Oct 17 23:37:35 curder domoticz[2896260]: 2023-10-17 23:37:35.671 #033[1;31mError: ZiggiS: . _cluster_zcl_attribute_retrieval 0500 not found in {'0000': { .... same error with long list few times more Oct 17 23:39:09 curder domoticz[2896260]: 2023-10-17 23:39:09.675 Status: ZiggiS: Request Disabling Accepting new Hardware Oct 17 23:39:09 curder domoticz[2896260]: 2023-10-17 23:39:09.704 Status: ZiggiS: Accepting new Hardware: Disable (Off) Oct 17 23:41:53 curder domoticz[2896260]: 2023-10-17 23:41:53.642 #033[1;31mError: ZiggiS: . _cluster_zcl_attribute_retrieval 0500 not found in ... lots of same error stuff, the I guess I disabled some debug log option to actually see something in log...

pipiche38 commented 1 year ago

that is what I'm looking for. I think I understood. let me come back to you later. if you can drop me the logs in keybase, that would be great

pipiche38 commented 1 year ago

https://github.com/zigbeefordomoticz/Domoticz-Zigbee/pull/1658