seanrees / prometheus-dyson

Prometheus client for DysonLink fans (Pure Hot+Cool)
MIT License
13 stars 9 forks source link

Value reported for Volatile Organic Compounds (VOC) appears to be ~10x that of the native dyson app #5

Closed Scaredycrow closed 3 years ago

Scaredycrow commented 3 years ago

Basically as per the title. I suspect the value returned should be a value 1 10th of what it is reporting (possibly a decimal?) so instead of 12, perhaps it should be 1.2

This correlates to the (rough) position on the graph in the native dyson app which describes 0-3 as "Good" (green) when the api was returning a value of 12.

By way of example I've converted Grafana to use a 1-100 scale for VOC instead of 1-10

2021-01-09 17-41-46-1

Screenshot 2021-01-09 174448

seanrees commented 3 years ago

Good catch, this is definitely a bug. I want to make the VOC reporting consistent with V1 and V2 units, and V1 is definitely normalised to a range of [0,10] -- so I'll fix it so V2 devices are scaled in that range as well.

For the other air quality stats: PM2.5, PM10, and NOx -- are they similarly on a range of [0,100] on your unit? Should I scale these down to [0,10] as well?

Scaredycrow commented 3 years ago

PM2.5/10 appear to be ok (though not easy to test), I think they represent ug/m3 which shouldn't need normalising.

NO2 and VOC are definitely both on a scale of 0-100 though and need to be normalised.

seanrees commented 3 years ago

I pushed a fix for this to the main branch. It should now normalise to 0-10 for VOC and NOx.

Scaredycrow commented 3 years ago

Confirming VOC and NOx rescale. Grafana dashboard has been updated and will be exported as a contribution.

seanrees commented 3 years ago

Great, thanks! Going to close this out now then (and will handle the pull request separately :))