pyawair icon indicating copy to clipboard operation
pyawair copied to clipboard

Correct data sensors

Open danielsjf opened this issue 7 years ago • 17 comments
trafficstars

@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.

danielsjf avatar Nov 18 '18 22:11 danielsjf

DeviceTypes:

awair
awair-glow
awair-mint
awair-omni
awair-r2

deanlyoung avatar Nov 18 '18 23:11 deanlyoung

Alright, guessed all of the right except gen2. Will correct it tomorrow!

danielsjf avatar Nov 18 '18 23:11 danielsjf

Also linked the wrong commit. The right one is dea8d1e9fdc439697ef8d96d7a1b4ca03b23b189

danielsjf avatar Nov 18 '18 23:11 danielsjf

@deanlyoung would you have a similar list for all the sensors (e.g. dust, voc, humid, temp, ...)

danielsjf avatar Nov 19 '18 12:11 danielsjf

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.

deanlyoung avatar Nov 19 '18 16:11 deanlyoung

Solved with a06b2ab5a8a554530aa9c39bc9232718f9cd507a

danielsjf avatar Nov 19 '18 17:11 danielsjf

@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'

danielsjf avatar Nov 19 '18 22:11 danielsjf

Yes, that is correct. See the sensor (device-type) list above. dust only exists for awair

deanlyoung avatar Nov 20 '18 07:11 deanlyoung

@deanlyoung Yes, but the Awair device is reporting pm2.5 and 10, not dust. Could this be a mistake in the dummy data?

danielsjf avatar Nov 20 '18 07:11 danielsjf

And by using awair, I mean specifically the first generation awair device, not awair devices in general. That might have caused some confusion.

danielsjf avatar Nov 20 '18 07:11 danielsjf

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 🤦🏻‍♂️

deanlyoung avatar Nov 20 '18 18:11 deanlyoung

Alright, I had some test to only get the expected values, but I'll code around it to also handle this case. No worries

danielsjf avatar Nov 20 '18 19:11 danielsjf

We’re fixing this, FYI

deanlyoung avatar Nov 21 '18 07:11 deanlyoung

OK great! In that case, could you add two devices that together have all the sensors? That would be great for our coverage 😉

danielsjf avatar Nov 21 '18 07:11 danielsjf

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 😞).

deanlyoung avatar Nov 21 '18 22:11 deanlyoung

@danielsjf @deanlyoung Coming back to this. Where are we at with this? Close it? Fix it?

netmanchris avatar Jan 28 '20 14:01 netmanchris

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

deanlyoung avatar Jan 28 '20 15:01 deanlyoung