Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi Airpurifier sensor is getting crazy after update to 2022.03 #67528

Closed
sgurgul opened this issue Mar 3, 2022 · 9 comments
Closed

Xiaomi Airpurifier sensor is getting crazy after update to 2022.03 #67528

sgurgul opened this issue Mar 3, 2022 · 9 comments

Comments

@sgurgul
Copy link

sgurgul commented Mar 3, 2022

The problem

After update to 2022.3 AirPurifier 3H started to report AQI values much more offen and they seems to be very unbalanced.
Values reported within 1-2 minutes can differ for even 200-300%.

Please see a screenshot illustrating the issue.

I did not notice any mentions in the release logs related with Xiaomi devices so it might be a defect ?

What version of Home Assistant Core has the issue?

2022.3.0

What was the last working version of Home Assistant Core?

2022.2.9

What type of installation are you running?

Home Assistant OS

Integration causing the issue

xiaomi_miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio/

Diagnostics information

image

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@probot-home-assistant
Copy link

Hey there @rytilahti, @syssi, @starkillerOG, @bieniu, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


xiaomi_miio documentation
xiaomi_miio source
(message by IssueLinks)

@rursache
Copy link

rursache commented Mar 3, 2022

same issue as here #67503

@sgurgul
Copy link
Author

sgurgul commented Mar 3, 2022

same issue as here #67503

In what meaning is it the same ?
I don't have any problem to setup the integration for 3H. Nor any errors in the log.

Just AQI results reported by the sensor are behaving very different than before the update.

@yannpub
Copy link

yannpub commented Mar 4, 2022

FYI, my 3C (before the integration got broken by the update) was reporting every 10 minutes. In regard to your screenshot, previous reporting every hour seems a bit too long, but the new behavior seems to be a bit agressive

@rytilahti
Copy link
Member

rytilahti commented Mar 6, 2022

This upstream PR changed the behavior to request a refresh from the sensor just before an update (rytilahti/python-miio#1282), causing it to update more regularly (i.e., every time it gets polled).

I have no idea why the reported values would deviate that much in short time periods.. I have no idea how aqi works, so is it completely out of question that the device is reporting the values correctly? One possibility could be that the device itself smoothens the output for the given reporting period, avoiding those misreads..

@yannpub
Copy link

yannpub commented Mar 10, 2022

image

Here is a screenshot for a 3C.
When the purifier is stopped, polling happens every 10 minutes.
When in activated mode, values are refreshed more often. Maybe that is why more spikes appear.

@mouth4war
Copy link

mouth4war commented Apr 5, 2022

@rytilahti Can this behavior be configurable and default behavior be previous smoothened version with AQI heartbeat off?

Smoothened version is better for automation triggers. Its like applying a filter on the noisy AQI data. I think Xiaomi did this for good reason. The hardware sensor is noisy at low AQIs.

@rytilahti
Copy link
Member

@mouth4war so most of the python-miio does not currently do caching nor smoothing, so I'm not sure what'd be the best approach here. I've seen a comment at upstream issue tracker that accurate reading as reported by the device (and then filtering out outliers by themselves) is better than being "capped" to less regular, also sometimes incorrect as seen on the screenshot above, readings.

As I don't really have vested interest here, I'm not sure what's the best solution.

@github-actions
Copy link

github-actions bot commented Oct 5, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 5, 2022
@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants