Xiaomi Temperature & Humidity Sensor Poll Time

Hi,

I recently got working the Xiaomi Temperature & Humidity Sensor, and its works pretty well, I can read it within HA.

I’m trying to find out how I can increase the poll time of the sensor.

It currently polls every hour, but I’d like to change that to every 10 minutes, or 5 minutes.
I understand this will affect battery life.

Does anyone have any information on this?

Thanks.

I don’t think you can change this value as it’s defined by the gateway firmware.

That’s unfortunate, if thats the case.

Maybe there is soem way to change it from inside the Mi Home app?

Agree. the polling interval is controlled by the either the sensor device or by the gateway.
BTW I am pretty sure that the interval is not a fixed 1hr, but will vary depending on if there is significant change.
E.g. after a shower I can see humidity readings rise in shorter window than 1hr.
You can see this in the graph as the data points are closer than 1hr.

E.g. for me this morning I got two readings 1 minute apart as humidity dropped:

image

image

1 Like

There is no way to change the behaviour from the app/gw.

Thanks, this is awesome.

I’m looking to use this as a reading for heating adjustments so if readings are based on relative change, rather than set intervals, this might work great. If a new reading is recorded when the temp increases, triggered by heating switching on, it would be ideal.

I can see in my current readings that there are a few close together also (arount 5-8 minutes apart):
image

At the moment I use a Aeotec ZW100 MultiSensor 6, which I have manually adjusted the Z-Wave settings to read every 10 minutes, and I haven’t noticed much affect on battery life:
image

I’m going to try the shower test also, I’ll put it in the bathroom, and remove it soon after to see what happens.

Do you know how long the device is working on 1 batery?
I’ve just added two and see a drop of x percentage every day.

I’m not sure, I set mine up basically a week ago and you can see where my battery is.

Still, I don’t think the batteries were definitely 100% when I installed them, and they are probably using cheap batteries (not duracell etc)… So your mileage may vary.

I haven’t been paying any attention to the battery usage this past week.

maybe I should :sweat:

I think the battery level is not well calibrated with these sensors.
For sure none seem to start @ 100% (due to being factory fitted I suppose)
also some people see rapid drops then no change for a while.

Followup on results of the shower test.

I moved one of the sensors into my bathroom, had a shower, and put it back into another room afterward.

It looks like some of the results were as close together as 3 minutes, and indeed results are reported when a significant change in temperature was recorded.

I also checked humidity, which shows the spike in humidity, a total of 5 recorded results in space between 23:22 and 23:42.

Results Temperature:
image

Results Humidity:
image

Lastly, @hijinx, on the other sensor, unmoved since yesterday to today the reading was 43% at about 16:50, and is now 41% today at approx 17:10. At this rate it would be a few weeks or months at most, I think.
image

Is this sensor reporting granular enough for your automation?

Also re battery level, most of my Xiaomi batteries are in the 40% to 55% range.
They are all about 6 months or so old.

  • I don’t think that the batteries start at or ever report 100%
  • I don’t think they report drain linearly
  • I expect that the device will stop working before it’s battery gets to 0% :slight_smile:
  • I’m pretty sure that you cannot accurately compare between devices

Bottom line they are a rough guide only.

Yeah, that sounds about right, the batteries should hopefully last a while.
I’ve had my Xiaomi sensors for only a couple weeks now.

As for the granularity for the heating automation, I’m not sure entirely so I think I’ll just need to try it and see after the weather cools down some more…
image
At the moment, nothing changes, it’s too warm. :slight_smile:

The reactive reports due to changes is encouraging though, as at the moment I have the heating automation report from an Aeotec ZW100 MultiSensor 6, which is manually configured to report in at strict 10 minute intervals.

I guess that if the Xiaomi sensor can react in less than 10 minutes then that would be a win? :smile:

My xiaomi sensor number state didn’t update occasionally, last update is 2 hours ago, it can’t be normal. But it is ok with xiaomi’s app.

The temperature+humidity sensor reports with changes over 6% change on humidiy or 0.5 degrees on temperature. This seemed good enough for me, for my heating system, but in the real life, it has some problems for example:

Let’s say you have your heating desired temperature set to 21º, and the last temperature reported by the sensor is 20.9, so the heater is on. Then, at a particular moment in time due to the current climate conditions, it takes 5 minutes to increase 0.1 degree, so to reach 20 degrees, it only takes 5 minutes, but to reach 21.4 that is the point where the sensor senses a 0.5 change and emits a new value, it takes 25 minutes. So there’s an extra 20 minutes of heating that could be avoided just if the sensor could be polled every 5 minutes.

I’m pretty disgusted with this, as there’s no easy way to get around this, and this situation happens more often than i would. So if anyone know a way to hack the electronics or the gateway to increase the interval it would be nice. I prefer to change the batteries more often that having this bad behaviour.

3 Likes

I’m considering making HA control my heating and have exactly the same concerns on using the xiaomi sensors. Any news?

Add force_update to your config.

Hi, @sjee can you elaborate where that force_update setting goes?

I can see no reference to it in the Xiaomi docs.

It is not xiaomi specific but a setting which can be used to update a state even if it did not change.

https://dev-docs.home-assistant.io/en/master/api/entity.html#homeassistant.helpers.entity.Entity.force_update

Hi, thanks for the link and info, but I’m not denying that this is a valid option.

I’m still not sure where advise that the option be added?

on the gateway config?
on the thermostat config?
somewhere in customize for a device?

That does not fetch new data from the sensor.