pyawair
pyawair copied to clipboard
Correct data sensors
@deanlyoung, I've made an internal list of which device has which sensors. This to avoid querying sensors that don't exist. Since I couldn't find a list of all the names in the documentation, I've made them up for those that I didn't have. Could you kindly provide me with the full list? The specific commit with the list is 85a1bdb040f4dbb96b62d0068d2cfc010ed6ef3b.
DeviceTypes:
awair
awair-glow
awair-mint
awair-omni
awair-r2
Alright, guessed all of the right except gen2. Will correct it tomorrow!
Also linked the wrong commit. The right one is dea8d1e9fdc439697ef8d96d7a1b4ca03b23b189
@deanlyoung would you have a similar list for all the sensors (e.g. dust, voc, humid, temp, ...)
temp
humid
co2 (awair, awair-glow, awair-r2, awair-omni only)
voc
dust (awair only)
pm25 (awair-r2, awair-mint, awair-omni only)
pm10 (awair-r2, awair-mint, awair-omni only)
There are other sensors we haven’t exposed yet, such as light and noise.
Solved with a06b2ab5a8a554530aa9c39bc9232718f9cd507a
@deanlyoung I'm reopening the issue since it seems that some 'awair' devices return PM25 and PM10 instead of DUST.
This is the output for the 15 minute data.
Out[10]:
[{'timestamp': '1970-01-01T00:00:00.000Z',
'score': 100.0,
'sensors': [{'comp': 'TEMP', 'value': 100.0},
{'comp': 'HUMID', 'value': 100.0},
{'comp': 'CO2', 'value': 100.0},
{'comp': 'VOC', 'value': 100.0},
{'comp': 'PM10', 'value': 100.0},
{'comp': 'PM25', 'value': 100.0}],
'indices': [{'comp': 'TEMP', 'value': 0.0},
{'comp': 'HUMID', 'value': 0.0},
{'comp': 'CO2', 'value': 0.0},
{'comp': 'VOC', 'value': 0.0},
{'comp': 'PM10', 'value': 0.0},
{'comp': 'PM25', 'value': 0.0}]}]
ID = 0 Type = awair
Token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiRFVNTVktRU5URVJQUklTRSJ9.bOM9rcABF9HKFHtxzF9kx8h9fv3CfvUIzveLFDRGrXs'
Yes, that is correct. See the sensor (device-type) list above. dust only exists for awair
@deanlyoung Yes, but the Awair device is reporting pm2.5 and 10, not dust. Could this be a mistake in the dummy data?
And by using awair, I mean specifically the first generation awair device, not awair devices in general. That might have caused some confusion.
Ohhh, I see! I believe there is only 1 device, so we opted for those data points, but they don’t normally correspond with a first edition device 🤦🏻♂️
Alright, I had some test to only get the expected values, but I'll code around it to also handle this case. No worries
We’re fixing this, FYI
OK great! In that case, could you add two devices that together have all the sensors? That would be great for our coverage 😉
Not sure if we can do that, but will try! Our docs framework basically writes itself (great!), but doesn’t provide a lot of flexibility (not great 😞).
@danielsjf @deanlyoung Coming back to this. Where are we at with this? Close it? Fix it?
Some updates to the sensor/device support list:
temp
humid
co2 (awair, awair-glow, awair-r2, awair-omni, awair-element only)
voc
dust (awair only)
pm25 (awair-r2, awair-mint, awair-omni awair-element only)
pm10 (deprecated)
spl_a (awair-omni only)
lux (awair-omni only)
All device types:
awair
awair-glow
awair-mint
awair-omni
awair-r2
awair-glow-c
awair-element