Cube mode


Does Rule machine have any access to ThreeAxis?
I wanna use multisensor or xiaomi magic cube to change RGBW colors.

I think several people also using Multisensor as tilt sensor on garage doors.


I have a v1 SmartThings multisensor paired with Hubitat and I wasn’t able to see the threeAxis value in Rule Machine. @bravenel thoughts?


RM doesn’t have a capability “Three Axis”.

Could you give an example of how you’d use it?



Rotate for color selection or dimming control, flip for … other things? I think @veeceeoh has one already and is working on porting the smartthings api. It’s got something like 43 different functions that can be derived from the device, so it’ll take a while to test.


Example of ST


Another example. :laughing: Xiaomi cube absurd ad


Are you using this DH?


No. I wanna use multisensor not cube. Multisensor already have native hubitat support with ThreeAxis.


I know some time has passed since anybody showed interest in this but since I didn't see anybody else do it... Here is my first stab at this (since I wanted it too).

This is the ST app updated to work on HE.

Let me know how it goes.


It's not installing, odd error and I don't know how to fix it, I suppose this is for the Mi/Aqara Cube? Thanks


I didn't try it with the cube. I was using it with a SmartThings Multisensor v4. What error message are you getting in the log?


No signature of method: Script1.definition() is applicable for argument types: (java.util.LinkedHashMap) values: [[name:Mood Cube, namespace:codahq-hubitat, author:Ben Rimmasch, ...]]

Edit, I was installing it as a driver when this is an app, now installed fine. Now testing.


Caution... It will only capture the device you want to control while your "cube" is laying on the side marked current in the app. In other words... The capture scene command is only available 1 side at a time. Turn the "cube" and hit refresh. You'll find that you have to do a lot of turning while setting this thing up unless you look up hues color values.

Not a great user experience... I'll refactor soon hopefully.


Okay... I took a stab at least in labeling some of the settings pages in a way that made sense to me so the user experience is marginally better. I also fixed a bug that was causing the level to not get set correctly. It's still not great but I'm probably not going to change it much more unless I add Scenes/RM to it.


Thanks for this. Works great and is even much faster than it was on Smartthings.


I can't take credit for the speed increase. That's due to everything running locally and the HE being generally a good platform.


Just a quick note here to say that I've just released an update to the Xiaomi Cube beta driver that brings back full functionality on all action types (shake, flip, slide, rotate, & knock). All actions generate button X pushed events, with the number of buttons based on the choice of 3 different modes set in the device preferences: 6 buttons, 36 buttons, or 43 buttons.

I'd be very interested to see how well it works in conjunction with @codahq's Mood-Cube app.


Unfortunately as it stands today it wouldn't actually work at all. I didn't do anything but port the ST app over that assumes the device supports three axis aka MultiSensor aka this:

So if the events the cube provides are just button clicks you won't even be able to select it as a device in the app. Does the driver also provide ThreeAxis? I could rework the app but there is probably something already better we could start from. In fact, if you are creating button pushed events we should probably just rock the OOB Button Controller for that. It would be king because it can already toggle scenes and other neat things.

By the way, I saw your update even before you posted in this thread and ordered a Xiaomi Cube to play with because of it. You are doing good work over there. Thanks!

*Edit: Actually, now that I'm thinking about it and reading your driver post maybe a large quantity of button press events would have performance issues with Button Controller and Scenes. I dunno. I'll try it out when mine gets here [in probably forever... ordered from aliexpress].

[Release] Mood Cube App

Yes, but only "emulated" in that each of the 3 axis values in each event are either -1000, 0, or 1000 to indicate which face of the cube is facing up, for example 0, 0, -1000 for face 5 (with the Mi logo facing up).

However, per the original author of the SmartThings DTH from which I ported to Hubitat, @ClassicGOD, this should provide support for the Mood Cube app as mentioned in the opening post for his DTH here.

So I still say give it a try!

I highly doubt it will cause any overall hub performance issues, and my experience so far backs that up.

What the driver will cause is a relatively large number of events to be generated, which can lead to slowness when viewing them in the events list page for the device. This is only a concern for a small number of people as best I can tell.

What I was trying to say in my release notes is that I am going to look at any ways that I can reduce the overall number of event entries that the Xiaomi Cube driver generates.