Xiaomi Cube using Smartthings Hub into Home Assistant

Hey all! I am really hoping to get some help! Please excuse any under/over explanation! I have been going at this for hours! I would be grateful to anyone who can point me in the right direction!

I have Hassio, Aqara Cube and Smartthings connected.
I could NOT get the Mi Home dev app running with Android/iOS apps… So instead I am using SmartThings Hub with DTH (MagicCube), and I do have the Cube connected.

In Smartthings: Cube Outputs 7 button values visible in the Smartthings Logs. There is Name: “Last Action” or “Button” & Value: “Pushed”, “Slide”, “Flip 90” etc, & “Data”: “button1”, “2”, “3”, etc.

In HA: There is a battery sensor with the Cube’s Unique ID: 2fcf9ce1-****-4b39-8120-a720c77f7a50.battery . The only output is “Pushed”, regardless of the event.

So my question is, where is the ST unique event data in HA/how do I use it?

***THANKS SO MUCH IN ADVANCE!!! ***

Smartthings Log:

HA Event Log: smartthings.button
Event 61 fired 4:31 AM:
{
“event_type”: “smartthings.button”,
“data”: {
“component_id”: “main”,
“device_id”: “2fcf9ce1-****-4b39-8120-a720c77f7a50”,
“location_id”: “816bb91f-2094-4026-a1cd-fbc63d7f8bb6”,
“value”: “pushed”,
“name”: “MiCube”,
“data”: {}
},
“origin”: “LOCAL”,
“time_fired”: “2020-04-10T08:31:27.509654+00:00”,
“context”: {
“id”: “2c0fee3908bc421899f0ff7c8e07e3ae”,
“parent_id”: null,
“user_id”: null
}
}
Event 60 fired 4:31 AM:
{
“event_type”: “smartthings.button”,
“data”: {
“component_id”: “main”,
“device_id”: “2fcf9ce1- ****-4b39-8120-a720c77f7a50”,
“location_id”: “816bb91f-2094-4026-a1cd-fbc63d7f8bb6”,
“value”: “pushed”,
“name”: “MiCube”,
“data”: {}
},
“origin”: “LOCAL”,
“time_fired”: “2020-04-10T08:31:16.509128+00:00”,
“context”: {
“id”: “0670046f4f1f424aa911a5293d7ae7dc”,
“parent_id”: null,
“user_id”: null
}
}
Event 59 fired 4:31 AM:
{
“event_type”: “smartthings.button”,
“data”: {
“component_id”: “main”,
“device_id”: “2fcf9ce1- ****-4b39-8120-a720c77f7a50”,
“location_id”: “816bb91f-2094-4026-a1cd-fbc63d7f8bb6”,
“value”: “pushed”,
“name”: “MiCube”,
“data”: {}
},
“origin”: “LOCAL”,
“time_fired”: “2020-04-10T08:31:11.006818+00:00”,
“context”: {
“id”: “ff4fdc6a2f1542f9bd068dfa72d603ac”,
“parent_id”: null,
“user_id”: null
}
}

To me this sounds like a HA problem. If you are seeing the events correctly in ST.

Yes, it sure is! I posted there too, but I usually find the info I need related to ST/HA in the ST Community. I was just really hoping that someone may have encountered this, or worked with the DTH and could point me in the right direction. I feel that the DTH may be the key, if I could have the Value’s returned as individual button actions then HA would likely differentiate the events… but I am only guessing!

Everytime I think I’ve found a solution it dead-ends with this one! I am pretty desperate for help at this point! :crazy_face:

1 Like

I have this exact issue! I asked Home Assistant people and they point at smartthings.

When I look at the events for the Cube it is only showing pushed as the value. So I think it is an issue with the device handler. I am not wise enough to know which part of the DTH to edit though to fix this issue.

EDIT: just looked at your screenshot. Your events look better than mine

@Misty1334 did you find a solution for this in Home Assistant?

I created a smartApp that pushes button number (and other data) to home assistant event api, perhaps that fixes your problem?