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

Does anyone know how to add a dashboard action item to silent Xiaomi smoke detector when it's triggered?

Continuing the discussion from [Release] Xiaomi / Aqara device drivers:

Answering my own question, here's how to disable the smoke detector when it's triggered.

  1. in RM, create a custom command and link it to the smoke detector's command - resetToClear()

  2. In Devices, create a virtual momentary switch

  3. In RM, create a trigger for the virtual momentary switch. When it is 'On', it will run the custom command created in step 1.

  4. In dashboard, add the virtual switch created in step 2.

When smoke detector is triggered, you can disable the siren through dashboard. :slight_smile:

1 Like

Hi @guyeeba,

I have just moved my QBKG11LM and QBKG12LM switches (with neutral) to your upgraded driver. It's really cool that you can separate the button from the switch!

Whilst the separation works fine, when the buttons are physically pushed on the parent wall switch the DH does not record which button was pressed. The following is outputted in the logs:

Unknown button state 0100 for endpoint 5
Unknown button state 0100 for endpoint 6

Any ideas?

All the best,
Mark

Hi, Mark,

unfortunately I cannot try it it right now, but I think it is caused by the 2.0.6 upgrade...

Please revert the byte order in button handler ("0001" to "0100" and "0002" to "0200", line 94 and 107), and most probably it will work again. :slight_smile:

I'll try to update the source on github tomorrow...

Thanks, and sorry for the inconvenience,
guyeeba

I’ve placed a humidity offset but it doesn’t work… placing 10, -10, 20 or anything else, the humidity value is just the same…

Can you test one thing for me?
Can you placed it in the freezer for a few mins 2/3 and see if temp changes?

[UPDATE] v0.8.2 of Xiaomi/Aqara Temperature Humidity Sensor device driver for Hubitat

Thanks to @ajeshm 's feedback, I discovered that the object used to store a user's custom humidity offset value was named incorrectly. This has been fixed, and I've taken this chance to update and fix a few more things in this driver.

The updated driver code can be grabbed from here.

Major Changes

  • Humidity offset value setting is now working correctly

  • Pressure events now use the officially supported Pressure Measurement capability
    Prior to this release, atmospheric/environment pressure reports were made using a custom attribute. A while back, Hubitat added official support for the PressureMeasurement capabliity. From a user perspective, there's no change in the attribute name (pressure) but an Aqara sensor should now show up in apps which can use pressure as part of an automation trigger / rule.

  • Temperature values are now reported in hundreths (0.01 precision)

  • The voltage range for Battery % has been changed
    The minimum / maximum voltage values used to calculate battery percentage have been changed from 2.5V min / 3.0V max to 2.9V min / 3.05V max. This means your reported battery percentages will change from what you have been seeing! It should not be a cause for alarm, however. Keep in mind that using the min / max voltage values to calculate a battery percentage only gives a very very rough estimate of battery health. Also, remember that the min / max voltage values can be changed in the preference settings in the device details page for each sensor.

Detailed Change List

  • corrected misspelled humidity offset setting object name so that humidity offset value now works correctly
  • switched from use custom attribute to officially supported PressureMeasurement capability to generate pressure value events
  • renamed object used for pressure offset value to pressureUnits
  • changed to use of location.temperatureScale to determine user's temperature scale setting, following Hubitat's environment sensor driver example
  • changed precision level of temperature event values from 0.1 (tenths) to 0.01 (hundredths)
  • fixed regression in default battery min/max voltage used to calculate battery level percentage - default values are now 2.9V minimum and 3.05V maximum
  • refactored portions of code
5 Likes

I believe I need to change a battery soon on this temp/humidity sensor... But it's still working fine... lol

Battery level is -10% (2.885 Volts)

:rofl:

But that’s helpful, actually. When the sensor working, please let me know what the last reported voltage was and the I can update the minimum voltage in the drivers to a lower value.

Ok I will keep an eye on voltages and as soon they are dead I will let you know :wink:

@veeceeoh @Somel
Just updated my driver and I'm getting the same. I did have min voltage of 2.8.
My last battery report was as follows.
image

@veeceeoh is the voltage reported by the device? Just asking as my oldest device (main door sensor) that I never swapped the battery and is on operation for over 20 months now has a reported voltage of 3.025...

If it is reported by the device.... damn this thing last as hell...

If you have custom set min / max values those will remain unchanged through any driver updates. It’s good to know that you also are seeing 2.885V on a working sensor.

Yes, I see similar values with my Door Window Sensors after more than 1.5 years.

I just thought I would change to the values you mentioned in your release notes.
I've changed it back now.
Just thought I would let you know.

Are these Aqara? My Aqara temp/humidity sensors started acting-up at 2.75 volts.

My reported reading of Voltage on the Xiaomi Aqara WSDCGQ11LM Temperature Humidity Sensor

Min reading of all time and the device is working now at this voltage: 2.845V
Max with a new battery 3.145V
current reading on my 6 WSDCGQ11LM
2.845 2.885 2.885 2.905 2.925 2.925
new driver Version 0.8.2
a very big thanks to @veeceeoh for all the work you do for us

1 Like

I have an issue with some of my devices, I am trying to add Original Door Sensors but they are struggling to initialize - they sit there for hours and nothing happens. My Aqara Door Sensors work and pair fine!

Anyone else experience this?

Did you kept pressing the pair/reset button every second to keep the device awake? And sometimes after the initialization starts I reset the device and kept pressing the button every second to make then finish the initialization.

1 Like

Yeah i have kept pressing it. Haven't tried the reset whilst initialising will try again later...

It sounds like a minimum Voltage of 2.8V and either keeping the max at 3.05V or going up to 3.10V may yield more "realistic" battery level calculation, for Temp-Humidity Sensors, at least.

Related to this - After I saw my Xiaomi Cube report a voltage level of 2.735V, it went back up when I stopped doing tests with the newest driver.

Since then, it's been bouncing between 3.005V and 2.975V - which correspond to 70% and 50% using the current driver's 2.9V/3.05V min/max values. I'm going to look into calculating battery percentage level on a curve (something akin to a logarithmic curve) because from everything I understand about battery life with these button cells, there can still be quite a bit of capacity remaining as the voltage first starts to drop off from its maximum reading, but the relative capacity drops more as voltage goes down to the lowest levels.



I have a fair number of the original Door-Window sensors, but it's been ages since I've paired one, so I'll try it to see if anything is different than it was last year, but...

What @vjv explained is the best procedure for getting Xiaomi / Aqara devices paired. There's definitely a correct timing of the continuous short presses to get it to work, however. Basically, after the initial roughly 5 second long-press, on each short-press you should see the LED flash as you short-press and then wait for another LED flash before the next short-press.

Also, if the initialization hasn't finished within 90 seconds, I'd recommend starting over.



In other news, after a false start with a DOA device, I got a working ZigBee sniffer and with its help I have finally figured out how to correctly change the sensitivity level of the Aqara Vibration Sensor!

I need to re-work the code and do some testing when I have time, but a driver update is imminent!

4 Likes