🐍 CircuitPython is the easiest way to program microcontrollers now celebrating over 200 boards!🐍
0

Learn Project using PMSA003I Air Quality
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Learn Project using PMSA003I Air Quality

by robboz4 on Wed Mar 03, 2021 10:54 pm

It's been running for several hours now with no issues.

I do see the location being posted in the feed:


2021/03/03 6:50:33PM 0.0 XXX.805913341410665, YYY.11242830753328, 192.0

But some how it's not getting to the dashboard widget. Looks like I configured the widgets wrong, so I will double check tomorrow.

Thanks for the support!


Dave
Last edited by adafruit_support_carter on Thu Mar 04, 2021 12:04 pm, edited 1 time in total.
Reason: obfuscated location

robboz4
 
Posts: 59
Joined: Tue Nov 20, 2012 7:01 pm

Re: Learn Project using PMSA003I Air Quality

by robboz4 on Thu Mar 04, 2021 2:11 pm

I fixed my dashboard and now the map widget is working.

Thanks for the library fix!

Cheers


Dave

robboz4
 
Posts: 59
Joined: Tue Nov 20, 2012 7:01 pm

Re: Learn Project using PMSA003I Air Quality

by brubell on Fri Mar 05, 2021 10:30 am

robboz4 wrote:2) New library and code loaded and running. But the dashboard is not updating the map widget with my values. It's still defaulting to New York area. Temperature and humidity are updating and I assume air quality will start as well.

In summary no crash with the new code, but no map widget update.


Thanks

Did you update your `secrets.py` file to include your location data (lat/lon/ele)? You're using the code on: https://github.com/adafruit/Adafruit_Le ... ty/code.py?

If that's still not working - could you navigate to io.adafruit.com and then navigate to the AQI feed you set up. Take a screenshot and upload it here.

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

Re: Learn Project using PMSA003I Air Quality

by robboz4 on Fri Mar 05, 2021 2:20 pm

See my latest post. It was my fault; I wasn't reading the feed. All fixed!


Thanks again!

robboz4
 
Posts: 59
Joined: Tue Nov 20, 2012 7:01 pm

Re: Learn Project using PMSA003I Air Quality

by robboz4 on Wed Mar 10, 2021 12:03 am

I'm back to my original problem of the device failing after several days. This time I had the serial console connected ( to a Mac running Mu) and here is the output:

7 min elapsed..
Fetching time...
Traceback (most recent call last):
File "code.py", line 168, in <module>
File "code.py", line 159, in <module>
File "/lib/adafruit_io/adafruit_io.py", line 677, in receive_time
File "/lib/adafruit_io/adafruit_io.py", line 508, in _get
File "adafruit_esp32spi/adafruit_esp32spi_wifimanager.py", line 225, in get
File "adafruit_requests.py", line 692, in get
File "adafruit_requests.py", line 597, in request
OutOfRetries:

I restarted the code and it ran for a few hours and then started issuing this message:
Failed to fetch time, retrying
Timed out waiting for SPI char
Fetching time...
Failed to fetch time, retrying
Timed out waiting for SPI char
Fetching time...
Failed to fetch time, retrying
Timed out waiting for SPI char
Fetching time...
so I interrupted it (ctl-C) and here is the stack trace:

Traceback (most recent call last):
File "code.py", line 168, in <module>
File "code.py", line 159, in <module>
File "/lib/adafruit_io/adafruit_io.py", line 677, in receive_time
File "/lib/adafruit_io/adafruit_io.py", line 508, in _get
File "adafruit_esp32spi/adafruit_esp32spi_wifimanager.py", line 225, in get
File "adafruit_requests.py", line 692, in get
File "adafruit_requests.py", line 568, in request
File "adafruit_requests.py", line 277, in close
File "adafruit_requests.py", line 199, in _readto
File "adafruit_requests.py", line 139, in _recv_into
File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 132, in recv
File "adafruit_esp32spi/adafruit_esp32spi_socket.py", line 172, in available
File "adafruit_esp32spi/adafruit_esp32spi.py", line 731, in socket_available
File "adafruit_esp32spi/adafruit_esp32spi.py", line 324, in _send_command_get_response
File "adafruit_esp32spi/adafruit_esp32spi.py", line 204, in _send_command
KeyboardInterrupt:


So is this :
A Memory leak on a library call?
A problem with the service that serves the time?

A Hardware problem?

The device is a fixed to a shelf and has not been moved since it was turned on so the environment hasn't changed.

I'll restart the device again and see how long it lasts.

Thanks

robboz4
 
Posts: 59
Joined: Tue Nov 20, 2012 7:01 pm

Re: Learn Project using PMSA003I Air Quality

by brubell on Mon Mar 15, 2021 9:39 am

Have you upgraded the ESP32 to the latest version of the nina-fw? https://learn.adafruit.com/upgrading-esp32-firmware

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

Re: Learn Project using PMSA003I Air Quality

by robboz4 on Mon Mar 15, 2021 2:07 pm

No I haven't. So I will try that. It's a bit of a task as I will have to disassemble the project to solder the tags, reassemble - flash and then dissemble again remove the tags and reassemble - might be a while. I'll post an update once I get it done. Right now I've got used to just rebooting every few days.

Thanks again!

robboz4
 
Posts: 59
Joined: Tue Nov 20, 2012 7:01 pm

Please be positive and constructive with your questions and comments.