šŸ§Æ Zigbee2MQTT Aqara Magic Cube T1-Pro CTP-R01 Xiaomi Lumi cagl02

Hey,

Thanks for creating this. This is awesome.

I have one (probably) stupid question: is there any way to have it trigger an action when you put a side up, regardless of what side was up before? E.g: just have a ā€œFlip to side 1ā€ action instead of 5 actions :grinning:

Keep up the good work!

It might be possible.
Would you be so kind as to add that a a feature request and I will look into it.

1 Like

Hello -
I have the SONOFF Dongle Plus USB installed along with Mosquitto broker and Zigbee2MQTT. I was able to pair the T1 Cube and from the Zigbee2MQTT dashboard exposes tab i can see the actions update as i rotate the cube but Iā€™m confused as to what the next steps are to get the actions working.

I looked in the device entry and I donā€™t see an an entry with the friendly name I configured. Is this normal?

What are the next steps I need to follow to get everything working? Thanks.

Read the helper file (or the top post here) and follow everything. Also you need to know if the cube is in scene mode or action mode.
Set-up the template sensor and the dashboard entry to help you know what the blueprint thinks the cube is doing. You can also see that in the traces found inside the automation you generated to use the blueprint.

The device should be located in the MQTT integration as the name you provided, assuming you provided a name that fits within the BluePrints requirements (no spaces, no punctuation or special characters)

Updateā€¦
Please donā€™t take this the wrong way, but I just realized by your question that you may not know how blueprints work, IE this is your first oneā€¦
Once your hardware is installed, and you have downloaded a Blueprint like this, you need to go to the automation UI editor and make a new automation based on this Blueprint. that is where you tell the blueprint about the device and how you want it to function, including adding the actions to match the movements of the cube, etc.

@Sir_Goodenough - Thanks for the quick response. Youā€™re correct. I am new to blueprints & Zigbee2MQTT. The additional information you provided is helpful.

Is there a way to verify the Cube is working correctly before I install the blueprint? You mentioned MQTT integration but when I look at the intergrations section in HA, the MQTT intergration needs to be configured. Should I configure it to see the cube? Just checking to make sure I donā€™t mess up anything.

If MQTT isnā€™t configured, then Z2M is not working. MQTT is required both for the cube to work and for my Blueprint to work.

Apologies, I misspoke. I configured the Mosquitto broker via the Settings > add-on section in HA and itā€™s up and running but when I go to Settings > ā€œdevices & servicesā€, thereā€™s another MQTT icon that says Configure or Ignore. I was wondering if I needed to do anything here or ignore it.

I was basically looking to see if i can find my cube like the images at the beginning of the post.

image

MQTTInfo

I donā€™t have an answer for that.
I have no idea what you have loaded or installed or if or why you have 2 MQTT Brokers.

Far beyond the scope of my blueprint.

The assumption by me is you have basic knowledge of how your working Z2M configured cube functions in HA. I provide you a way to have it run stuff without writing it all by hand or using Node Red or something.

Understood and thanks for creating this blueprint and the support.

If anyone else comes across the issue of the cube not showing up on your HA Entries, after you install the Mosquitto broker via the add-on process, you will see a MQTT option under the Discovered section in the Settings > ā€œdevices & servicesā€ Intergrations area.

I hit ā€œconfigureā€ and MQTT found my existing Mosquitto broker and configured it. Now I can see the Cube device and entries in HA.

Hope this helps.

NEW VERSION

:bookmark_tabs: Changelog

@Sir_Goodenough FYI the Blueprint link is broken since it goes to a branch that has been deleted.


Iā€™m generally currently lost, this is the first time using a Blueprint.
I would prefer to copy everything into my homeassistant configuration.

Do I need to add the service call to the default entry in that case ?

    scene_rotate_cw_face_1:
      name: xxx
      default: [] <-- do i need to add the service call as list here ?
      selector:
        action: {}

Sorry about that. Still wrapping my mind around how GitHub works with branches and such. That same link squeezed into the .yaml and the .md and I caught them both late.

This is the right link below. Instruction file links will be fixed in a few moments are fixed nowā€¦
https://github.com/SirGoodenough/HA_Blueprints/blob/06da5f1a0fe0a6bcbc4cafcd60d58dc6b1d9bd33/Automations/Zigbee2MQTT-Aqara-Magic-Cube-T1-Pro-CTP-R01-Xiaomi-Lumi.yaml.

:bookmark_tabs: Changelog

  • 2023-12-09: Stop log spamming leak. #32

So this touches a few blueprints, but doesnā€™t change any function. I suggest you use the new re-download feature of Home Assistant, however, and replace them now. Then your logs will be free of the spamming some of the older versions did.

Hi @Sir_Goodenough, thanks for this blueprint.

I would like to raise 2 issues that I have been having with this blueprint and also the dimmer/volume script.

  1. Sometimes, the script does not respond to the cubeā€™s rotation; and does not change the brightness of light/volume of media.
    My small workaround to this is to toggle on/off the device first and then the script would work.

  2. This issue might be interrelated to the first issue. Sometimes, the blueprint does not recognise the face up and still thinks it is still on the previous face. I noticed this issue as I rotate the cube on Face 1 but it changes value for device set on Face 2.
    To remedy this issue, I do a couple of 90deg flips to force recognise the real face up.

Device: Magic Cube T1-Pro

There was a recent, like this year update to the dimmer and volume, I would try that. Another user found a bug related to your problem and I merged it.

As for flipping it there is practice and training involved. Make sure it has a settle time between moves, when you flip it use a hard surface and snap it down to the table so it makes noise. Use the event sensor I provided code for to help train on what works and what doesnā€™t related to the physical triggering of your cube.

2 Likes

I am currently using the version dated 2023.12.07 and this seems to be the latest oneā€¦ Am I missing something?

It was this, 3 weeks ago.
Enable setting volume to 0 or 1 with large rotation angles Ā· SirGoodenough/HA_Blueprints@4b79f0f Ā· GitHub.
It may not have been officially revved. If you downloaded sooner than 3 weeks ago, you have it.

Otherwise again the event sensor will tell you if the rotation move is registering and at what angle. Those are the numbers that the blueprint is seeing.

Settling time between moves is important. There is a minimum of 1 second required.

1 Like

So iā€™m not sure if everyoneā€™s T1 Pro cube looks like mine, but each side (sans top) has dice dots on it. However, when listening for events, sides start at zero. So, top fires side zero, the side with two dots fires side 1, side with three dots fires side 2, etcā€¦ a bit annoying and distracting. Is the same for everyone, or did i just get the special dice layout?

Not if you use my blueprintsā€¦
However the T1 Pro Quirk file for ZHA is wrong, incomplete, and messed up, but I fix that one (where I can) as well.
Z2M is better.

Ahh yeah. I just went ZHA with your latest compatibleā€¦ seems to be working okay except for that. Will look into z2m next I suppose, while itā€™s fresh.

What a wonderfull Blueprint!.
Thank you!!

Do you happen to know where or how i can change the step size?