[RELEASE] Xiaomi Aqara Mijia Sensors and Switches Driver

Thanks for this @chirpy
Much appreciated. :+1:

1 Like

It only accepts integer values for the temperature offset.

Regarding the one temperature sensor. Try turning on debug logging and then change the temp on it (holding it your hand for a while usually helps) and see if you get logging output from it and paste it here.

Would it be possible to make it decimal?

When you turn this on I see the temperature value, it is visible in the dasboard tile, when I turn it off, the last value stays visible. Is there a way to remove the last value so it disappears of my dashboard tile?

Yes, I'll look into it.

1 Like

This is probably the issue I was referring to regarding the other update. Once an attribute (Current State) has been set once, you cannot remove it again. The only way in HE to remove an attribute is to remove the device and add it again.

1 Like

Thanks for v0.12. :slight_smile:

It doesn't matter which button I hold and release, the release is always getting logged against button 1

This is the event log:

This is the resultant states:
Screenshot 2021-02-11 at 14.39.39

Otherwise it will be perfect. :grinning:

I've just released v0.13:

  • Modified Temperature Offset setting to float to allow for decimal corrections (e.g. 2.5)
  • Fixed virtual Release button number assignment
3 Likes

Yes - V0.13 fixed the release button assignment.

Thank you for the quick update. :smiley:

1 Like

thank you @chirpy
I can now use the WXKG01LM with the button controller app for the various tap actions.

One more thing I noticed from the logs is that you can actually see different data if the button is pressed 5 times, so for someone in the future the button might serve a 6th action that it can trigger.

I'm attaching the logs for pressing the button 1,2,3,4,5 times and holding it so you can see what I mean.
The other things that might be nice to do to clean up the WXKG01LM is to configure it so that it doesn't report that it can support pressed, held, double tapped, released on all 5 buttons, but that's me being picky, it's no big deal with the way it is.

Personally I'm happy with the current version

Logs

dev:1902021-02-12 13:26:58.928 infoOffice Button was released

dev:1902021-02-12 13:26:58.909 infoOffice Button contact changed to open

dev:1902021-02-12 13:26:58.904 debugProcessing Xigbee data (cluster:0006, attrId:0000)

dev:1902021-02-12 13:26:58.898 debugIncoming data from device : read attr - raw: A7C90100060800001001, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 01

dev:1902021-02-12 13:26:56.103 infoOffice Button button 5 was pushed

dev:1902021-02-12 13:26:55.554 infoOffice Button contact changed to closed

dev:1902021-02-12 13:26:55.549 debugProcessing Xigbee data (cluster:0006, attrId:0000)

dev:1902021-02-12 13:26:55.541 debugIncoming data from device : read attr - raw: A7C90100060800001000, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 00

dev:1792021-02-12 13:26:47.700 infoSending temperature event (Temperature: 24.0 °C)

dev:1902021-02-12 13:26:37.424 infoOffice Button button 4 was pushed

dev:1902021-02-12 13:26:37.418 debugProcessing Xigbee data (cluster:0006, attrId:8000)

dev:1902021-02-12 13:26:37.412 debugIncoming data from device : read attr - raw: A7C90100060800802080, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 8000, encoding: 20, command: 0A, value: 80

dev:1902021-02-12 13:26:32.876 infoOffice Button button 4 was pushed

dev:1902021-02-12 13:26:32.871 debugProcessing Xigbee data (cluster:0006, attrId:8000)

dev:1902021-02-12 13:26:32.865 debugIncoming data from device : read attr - raw: A7C90100060800802004, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 8000, encoding: 20, command: 0A, value: 04

dev:1902021-02-12 13:26:29.448 infoOffice Button button 3 was pushed

dev:1902021-02-12 13:26:29.443 debugProcessing Xigbee data (cluster:0006, attrId:8000)

dev:1902021-02-12 13:26:29.434 debugIncoming data from device : read attr - raw: A7C90100060800802003, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 8000, encoding: 20, command: 0A, value: 03

dev:1902021-02-12 13:26:26.311 infoOffice Button button 2 was pushed

dev:1902021-02-12 13:26:26.306 debugProcessing Xigbee data (cluster:0006, attrId:8000)

dev:1902021-02-12 13:26:26.300 debugIncoming data from device : read attr - raw: A7C90100060800802002, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 8000, encoding: 20, command: 0A, value: 02

dev:1902021-02-12 13:26:23.827 infoOffice Button button 1 was pushed

dev:1902021-02-12 13:26:23.807 infoOffice Button contact changed to open

dev:1902021-02-12 13:26:23.802 debugProcessing Xigbee data (cluster:0006, attrId:0000)

dev:1902021-02-12 13:26:23.797 debugIncoming data from device : read attr - raw: A7C90100060800001001, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 01

dev:1902021-02-12 13:26:23.632 infoOffice Button contact changed to closed

dev:1902021-02-12 13:26:23.627 debugProcessing Xigbee data (cluster:0006, attrId:0000)

dev:1902021-02-12 13:26:23.621 debugIncoming data from device : read attr - raw: A7C90100060800001000, dni: A7C9, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 00

--- Live Log Started, waiting for events ---

Thanks very much

1 Like

hey @chirpy any idea of the vibration sensors can be used with HSM? Or if not what capabilities does the driver expose for the vibration sensor?

Having moved from ST I have discovered that my ST multipurpose sensors which report as acceleration sensors (amongst other things) are not supported by HSM, so I'm wondering if these cheap vibration sensors from Xiaomi would be supported. Don't want to buy some wait 2 months and then find out that I wasted some money on them

I'm afraid that I have no idea as I don't use HSM. You could try asking in a new thread to see if there are people who do.

I need to understand before I do open up a thread what capability does the vibration sensor trigger? Is it an acceleration trigger? Or motion? Or perhaps a shock?

As it's a combined driver I don't think I can just set up a virtual device with the driver as I imagine the capabilities would depend on actual data received from a sensor.

Thanks chirpy

The vibration sensor driver section exposes the following attributes (this is for an inactive one):

  • acceleration : inactive
  • battery : 100
  • motion : inactive
  • presence : present
  • temperature : 22.0
  • tilt : inactive
  • voltage : 3.06
2 Likes

Is it possible to set the properties of a device to actually reflect its capabilities?

I have an Aqara temperature sensor which has these states:
aqara_temperature_states_

The device properties show as:

Note that the properties: motion, measure-illuminance, contact, button, acceleration and measure-water are all shown but not supported by this specific device.

This is an issue for me as I am publishing the device via @kevin 's MQTT App and using the properties to determine the device's capabilities in Indigo. So I am not getting an accurate picture of the device's capabilities.

is it possible to correct this? :slight_smile:

1 Like

@autolog It's likely me populating that properties data value. It is interesting that say temperature matches a measure-temperature property in terms of a change being discussed for an upcoming release of the MQTT app.

Down to me I think.. these property values carry over to MQTT $properties I assume ?

It's also likely the nature of the combined driver, as this is. The device capabilities apply to all devices, though only the ones supported have attributes set. I came across a similar issue with developing an Alexa/Google device using Raspberries and the Maker API. In the end I had to use the device attributes rather than capabilities.

1 Like

Hi @chirpy, Im getting this error in my logs for aqara wirelless switch:
2021-02-20 19:43:05.101 [error](http://192.168.1.30/device/edit/277)groovy.lang.MissingMethodException: No signature of method: user_driver_waytotheweb_Xiaomi_Aqara_Mijia_Sensors_and_Switches_579.checkEventInterval() is applicable for argument types: () values: [] (checkEventInterval)

And this for Xiaomi button:
[dev:361](http://192.168.1.30/logs#dev361)2021-02-20 20:24:59.872 [error](http://192.168.1.30/device/edit/361)java.lang.NullPointerException: null (parse)

Any hint what can be wrong?

Make sure you have clicked the "Configure" button in the device details. That error suggests that you've switched from a different driver that had old scheduled tasks that pressing Configure should resolve.