DIY Aqara cube, questions about MQTT, Virtual Buttons, etc

Hi all,

Disappointed by the stability of the Aqara Cube Zigbee networking, I am putting together a DIY device that will be seen as a 36 buttons thing (+ battery voltage).

It's far from done but it'll eventually be awakened by a SW-420 (Vibration Sensor Module Vibration Switch Alarm Sensor) and will see orientation and movement from a MPU-9250 (9-axis Gyro Accelerator Magnetometer Sensor).

The device and its code are taking shape on a prototype board. I am starting to think about how to interface it with my Hubitat hub. One way to go about it would be Huduino, which I will look into.

A second option I was looking at would be to have the device publish its events to an MQTT broker and use @tpc77's MQTT Link to post property changes & events to the Hubitat via a Virtual Button. I am guessing this would work, what do you think? I'd love to add a battery property to that Virtual Button but there isn't any driver code I can look at so I could add that property since it's a built-in virtual device, is there?

I am sure I am overlooking a lot, would love some advice, if you've got any.

That's much work, unless you love doing stuff like that. Get an Aqara hub and interface it with HE via HA...
nevermind I just made it more complicated

Be that as it may, Iā€™d like to build my own. Is there a way to get the Virtual Button source code or overload it with a battery property.

I did something similar using an old Smartthings multi-sensor placed into a golf ball display cube and then covered with labels from a Cricut.

Mine is different in that instead of gestures, I used the 6 sides to activate different scenes based on which side is up.

The hardest part was determining the ranges of X, Y, and Z values for each side of the cube since I wanted it to still work on an unlevel surface. Neverthelesd, the whole project was done in an evening.

Yes but you re-used an existing device that had an existing driver and was Zwave/Zigbee. What I am building here is from scratch and Wifi based.