Aqara Double Rocker Switch

Posted on
Sun Feb 23, 2020 11:00 am
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Aqara Double Rocker Switch

autolog wrote:
That works :)

However, when I first went to set up the condition, the click state wasn't listed. I assume because there had been an interim unsolicited update and that state wasn't included and so MQTT Shims removed the state. As soon as I clicked the button and re-edited the trigger condition, the click state was present. I am not sure what will happen if a message comes through and the state is removed?


You get:
Code: Select all
   Error                           device "Aqara switch" state key click not defined


The triggers work, with the conditional, you just get the error.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Feb 23, 2020 11:15 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

OK. :)

Is it worth considering having an option not to delete states once created?

Posted on
Sun Feb 23, 2020 11:19 am
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Aqara Double Rocker Switch

autolog wrote:
OK. :)

Is it worth considering having an option not to delete states once created?


But then you would have the case of the switch click getting triggered on each of those heartbeats...

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Feb 23, 2020 11:22 am
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Aqara Double Rocker Switch

I'm trying to think of a clean solution to this.

You could do it with a Python script as the conditional, so the condition fails (silently) if the state doesn't exist. But that's not ideal, especially for a less technically inclined user.

I'm trying to decide if a more complex trigger would work.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Feb 23, 2020 1:05 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

FlyingDiver wrote:
autolog wrote:
OK. :)

Is it worth considering having an option not to delete states once created?


But then you would have the case of the switch click getting triggered on each of those heartbeats...

In this particular case they are happening about every 45 minutes - so not very frequent - I need to monitor more to confirm that. :)

Posted on
Sun Feb 23, 2020 1:14 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Aqara Double Rocker Switch

Well, the only side effect of the current setup is an occasional error in the log. If that state was persistent in the device, then instead of a log error you would get an inadvertent device activation. That's worse.

If the Event also specified a state, and the trigger only activated if that state was present in the device, that would work, right?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Feb 23, 2020 1:59 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

I think that would solve the problem - yes. :)

Posted on
Sun Feb 23, 2020 2:21 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Aqara Double Rocker Switch

Attachments
Screen Shot 2020-02-23 at 3.20.40 PM.png
Screen Shot 2020-02-23 at 3.20.40 PM.png (393.07 KiB) Viewed 2464 times

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Feb 23, 2020 2:29 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

Installed Release 0.2.5 and updated the triggers to use the new Device Updated and State Present event - all works well. :D

Thanks for the quick enhancement. :)

Must now get back to the washing up! :wink:

Posted on
Sun Feb 23, 2020 4:38 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Aqara Double Rocker Switch

Awesome. That works for the button as well, but also the action for the vibration sensor as well. Thanks for getting this turned round so quickly.

Posted on
Sun Feb 23, 2020 4:50 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

Yes, it is a really neat solution. :D

Posted on
Thu Mar 12, 2020 5:24 pm
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Aqara Double Rocker Switch

Jon, I have been going through the config options (trying to get a Hue bulb to pair and work) and found that you can include timestamp and miliseconds since last message, so that is extra help to see when a new message has arrived.

Code: Select all
{"battery":97,"voltage":2995,"temperature":20.4,"humidity":56.51,"pressure":1009.4,"linkquality":26,"last_seen":"2020-03-12T22:47:33.361Z"}

Posted on
Fri Mar 13, 2020 7:28 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Aqara Double Rocker Switch

Hi Simon,
Thanks for the heads-up. :)

For info, I purchased a Hue Motion Sensor, another Aqara Double Rocker Switch and some additional Aqara Temperature sensors.

I was having a lot of difficulty pairing them - like they wouldn't (despite having the config set to allowing join)! Anyway, applied the standard engineering solution, closed down zigbee2mqtt, unplugged the CC2531, waited 10 seconds (probably not necessary), plugged it back in again and restarted zigbee2mqqt.

Lo and behold pairing then worked again for all the new devices. :D

I am trying out using the Aqara Temperature Sensors to monitor the temperature of the incoming radiator hot water pipes on some of the radiators controlled by troublesome Spirits. It's early days but it does help to give some indication if the radiator isn't heating when it should be or vice-versa, heating when it shouldn't.

Thingiverse came up with the goods and I found a 3D model to attach the Aqara Temperature Sensor to a 15mm radiator pipe:Xiaomi temperature humidity sensor mount 15mm pipe
It is not perfect for fitting to an already installed pipe but with a bit of judicious use of a saw on the 3D print, I persuaded it to fit. If I get the time and inclination, I might try to modify the model so I don't need to use a saw on it. :)

Posted on
Fri Apr 21, 2023 7:30 am
LSpad offline
Posts: 30
Joined: Oct 01, 2018

Re: Aqara Double Rocker Switch

Hi all - I’m sorry if this is covered elsewhere but I’m struggling to get started with MQTT

I’ve got an Aqara double switch paired with an e1 hub on the same network as my indigo server. I’ve installed the MQTT broker plug-in as well as the connector plug-in and my MQTT broker is showing as ‘connected’. I’ve subscribed to # for now until I get a feel for the traffic and how to filter appropriately.

When I activate the switch I’m not seeing anything from the plug-in. I also used MQTT explorer to listen to port 1883 and there is nothing coming up on that either. Have I missed a critical step? Sorry for what is no doubt an intensely stupid question!

Posted on
Fri Apr 21, 2023 7:33 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Aqara Double Rocker Switch

So the processes that work to get zigbee devices into Indigo are either to use a Hubitat hub, and the associated plugin, or directly on your mac using a Zigbee USB stick, Sonoff if the most commonly used, and run Zigbee2MQTT app on your Mac, and then use that appropriate plugin, both processes rely on MQTT as the means to transfer messages into Indigo.

Unless that Aqara Hub is set up to report messages over MQTT it wont work as you have it set up.

Who is online

Users browsing this forum: No registered users and 0 guests