# \[APP\] Aqara & Xiaomi Smart Home - Simplify your life with a smarter home

**URL:** <https://community.homey.app/t/app-aqara-xiaomi-smart-home-simplify-your-life-with-a-smarter-home/156>\
**Category:** Apps\
**Tags:** app, zigbee\
**Created:** [August 22, 2018, 8:18pm UTC](https://community.homey.app/t/app-aqara-xiaomi-smart-home-simplify-your-life-with-a-smarter-home/156 "2018-08-22T20:18:09Z")\
**Posts on this page:** 1\
**Showing post:** 4337

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [February 25, 2023, 8:23pm UTC](https://community.homey.app/t/app-aqara-xiaomi-smart-home-simplify-your-life-with-a-smarter-home/156/4337 "2023-02-25T20:23:04Z")

</div>

> [@robertklep](#):
>
> On the z2m Github, these calculations are a [long-standing topic of discussion](https://github.com/Koenkk/zigbee2mqtt/issues/8499).

Thanks Robert, I didn’t imagine it’s so complex and actually on Z2M they discuss it for 1.5 years, doing measurements, proposals, changing calculations … and basically :

- nobody knows how actually Xiaomi calculate batteries levels
- there is disagreement on maximum and minimum voltage, as it differs per condition (manufacturer, temperature, nominal voltage deviations)
- some messages says that Xiaomi also interpolate somehow with temperature, some say they use linear discharging characteristic
- some suggested it might be indicative only as capacity measurement is much complex then just measuring voltage
- they have tried several mathematical methods already, latest seems to be in general indeed linear - _ **3V\_2850\_3000** _ for those sensors being discussed

Basically on my example, if I measured 2.77V on CR2450, it’s taken as 0%, even sensor was still working fine with those levels possibly last 3 months while it was -20C outside but even +10C.

The solution would need to be much more complex (or trivial)

- add option to disable battery SOC for misbehaving / outside sensors (Athom did it already for some IKEA switches)
- showing battery voltage and use other apps eg. for calculating trends via flows - I guess it’s not possible to show battery voltage as value like in case of Z2M.
- implement some switch indicating it shall interpolate battery voltage with outside temperature sensor / Athom temp. value (seems nobody developed a mathematical model for that even graphs / discharging characteristics exists)

> [@JPe4619](#):
>
> Why not place the sensor on the inside of a window?

Sometimes you simply can’t. Eg. because of not right window orientation, because of blinds/rollers etc.

---

_[View the full topic](https://community.homey.app/t/app-aqara-xiaomi-smart-home-simplify-your-life-with-a-smarter-home/156)._
