[OBSOLETE] Xiaomi Mi Cube / Magic Controller

Device handler for Xiaomi Mi Magic Controller. All 6 movements are supported.

Installation:

  1. Load xiaomi-mi-cube.groovy in My Device Handlers section

  2. Pair the cube by tapping a button located inside. Watch for “catchall” line in Hub/Location Events (not Live Log).

I.e. catchall: 0104 0000 01 01 0100 00 DB91 00 04 1234 0A 01 …

  1. Create a new device and use DB91 as Device Network Id.

  2. Use CoRE or any smart app that can handle 7 buttons, like ZWN-SC7.SmartApp.groovy

Buttons:

1: Shake
2: Flip (90 degrees)
3: Flip (180 degrees)
4: Slide
5: Knock
6: Rotate left
7: Rotate right

To use with CoRE:

Let’s say you want to handle knocking:

Add a condition with:

  • Capability: Button
  • Buttons list: Your cube device
  • Button(s): #5
  • Comparison: is
  • Value: pushed

If CoRE detects only 1 button, rotate/flip the cube to update info about buttons quantity.

14 Likes

Lovely!

Can just pair the cube without Mi hub?

Yes, just pair the cube with SmartThings hub directly.

2 Likes

I ordered one. The pink is cheaper (not by much) so I ordered it for my son’s room :smiley:

I ordered one, too. If this works as described, it is going to be even more fun than moodcube! Especially at that price!

Couldn’t get it to pair untill i made smartthings look for a z-wave lock and the catchall came through… heheh :slight_smile:

Now it’s working perfectly, great work @DroidSector

1 Like

Thanks for you DTH. It’s mostly working for me - just a few questions. Would be glad if someone could help :slight_smile:

  • I added the cube manually using the Device Network Id from the catchall log.

  • Six of the functions work - sometimes more, sometimes less reliably, but I guess that’s just a hardware thing. However, I was never able to trigger the “knock” action. Any specific hints or is my cube simply not 100 % functional?
    edit: got it - needs a bit more “force” apparently :slight_smile:

  • Battery reporting is not working for me. Do I have to do some special “magic” in the pairing process to get it (like with some of the other Mi sensor - still waiting for my 2nd shipment)?

Thanks,
Jan

1 Like

It works great. Really nice work. This is such a cheap and awesome controller.

1 Like

I’m still waiting for mine to arrive.

1 Like

I guess it’s the only way to add Xiaomi devices…

Yes, two taps on a hard surface should do the trick.

Probably, right now I can’t see any battery events in the logs. Or maybe it requires some command to query the battery status.

Got 3 more on the way to me now. the tipping 90 degrees seems a bit erratic, but shake works fine. Not tried the others yet.

Actually ordered one of everything that is mi and zigbee to have a play with.

1 Like

Is it possible for a device to un-pair by itself? I paired my 2 magic cubes yesterday and everythring was workin perfectly. I went to bed and at the next day any of the 2 magic cubes works…
Any idea?

I just realised that the magic cube change its device ID number, so I had to add it again. Any idea why this happened?

I’m trying to pair a Mi Magic cube to and it’s not working. I’ve identified 12 catchall that aren’t it. Is there a special code I have to tap out on the one button? I’ve tried both the short press (one short blue flash) and the long press (slow flash followed by several fast flashes. Any assistance is much appreciated.

I do not see any “catchall” in my events log. [edit: I see catchall events for my water sensor ID but not for anything else]

I “+Add a Thing” in the phone app and tap the button inside the cube. I also tried looking for a z-wave lock.

I have tried long pressing and short pressing the little button inside the cube. No success

EDIT: My mistake… I kept checking the Live Log… when I should have been checking the Hub Log “Hub Events” It works fine now!

1 Like

Thank you for the work on the DTH - this is fun!!! Great job!

Has anyone made this work with CoRE yet? It works great with the smart app above but I would like to use button 6/7 to increase/decrease dim level. I could do all this via virtual switches but there must be an easier way. Core recognizes the device as a single button device.

Or Im doing something wrong, or I have a defective Magic cubes… When I follow the steps in the first post Im able to link the magic cubes with my hub. But this is only lasting a couple of minutes. All of a sudden the magic cubes stop working. I have to follow all the steps again to pair them and I see they change the CATCHALL CODE used as “device ID”. Im running hub first gen.

Can anyone help? When they are working, they are great.

See this thread below. This seams to be a common thing for Xiaomi products.Mine has stayed connected for about 8 hrs now. How far away is your cube from the hub?

THANK YOU, I’ve wasted at least an hour jamming that button while starring at the live log. I can’t wait to get home and check the hub event list!

Am I the only one with this problem? Is the Magic Cube working for all others? Can it be because of my HUB is v1?