MallocArray / airgradient_esphome

ESPHome definition for an AirGradient DIY device to send data to HomeAssistant and AirGradient servers
GNU General Public License v3.0
237 stars 40 forks source link

Support for batch-specific corrections #104

Open Mallonbacka opened 3 days ago

Mallonbacka commented 3 days ago

There is a post on the AirGradient blog called Low Readings from Plantower PMS5003, which explains that a few batches of Plantower sensors are miscalibrated (including mine). They provide some documentation about fixing the view in their own dashboard.

Has anyone else using this configuration dealt with this issue?

It seems that they have "correction formulae" for the values, I assume these could be applied somewhere to adjust the values that are fed into EPA formula - similar to how the correction algorithms are already used. It looks like each batch needs a different correction.

The blog post includes some good information on how to numerically correct the values. Is it possible to add support for correcting the values to this configuration?

MallocArray commented 2 days ago

I've been following the discussion in the Forums. The current ESPHome sensor entries don't return serial number as far as I know, so automatic selection of the corrections isn't likely, without updating the ESPHome code itself, which I don't have interest in doing myself.

It would be possible to either make additional packages that are copies of the PMS5003 package with the different corrections, or may see if I can come up with some !extend type lines that could be added ad-hoc to apply the corrections.

I've had all of my devices for quite awhile, so I'm not experiencing any of these issues, but the corrections should drastically change the sensor readings, so I should be able to tell if they are doing something to my numbers or not.

In short, I'm considering something, but no plans in the immediate future to work on it. If anyone else comes up with suitable files or extends, let me know and we'll look at adding them into the project.