[Deprecated] Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)

Thanks for the reply bptworld but I am new to this How do I tell Hubitat what to do when I flip the cube

Just for information, if you wish to tag someone put an @ in front of the name.
You probably know this already but just thought I'd mention it in case you didn't.
Like this. @bptworld

That's what the app is for. It's pretty straight forward, just follow the prompts. Feel free to ask any questions about the app itself in the thread I posted, so we don't corrupt this one too much. Thanks

Thanks. I didn't but how do I tell Hubitat what to do when I flip the cube

What thread and there is an app in addition to the Device Driver. I can't seem to get the device driver to do anything

For the most part, what a device driver does is

  1. Convert messages from a device into events for different capabilities (e.g., button, temperature, open/close contact, etc.) that apps can use
  2. Convert commands from apps into messages to send to a device to make it do something (e.g., switch on, set level to xx%, close garage door, etc.)

With just a few exceptions device drivers do not make automations or actions happen as a result of messages received from a device. An app is required to do that, by taking actions based on the events generated by the device driver.

So, in the case of the Xiaomi/Aqara Cube device driver, once it has been installed on your hub, and you've correctly paired the Cube, the only evidence you would see that something is happening is by looking at the hub's Logs window (and only if message logging is turned on for the device.)

This is what I recommend:

  1. Read my detailed tutorial on how to use the Xiaomi/Aqara cube driver.
  2. Enable info message logging so you can check that button XX pushed events are being generated when you turn, flip, and knock the cube. Log into your hub, select the Devices tab, click on the name you gave your Xiaomi Cube, turn on the toggle for "Enable info message logging" in the Preferences section, and click "Save Preferences". After that , you can go to the Logs tab of your hub, and when you manipulate the cube, you should see log messages appear for those actions.
  3. Decide what Cube Mode you want to use (refer to my tutorial for more information), and set that (also found in the Preferences section for the Cube, just like the Enable info message logging toggle.
  4. Decide what app you want to use. Cube gestures generate button xx pushed events, so you need to use an app which can use button events as a trigger to start some kind of automation. Three example choices:
    A. Rule Machine. This is a built-in app by Hubitat. For more information, look at Hubitat's documentation here, or search the for Rule Machine or RM 3.0 here in the Community Forums. It can be used to create simple to very complex automations, and is quite powerful.
    B. Magic Cube. A custom-built app by @bptworld which is just for use with the Xiaomi/Aqara cube. See this thread for details and the link to his app code.
    C. ABC (Advanced Button Controller). A custom-built app by @stephack which focuses on automations triggered by button controllers. See this thread for details and the link to the app (and required child app) code.

Detailing how to build automations using the cube are outside the scope of this thread, but the basic set up is to goto the Apps tab of your hub, install the app, select the app to set up an automation, choose your cube as a button trigger, select which button number push will trigger the automation, and then set up the action(s) that will be taken when that button number is pushed.

1 Like

Does the offset really have any effect? I can't seem to get the offset to actually do anything (any offset on the aqara).

Yes.

1 Like

Hmmm clearly works. Must be something I'm doing wrong then. (sorry for the lack of fancy coloured arrows :slight_smile: ). Any idea?

Enabling "DISABLE 2.0.5 firmware compatibility fix (for users of 2.0.4 or earlier)" makes things better. Could have tried that before, somehow it didn't seem relevant to me. :blush:

image

back to "any ideas?"
With the virtual temperature sensor i was able to set the Temperature (set in Fahrenheit and displays in C, which is weird). Humidity and Pressure didn't have effect. Then back in the aqara driver I fumbled around and the result isn't what I wanted nor expected.
Fumbling is way overrated.

Your battery is below 50%, but that might not be accurate and it could be lower. Mine is working fine, but my battery reading it currently at 57%. Maybe try a fresh battery.

Im pretty sure that's not the problem, because with other aqara sensors I have the same problem (>60% battery). Tho' im not going to fumble around with those anymore. I don't want those kind of readings for those aswell. :slight_smile:
Thx tho.

Have you tried removing the driver, deleting the code and pasting in a fresh copy? Maybe something is incomplete. It's unusual but it's happened to me with other code.

Not sure your experience level. Make sure you grab the RAW code, delete the old and paste in new, not on top of the original.

I honestly can't remember how I pasted the code, usually I take the raw code, paste as plain text. Just to be sure and rule it out I did what you described to no avail...

Trying to follow what you are asking. If I’m reading right this may answer your questions.

After you set the offset and save the settings I don’t think it will reflect The changes until the next time the device reports in. So make the change, blow on the sensor and it should report right away with the proper offsets applied.

The driver displays in C or F based on the location setting. You can change it in under settings on the hub. Again the change won’t be reflected until the next time the device reports in. This change also affects all devices that rely on it.

Hopefully that helps.

thnx.
That explains the changes made only when the sensor updates.
Im trying to get the sensor in proportion but as the max for pressure is -+2000 i have to do this in 2 attempts.
With blow you mean to force it to update... how would one do this for example?

@veeceeoh @guyeeba
I've got the xiaomi smart plug ZNCZ02LM
I don't mind helping you guys test if you want to do a proper driver for this.

Here's the device details when I tried to pair with with HE

Note HE automatically choose the driver Hubitat/Aqara QBKG11LM-QBKG12LM-LLKZMK11LM.groovy at master · guyeeba/Hubitat · GitHub for me to use. And also using that same driver, I can trigger the on/off of that smart outlet. So it looks like there's not a lot of work to be done. Could probably be supported by that same driver.

The sensors only report in when there is a significant change. Just walk up to it and blow into the sensor. It will detect a change and report in. That's the quickest way to get it to update.

Unless you're using firmware 2.0.4 or earlier, you most definitely should not enable this option. Enabling it on a hub with firmware 2.0.5 and newer will result in incorrect reported values.

The virtual temperature sensor is a completely different device driver, so I would avoid making comparisons in functionality. Let's just focus on what's making the Aqara Temp-Humidity Sensor device driver apparently ignore your offset values.

This is correct. Changes to the offset values are only applied to subsequently reported values, not the last reported values before the offset(s) are changed.

I can also confirm this. However, the device details page won't display the units, just the value(s). You can see the units displayed either in the Events List for the device, or in Log Message output (if that is enabled).

I don't understand what you mean here - can you please explain what you're trying to do?

Yep, literally blow on it with your warm, humid breath. This is by and far the best way to check if a Xiaomi / Aqara Temp-Humidity Sensor is working, paired, and reporting.

1 Like