ZHA - Aqara Magic Cube (57 actions)

Tags: #<Tag:0x00007fc3d2929058> #<Tag:0x00007fc3d2928f68> #<Tag:0x00007fc3d2928ea0>

I’m not able to import this blueprint, it says that it’s not formatted correctly.

No valid blueprint found in the topic. Blueprint syntax blocks need to be marked as YAML or no syntax.

Fixed. The parser apparently didn’t like having anything after the blueprint code block. Moved the changelog to before. Thanks!

1 Like

Would it be possible to make ‘side 1 up’ and rotate left / right ??
And that for all sides possible??

So based on what side is up, and rotate left / right to trigger an action??

Thnx

Nope, unfortunately not. That information isn’t sent with the rotation event. See here.

I know, but isn’t it possible to set the state (side up) to a memory , and then add the rotation to the side up ?? I’m also trying to figure this out in node red …
So I can use like ‘side one’ to set volume of Sonos
Side 2 to to dim lights etc

2 Likes

I made some comments on that in a previous reply as well. In short: yes, it’s possible, no, it probably isn’t reliable. It’s at least not something that I think would be appropriate for the blueprint.

Setting different actions to rotate the cube on each side would be a really useful feature. Therefore, we bother you so much :sweat_smile:
I have no experience in programming, otherwise I would try to do everything myself. :slightly_smiling_face:
I noticed that many people manage to implement this function for example in deCONZ. It would be cool to implement it in zha too.
Since ZHA is easy to understand for novice users.

Here is an example of code in deCONZ.
The site was translated from RU to EN using google.

Here is the original RU page.

Maybe this will help someone to implement it also in ZHA.

Thank you for your patience and your efforts and sorry for the intrusiveness.

1 Like

I couldn’t find this mapping originally (didn’t search hard enough :stuck_out_tongue:) – maybe it’s worthwhile to put in the main post?

Aqara cube layout (sides):
         _______
        |       |
        |  #3   |
 _______|_______|_______
|       | AQARA |       |
|  #5   |  #1   |  #2   |
|_______|_______|_______|
        |       |
        |  #6   |
        |_______|
        |       |
        |  #4   |
        |_______|
3 Likes

I can’t get the face-specific knocks to work. It adds the correct YAML in automations.yaml, the zha_event is also correctly registered, but when knocking on the respective side - nothing happens.
The log output only has:

2021-08-01 10:24:55 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Restarting
2021-08-01 10:24:55 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Running automation actions
2021-08-01 10:24:55 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Executing step setting variables

Compared with e.g. flip to a specific side:

2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Restarting
2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Running automation actions
2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Executing step setting variables
2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Choose at step 2: choice 8: Running automation actions
2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Choose at step 2: choice 8: Choose at step 1: choice 1: Running automation actions
2021-08-01 10:24:25 INFO (MainThread) [homeassistant.components.automation.aqara_magic_cube_57_actions] Aqara Magic Cube (57 actions): Choose at step 2: choice 8: Choose at step 1: choice 1: Executing step call service

What am I missing? :thinking:

EDIT: Have looked into the actual “events” from the cube send. There is no trigger events when “turned arround in hand”, hence no way the blueprint can detect it. Sorry for not checking first.

This blueprint is perfect, however I have a issue with “people using the cube”

Im intending to use the “faceup” as a input for a number of other automations, like “daytime setting”, “Night time setting” and other “states the house can be in”. A small icon on each side and it will be easy for everybody to set the setting of the house. Even non-normal guests.

However, the cube does not always show the “flip to side”. It works if you flip to a side, however if people have the cube in the hand, turns it around to find the right side and then sets it on the table it does not work consistently.

The problem is that the cube sends a drop or turn command instead, and the “flip to side x” is not triggered.

Have anybody figured out how to remove all the other options, and only have a
“face side up” trigger. The flip to is perfect for this, if consistent.

EDIT: Have looked into the actual “events” from the cube send. There is no trigger events when “turned arround in hand”, hence no way the blueprint can detect it. Sorry for not checking first.

Great idea, and thank you! I’ve put it in the main post.

What am I missing? :thinking:

You’re missing absolutely nothing. I didn’t use that feature from the blueprint I extended, so I didn’t test it. Turns out that part was a bit buggy. I’ve fixed it and tested.

Hi, I have a question related to this blueprint. I want to fire an event when the cube is rotated, and in event_data for this event pass relative_degress to use it somewhere else. Is it possible and how to achieve it?

Good idea!

I just updated the blueprint to populate the relative_degrees variable from the event_data. You can use it in any service template. It’s a float, so it will have the full decimal precision from the zha event.

1 Like