[RELEASE] Magic Cube


#1

Introducing 'Magic Cube'
Take control of your Xiaomi Mi Cube. Control devices based on Flip, Slide, Knock, Rotation and Shake.

Special thanks to Keith G. (@veeceeoh) for bringing the driver needed for this device over to Hubitat!

Features:

  • Control devices based on Flip, Slide, Knock, Rotation and Shake.
  • Abilities: On/Off, Toggle, Dim, Set Level, Set Color and Change Mode
  • Ability to execute rule actions
  • Uses the Xiaomi Mi Cube Controller device driver by @veeceeoh
  • Tutorial for driver can be found at ([Release] Xiaomi / Aqara ZigBee device drivers)
  • Uses the 36 button setup
  • Parent/Child App structure
  • Create as many child apps as needed

App can be found on my Github:

V2.0.1 - 08/21/19 - (dan.t) added ability to execute rule actions


How to configure xiaomi cube?
[Release] Xiaomi / Aqara ZigBee device drivers
This s*** is too good!
[Release] Xiaomi / Aqara ZigBee device drivers
#2

I like the interface, nice and clean. Would adding dimmer capabilities explode the size? I use the included button app currently and setting dimmers by mode as well as the start dimming command on rotate are super useful. I guess I can chain some RM commands, hmm maybe call them from events like motion, Pico button, or cube command. MISO, Multiple Inputs Single Output. I already use room occupancy app like this. Things to think about, thank you for the app.


#3

Thanks.

I originally was thinking devices, lights (level, color), dimming, etc., but the more I thought about it ... this thing is just another remote control. Just about everything I would want it to do is already setup in RM for one reason or another. So like you said, just link it to the device that controls that rule. No need to reinvent the wheel. :sunglasses:

Oh and my favorite use for the cube so far is to turn the tv volume up or down by rotating it. Magic! lol


#4

Awesome. I'm going to put a different pizza type on each side, and when I roll the die, it will trigger the Dominoes API to order that kind of pizza :laughing:


#5

New version on Github...BIG update, Huge ... very very big :grin:

V1.0.1 - 03/15/19 - Added Change Mode, Toggle, Dim and Set Color to device options.


#6

Just taught my wife how to use the 'cube'. Her words... 'Now THAT's cool!' lol

  • Knock to turn on the entertainment center
  • rotate right to turn the vol up
  • rotate left to turn the vol down
  • shake to turn the entertainment center off

:grin::grin::grin:


#7

I can just imagine the fun if there is a cat in the house.


#8

I got a cube the other day and was trying to figure out how to use rotation for volume and/or dimming utilizing RM, but am really struggling to get it right. I'm pretty new to Hubitat, and am still trying to wrap head around RM. Any chance you can point me in the right direction on how to get it to work? I've searched the forums, but haven't been able to find anything just yet.


#9

In RM I don't know, I would think you'd have to setup custom rules.

This app, Magic Cube, was designed to simplify control of your devices without using RM.


#10

If you are only using the 7 buttons, you can set them up in Button Controller, that's the way I use it and I dim/brighten lights using the right and left rotation.


#11

I use button controller for the 36 button configuration, I just use a different install for each action, So all the flips are one instance, all the rotate left are another, and so on. I like this Magic Cube app but I have mine also unlocking locks, changing light colors, and TTS for a few actions, so I need more than just light controls.


#12

Thanks for the help! I got it figured out.


#13

How do I get rotate left/right to be able to turn dimmer up/down? I only see an option to set the dimmer to a level ????


#14

It can be done but it's kinda a pain...

Dim Down

  • create a virtual switch, set 'enable auto off' to 1s
  • create a rule to dim down the light each time the virtual switch is turned on
  • Now use Magic Cube to turn that virtual switch on when rotated

Then just do it all again for Dim Up.

This is how I do it for my stereo volume.


#15

Thanks, I had thought of that, but then thought that there had to be an easier way !!!!


#16

Hi there,

I recently bought a Xiaomi magic cube, although I haven't been able to get this device driver and app working... it seems to pair ok, although it doesn't recognise any events.

Is it possible that that is because I have the "aqara cube" rather than the "xiaomi magic cube" which I understand was an earlier version?


#17

If you don't have a working driver, then this app can't work. I suggest you ask this question over on the driver post listed in the post #1. Thanks


#18

Just got a Aqara cube and the original Xiaomi driver works. I think your device hasn’t paired correctly, I would remove it and try a repairing. These devices can be though to pair and stay connected. If you look around in the forum you can see that a good repeater is necessary with the Xiaomi devices.


#19

Mine stays connected very nicely. No problems so far after about a month. It's very cool and all my visitors are amazed :smile:


#20

So does mine, but I also have a couple of Xbees distributed over my house.