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

Reverse change to AQI value polling from air purifier #1387

Open
mouth4war opened this issue Apr 7, 2022 · 3 comments
Open

Reverse change to AQI value polling from air purifier #1387

mouth4war opened this issue Apr 7, 2022 · 3 comments
Labels

Comments

@mouth4war
Copy link
Contributor

mouth4war commented Apr 7, 2022

Describe the bug
A recently-merged PR (#1282) changed the way AQI value is polled from the air purifier by enabling AQI hearbeat to remove manufacturer's smoothening and filters on the hardware-reported values. This enabled real-time raw AQI values to be read at the cost of the filters.

I prefer the filtered AQI data instead as it is much less noisy.

Version information (please complete the following information):

  • OS: [e.g.Linux]
  • python-miio: [Use miiocli --version or pip show python-miio]

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

  • Model: Air Purifier 3H
  • Hardware version:
  • Firmware version:
@mouth4war mouth4war added the bug label Apr 7, 2022
@mouth4war mouth4war changed the title Revert change to AQI value polling from air purifier Reverse change to AQI value polling from air purifier Apr 15, 2022
@mak3
Copy link

mak3 commented Apr 16, 2022

manufacturer's smoothening and filters

Where did you read that about it?
Nobody noticed any smoothening, all readings were just flat for 30 minutes.

Only readings above 40 PM2 could previosly trigger proper reporting.
Maybe in China it's fine, but in Europie it's 250% of allowed norm, so it isn't acceptable for automation to react only after 40 PM2.

If you want smoothened results, you should use moving average (ca. 1-5 minutes) and not introduce fake reporitng.

https://www.home-assistant.io/integrations/filter/ -> time_simple_moving_average

@mouth4war
Copy link
Contributor Author

@rytilahti
Copy link
Owner

So I'm not sure what's the best option here so that's why I haven't responded... I have no device to test, so I'm not sure, for example, what would happen if the value would be adjusted to be 30 or 60? Would this change the update interval to be that? Should it also be done only once during the initialization?

In principle I agree with @mak3 that it would make more sense to give out the reading as reported by the device, and let the downstream smoothen (or filter) the reported values as needed..

Ping @Razer0123 who reported the delayed updates in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants