Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Master Guru

Tracking Air Quality with HDP and HDF: Part 2 - Indoor Air Quality

Using a few sensors on a MiniFi node we are able to generate some air quality sensor readings.

Source: https://github.com/tspannhw/minifi-breakoutgarden/blob/master/aqminifi.py

Data:

row['bme680_tempc'] = '{0:.2f}'.format(sensor.data.temperature)
row['bme680_tempf'] = '{0:.2f}'.format((sensor.data.temperature * 1.8) + 32)
row['bme680_pressure'] = '{0:.2f}'.format(sensor.data.pressure)
row['bme680_gas'] = '{0:.2f}'.format(gas)
row['bme680_humidity'] = '{0:.2f}'.format(hum)
row['bme680_air_quality_score'] = '{0:.2f}'.format(air_quality_score)
row['bme680_gas_baseline'] = '{0:.2f}'.format(gas_baseline)
row['bme680_hum_baseline'] = '{0:.2f}'.format(hum_baseline)

See Part 1:

https://community.hortonworks.com/articles/189630/tracking-air-quality-with-hdp-and-hdfi-part-1-apac...

Newark / NYC Hazecam

https://hazecam.net/images/main/newark.jpg

Example

{"bme680_air_quality_score": "82.45", "uuid": "20190131191921_59c5441c-47b4-4f6f-a6d6-b3943bc9cf2b", "ipaddress": "192.168.1.166", "bme680_gas_baseline": 367283.28, "bme680_pressure": "1024.51", "bme680_hum_baseline": 40.0, "memory": 11.7, "end": "1548962361.4146328", "cputemp": 47, "host": "piups", "diskusage": "9992.7", "bme680_tempf": "87.53", "te": "761.2184100151062", "starttime": "01/31/2019 14:06:40", "systemtime": "01/31/2019 14:19:21", "bme680_humidity": "13.22", "bme680_tempc": "30.85", "bme680_gas": "363274.92"}

{

"end" : "1548967753.7064438",

"host" : "piups",

"diskusage" : "9990.4",

"cputemp" : 47,

"starttime" : "01/31/2019 15:44:11",

"bme680_hum_baseline" : "40.00",

"bme680_humidity" : "13.23",

"ipaddress" : "192.168.1.166",

"bme680_tempc" : "30.93",

"te" : "301.96490716934204",

"bme680_air_quality_score" : "83.27",

"systemtime" : "01/31/2019 15:49:13",

"bme680_tempf" : "87.67",

"bme680_gas_baseline" : "334942.60",

"uuid" : "20190131204913_4984a635-8dcd-408a-ba23-c0d225ba2d86",

"bme680_pressure" : "1024.69",

"memory" : 12.6,

"bme680_gas" : "336547.19"

}

1,567 Views
0 Kudos
Version history
Last update:
‎02-10-2019 10:08 PM
Updated by:
Contributors