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

Oh Iā€™m not frustrated, all is good. I will do some more testing and get back to this page if I have a solution.

edit:
Solution:

Wrong:

service: script.dimmer_control
data:
angle: ā€œ{{ trigger.value_json.action_angle | float(0.0)}}ā€
light: light.0x0017880108d9e1d7

Right:

service: script.dimmer_control
data:
angle: ā€œ{{ trigger.payload_json.action_angle | float(0.0)}}ā€
light: light.0x0017880108d9e1d7

Thanks for all the help, it seems to work fine so far!

I gave you that link a couple of days agoā€¦

https://github.com/SirGoodenough/HA_Blueprints/blob/c7f7d615c19ed9fcdbd55fc41579869211e3def1/Automations/Zigbee2MQTT-Aqara-Magic-Cube-T1-Pro-CTP-R01-Xiaomi-Lumi.md#notice-when-building-action-scripts

And I had that wrong in my very first screenshotā€¦

THERE IS A NEW UPDATE:

Can anyone, someone PLEASEEE help me figure this thing out lol I am a rookie at this. But seriously I have a little UFC party tomorrow and thought this would be cool but I canā€™t get it to do anything. Trying to just simply increase and decrease my volume on either my Frame TV or the Denon, would prefer the Denon but really just need this to work! Any help is appreciated!

This is the automation I haveā€¦

data:
  angle: "{{ trigger.payload_json.action_angle | default(0.1) | float(0.2) }}"
  mp: media_player.denon_avr_x1200w

This is the script that I just importedā€¦

alias: Volume Control
use_blueprint:
  path: SirGoodenough/volume_control_4_magic_cube.yaml
icon: mdi:knob

So you imported the script BP. Did you run that and create a script you can call?

Not giving me much to go on hereā€¦

Did you read this?

New Version for a bug fix

:bookmark_tabs: Changelog

1 Like

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