The issue is i have a aqara button which includes , but as zigbee stack is lacking does not work correctly. It does how ever update the lastwakeup variable when pressed or it wakes up.
I would like to use it as a doorbell. The problem is it wakes up and polls every hour.
log for auto wake up |02|02/26/20 16:51:16.161|Zigbee::handleGenericMessage Manufacturer SPECIFIC on profile 0x0104, cluster 0x0000 framectrl: 0x1c, dropping <0x75c28520>| |---|---|---| |06|02/26/20 16:51:16.162|Device_Variable::m_szValue_set device: 168 service: urn:micasaverde-com:serviceId:ZigbeeDevice1 variable: LastWakeup was: 1582732867 now: 1582735876 #hooks: 1 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 <0x75c28520>|
log for button press |02|02/26/20 16:51:32.104|ZigbeeNode::HandleMessage 0xc474 (168) Cluster 0x0012 NOT recognized <0x75c28520>| |---|---|---| |06|02/26/20 16:51:32.137|Device_Variable::m_szValue_set device: 158 service: urn:toggledbits-com|
So i have reactor monitoring the LastWakeup variable. A button press or device wake up both update the LastWakeup variable.
The question is, is there a way to distinguish between a button press and a device wake up using lua or reactor or anything else?
If you use the Device Spy in the “Tools” tab of any ReactorSensor (v3.5), it will tell you all of the variables that send events that are changing on the device. Through a bit of study, you may be able to figure out other variables that are changing, or a pattern to differentiate press from wakeup.
My workaround
The button wakes on press, double press, press hold, and realease.
So i set a reactor that has to repeat in 15 seconds.
this will trip if some one presses and hold for 1 sec and then release. If they release to early but press the button again within 15 sec, it trips. I’m hoping most will press and if they hear nothing they will press again within 15 seconds. This cuts the false triggers from the device wake up.
So untill we get a better Zigbee stack, the best functionality you can get from the Aqara mini switch button is - a press hold 1 second and release, or a press wait 1 second and press again.