Battery status for Aquara sensors

Hi,

Is it possible check battery status for Aquara sensors using Zigbee CC2531? I can’t find a proper channel for temperature sensor - is it not yet covered or it need to be done in another way?

Hi,

I’m using zigbee2mqtt (CC2530) host + Aquara (old and new models) and it sends battery info in data package:
{"battery":68,"voltage":2945,"temperature":5.69,"humidity":76.4,"linkquality":73}

You can get battery status using Json or JS convertion:

Thing mqtt:topic:openhab:mi-sensor-9a6b (mqtt:broker:openhab) {
	Channels:
		Type number : temperature [ stateTopic="zigbee2mqtt/0x00158d0001c19a6b", transformationPattern="JSONPATH:$.temperature" ]
		Type number : humidity [ stateTopic="zigbee2mqtt/0x00158d0001c19a6b", transformationPattern="JSONPATH:$.humidity" ]
		Type number : battery [ stateTopic="zigbee2mqtt/0x00158d0001c19a6b", transformationPattern="JSONPATH:$.battery" ]
		Type switch : battery_low [ stateTopic="zigbee2mqtt/0x00158d0001c19a6b", transformationPattern="JS:z2m-lowbatt.js" ]
		Type number : link [ stateTopic="zigbee2mqtt/0x00158d0001c19a6b", transformationPattern="JSONPATH:$.linkquality" ]
}

For lowbatt signal i’m using JS convertion:

(function(dataString) {
    var data = JSON.parse(dataString);
    var batt = data['battery'];

    if (batt <= 10) {
        return "ON";
    }

    return "OFF";
})(input)

Thanks for info. I forgot to add that I’m using Zigbee binding. Is it problematic for implementation?

The ZigBee binding hasn’t added this channel since the Aquara devices don’t use standard attributes for getting battery information.

1 Like

These non-standard attributes can’t be somehow covered? It’s a problem in binding or openhab?

Can I help somehow? Send some logs?