This is a small hand wireless button , approx 3cmx3xm. It recognises 1x, 2x, 3x, 4x clicks. Apparently some models (with same model numberof WXKG11LM) recognise hold, but mine doesnt.
I have this setup in Shims as an On/Off device. The payload is like this
{"battery":100,"voltage":3145,"linkquality":97,"click":"double"}
Putting click as the payload key and leaving On Value blank, I get single, double, triple or quadruple populated in the device custom state of click. I can then create a trigger on the change of status when it equals one of these values.
The trouble is that the click state is not reset, so I have created a delayed action on my Button Topic Component Trigger to send a MQTT message back to the Button with a null click state. This works well.
The message back takes the values from the Indigo device states, so it has the correct values, as per this format.
{"battery":%%d:1473899162:battery%%,"voltage":%%d:1473899162:voltage%%,"linkquality":%%d:1473899162:linkquality%%,"click":""}
Aqara micro button
Re: Aqara micro button
Edit, just seen my log. Do this as a delayed action on a trigger when click has any change. Otherwise it gets in a loop sending back an updated message whenever there is. achange in battery or link quality. Dont do it on the Trigger Component trigger.
- FlyingDiver
- Posts: 7323
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Aqara micro button
I'm beginning to think there needs to be a GenericSensor type device that just has custom states, no onOffState or ValueState. Because shoehorning these into the two other types is just ugly.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Aqara micro button
I have just recieved one of these but mine has click = single , double, hold and release !!!siclark wrote:This is a small hand wireless button , approx 3cmx3xm. It recognises 1x, 2x, 3x, 4x clicks. Apparently some models (with same model numberof WXKG11LM) recognise hold, but mine doesnt.
I have this setup in Shims as an On/Off device. The payload is like this
{"battery":100,"voltage":3145,"linkquality":97,"click":"double"}
Putting click as the payload key and leaving On Value blank, I get single, double, triple or quadruple populated in the device custom state of click. I can then create a trigger on the change of status when it equals one of these values.
The trouble is that the click state is not reset, so I have created a delayed action on my Button Topic Component Trigger to send a MQTT message back to the Button with a null click state. This works well.
The message back takes the values from the Indigo device states, so it has the correct values, as per this format.
{"battery":%%d:1473899162:battery%%,"voltage":%%d:1473899162:voltage%%,"linkquality":%%d:1473899162:linkquality%%,"click":""}
How have you setup the shims as I keep getting
Code: Select all
Trigger Aqara
MQTT Shims Error Aqara Button: update unable to convert 'single' to float: could not convert string to float: single
CliveS
Indigo 2024.1.0 : macOS Sonoma 14.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.1.0 : macOS Sonoma 14.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
-
- Posts: 4000
- Joined: Tue Sep 10, 2013 3:07 am
- Location: West Sussex, UK [GMT aka UTC]
- Contact:
Re: Aqara micro button
I set my Aqara Double Switch up as a generic JSON Device and then use different triggers to pick the different payload states.
-
- Posts: 4000
- Joined: Tue Sep 10, 2013 3:07 am
- Location: West Sussex, UK [GMT aka UTC]
- Contact:
Re: Aqara micro button
Trigger to process click:
-
- Posts: 4000
- Joined: Tue Sep 10, 2013 3:07 am
- Location: West Sussex, UK [GMT aka UTC]
- Contact:
Re: Aqara micro button
The MQTT Shims device definition:
Re: Aqara micro button
Thanks Jon, now have it sorted with the following for anyone else who gets one, It now shows click=single, click=double but when I hold the button it removes the click= and adds action=hold and action=release.
Just need to sort out my Aqara 2 gang wireless switch which your post should help with and also a 4 key Aqara Opple.
And yes that . in the Multi-States Key is needed!!
Just need to sort out my Aqara 2 gang wireless switch which your post should help with and also a 4 key Aqara Opple.
And yes that . in the Multi-States Key is needed!!
CliveS
Indigo 2024.1.0 : macOS Sonoma 14.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Indigo 2024.1.0 : macOS Sonoma 14.6.1 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer
Re: Aqara micro button
Thanks autolog & CliveS for your efforts with these Aqara micro buttons. : Got myself one of these buttons to try it out and use it f.ex. with my garage door controller or some extra buttons for lightning.
However, I ran into issue when I needed two single clicks in row - I cant trigger consecutive single clicks. I used identical setup as CliveS. Payload data of two clicks are identical so I guess thats the issue. I've tried triggering with trigger type "MQTT Shims Event" with "Device Updated and State present" and type "Device State Changed" with button device state "action" either "Has any change" or "becomes equal to: click" but no luck.
The latter trigger (Device State Changed) work with different action types though (single, double, hold, release) unless they are ran consecutively. If so they fail to trigger as well.
Any tips to debug or what to try?
However, I ran into issue when I needed two single clicks in row - I cant trigger consecutive single clicks. I used identical setup as CliveS. Payload data of two clicks are identical so I guess thats the issue. I've tried triggering with trigger type "MQTT Shims Event" with "Device Updated and State present" and type "Device State Changed" with button device state "action" either "Has any change" or "becomes equal to: click" but no luck.
The latter trigger (Device State Changed) work with different action types though (single, double, hold, release) unless they are ran consecutively. If so they fail to trigger as well.
Any tips to debug or what to try?