Closed Morac2 closed 6 months ago
The VOC µg/m³ value as reported by the AirThings dashboard does not match the µg/m³ value as reported in Home.
Looking at the code it looks like the calculation is completely wrong.
According to https://www.breeze-technologies.de/blog/air-pollution-how-to-convert-between-mgm3-µgm3-ppm-ppb/
Concentration (µg/m3) = molecular weight x concentration (ppb) ÷ 24.45
The code is doing some weird calculation involving temperate and pressure.
https://github.com/michaelahern/homebridge-airthings/blob/5198e29f42b56ec2ae1c19d2e9237b4e339d5525/src/plugin.ts#L257
The molecular weight can be calculated by comparing values in the dashboard when set to ppb and µg/m3. By my calculation it is 55.653
Version 1.1 includes updated VOC conversion logic that mirrors the Airthings logic. Thank you for raising!
The VOC µg/m³ value as reported by the AirThings dashboard does not match the µg/m³ value as reported in Home.
Looking at the code it looks like the calculation is completely wrong.
According to https://www.breeze-technologies.de/blog/air-pollution-how-to-convert-between-mgm3-µgm3-ppm-ppb/
Concentration (µg/m3) = molecular weight x concentration (ppb) ÷ 24.45
The code is doing some weird calculation involving temperate and pressure.
https://github.com/michaelahern/homebridge-airthings/blob/5198e29f42b56ec2ae1c19d2e9237b4e339d5525/src/plugin.ts#L257
The molecular weight can be calculated by comparing values in the dashboard when set to ppb and µg/m3. By my calculation it is 55.653