How to setup Aqara Cube to do one single action with any movement?

Hi @Sir_Goodenough or anyone else who can respond please.

Below I have tried the code provided to me to make the Aqara Cube to do a single action with any type of movement but it is not working. What is the issue in this code?

How to turn off a light for example with a rotate, flip, shake, etc of aqara without writing many lines of code. I want only one action to take place.

When I tried this code snippet in yml editor of the blueprint I get an error like below:

You have to format it like my example as an automation trigger.

The error is weird, though, as there is no inputs in the code you shared.
Can you share the whole yaml?

However based on your description, For a new automation in the UI editor, if you take my ZHA cube blueprint code trigger I shared as the when (with your device listed), add the then do as your action, that’s it, it should do that thing on any triggered action including wake up and sleep. so like 3 triggers every time you touch it possibly.

My blueprint is set-up to take 1 action like slide, tap rotate right or left on ANY side and do a thing if you like. It might give you better results…

Hi @Sir_Goodenough I tried your blueprint and it seems the cube is not sending an action.

Before it even gets to your blueprint, there should be some text in the logs to see how the cube is interacting with the system. I struggle to find evidence if it is in scene mode or action mode. How to know for sure it is in scene mode and once that is found, how to change to action? The pressing five times is vague instruction.

Thanks

I’m sorry, I can no longer help you.
I can only repeat myself 2 or 3 times before there is no point.
I strongly suggest you return the device if it doesn’t work for you.

For Zigbee2MQTT just the zigbee2mqtt has like 10 pages to follow and configure. Why is the editor needed so much? Can this all be done in GUI or this long process is needed?

OK…
This whole thing was bothering me (Badly…).
I normally have my pro cube connected to Z2M, but I decided to connect it to ZHA to figure this mess out…
So it does not tell you what mode it’s in. That does Suck. That is probably a ZHA problem as I clearly remember the Z2M telling me what mode it is in.

Summary on what to do here:
🧯 ZHA - Xiaomi Cube Controller.

I completely understand why people are having problems…

I hope this helps you.
I will capture this and add it to my cube documentation for others.

Hi @Sir_Goodenough thanks for the reply. Do you have a video showing Zigbee2MQTT install and then getting Aqara Cube setup with it?

Also, do you have separate blueprint for Zigbee2MQTT or for ZHA or one blue print for both? I found one under your name and installed it.

Under Zigbee2MQTT how can I find my Sonoff USB coordinator? I am not sure if it is installed or not. Still shows as a ZHA to install but fails. I have removed ZHA.

I have Zigbee2MQTT setup and in Action Mode now.

The device now does not show in blueprint. How to add the first test if you know?

Is this your github?

My stuff is here.

Does your blueprint support two or more cubes?

When I go into the blueprint to set an action, I do not see which cube to select. How to select a different cube for a different action?

That’s how all blueprints work.
The blueprint is the base code. You generate an automation that uses the base code and plugs in the variables you supply. You can have 100 cubes if you like.

Where to define which cube is to be used?

Thanks

Sometimes you have to just try things instead of asking for permission…

So I will clarify.

Did you load the blueprint?
Do you know how to use a blueprint by building an automation or script that uses the blueprint?
Did you try to build an automation from the blueprint you want to use?

The first section of possible inputs is the required section. Here you have to enter the cube and possibly other things that are required in order to continue. The rest of the possible inputs are for making the cube do something.

The Blueprint Description visible when you are creating an automation tells you everything you need to know. Thousands of people have found these explanations enough to get this working.
When someone has a problem with the description and tells me about it, I go back and fix or clarify. This is why the helper file had become so long.

I asked you to try it because I am confident if you do, you will likely get it right.
Asking that question told me you have not tried and are reluctant to, possibly afraid to break something. It was an encouragement to help you grow.

I have answered numerous questions from you and will gladly answer more if I think you are also putting in the effort.

If you find something that needs clarification, please let me know, I will help you then likely update the docs for the next person.

You are assuming that I do not try. I have many times said I installed your blueprint.

Your answer is still vague. Where in your blueprint can I select the exact cube as I have more than one? I don’t see a field that says select a device or end point or cube for example.

Is the “Topic” field it? If say, what a crazy name for device. Why name it Topic?
Also, if Topic is the field then what to put there for the specific cube?

I have seen other places a list of all cubes show that can be selected. It would have been helpful and will improve your blueprint if one can select from an already list of devices.

And there is no such thing as Topic in MQTT. Is that the “Friendly name” field which you have written as Topic?

There is nothing else under required and only topic.

You pick one of your cubes, and set it up to do things.

You then build another automation that uses the same blueprint and put in different cube information.

One automation per cube. The blueprint base code is referenced for eadn automation (cube) that calls it.

Please just set one up first, then when that is working like you want set up another automation for another cube.

It is more likely that you are trying to engage me in a conversation for views or something.

I have already got the cube working by using Zigbee2MQTT web and automation. So it is working and I already said that it is working but you repeat that I should get it working.

Where in your blueprint or anywhere else can I select a Cube ID? this is a simple question. The first 3 lines of your response is what I understand already as that is common sense logic. The 4th sentence doesn’t add any value to this conversation.

Dude, what is going on with you? I don’t mean to be rude at all. Do you not understand what I am asking? If so, that make sense why your responses are vague.

Question remains: Where specifically to select wanted Cube ID for automation?

OK,

Which exact blueprint are you using. There are 2 for zigbee2Mqtt.
One for the T1 Pro version of the cube and one for the original version of the cube.

I will do screenshots for you.

I am using your zigbee2mqtt and I have T1 Pro device.

Thanks.

As I said, the only required topic is identifying the cube.

All the rest are optional and hidden until you select them to make it easier to see your actions.

If you click the blue highlighted text there, it helps you figure out the topic that matches your cube by bringing you here: HA_Blueprints/Automations/Zigbee2MQTT-Aqara-Magic-Cube-T1-Pro-CTP-R01-Xiaomi-Lumi.md at 2c8a5d942a24a4f00611f4d04f9ca6cb0832508c · SirGoodenough/HA_Blueprints · GitHub

The rest of the inputs are optional scheduling for the blueprint, it defaults to always on, or picking an action and then providing the action code for it.


image
(That’s a typo, should be side 6 group 3…)

If you need to pick action or scene mode, change it in this box in the MQTT Device screen (Configuration Section) for the cube.
If you wait the 5 minutes it will update, or if you want it to change right away you can do the ‘throw’ action with the cube and it will change right away. Pick up the cube, make an action like you are going to throw it overhand, but DO NOT LET GO!!!