0

IoT Air Quality Sensor by Brent Rubell
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

IoT Air Quality Sensor by Brent Rubell

by Tom_Henry on Sun Aug 01, 2021 7:08 pm

I am working on the IoT Air Quality Sensor with Adafruit IO project by Brent Rubell.

I am using Adafruit’s Metro M4 AirLift Lite board and have breadboarded the BME280 and PM2.5 PMS5003 sensors.

I have wired up everything and have loaded his CircuitPython Project Bundle code. I have attached the bundle code file as code.py.

I have carefully followed setting up his feeds and set up a group of feeds, see attached screenshot.

I seem to be having a problem with the feeds.

Here is the CircuitPython REPL output from Mu:

code.py output:

Traceback (most recent call last):
File "code.py", line 150, in <module>
File "/lib/adafruit_io/adafruit_io.py", line 670, in get_feed
File "/lib/adafruit_io/adafruit_io.py", line 531, in _get
File "/lib/adafruit_io/adafruit_io.py", line 500, in _handle_error
AdafruitIO_RequestError: Adafruit IO Error 401: request failed - invalid API key provided

Code done running.

Can you suggest how I might fix this?

Thanks,

Tom Henry
Attachments
Screen Shot 2021-08-01 at 3.42.28 PM.png
Screen Shot 2021-08-01 at 3.42.28 PM.png (109.48 KiB) Viewed 80 times
code.py
(6.92 KiB) Downloaded 1 time

Tom_Henry
 
Posts: 107
Joined: Wed Aug 26, 2020 8:19 pm

Re: IoT Air Quality Sensor by Brent Rubell

by jwcooper on Mon Aug 02, 2021 9:53 am

Looks like it might be possible that you're missing the secrets.py file, or the AIO key is missing in that file.

Can you make sure that in addition to the code.py file in the root of the CIRCUITPY folder, you also have the secrets.py file with the following populated:
https://learn.adafruit.com/diy-air-qual ... code-usage

At the start of that page, it explains how to get that setup.

jwcooper
 
Posts: 805
Joined: Tue May 01, 2012 9:08 pm

Re: IoT Air Quality Sensor by Brent Rubell

by Tom_Henry on Mon Aug 02, 2021 3:23 pm

Success!

Just replaced the Adafruit IO Key.

Thank you,

Tom Henry

PS Check out the screen shot of the dashboard.
Attachments
Screen Shot Tom Henry.png
Screen Shot Tom Henry.png (643.39 KiB) Viewed 67 times

Tom_Henry
 
Posts: 107
Joined: Wed Aug 26, 2020 8:19 pm

Re: IoT Air Quality Sensor by Brent Rubell

by brubell on Tue Aug 03, 2021 5:03 pm

Looks great!

brubell
 
Posts: 1514
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.