Pi Zero W, various Adafruit Sensors and Adafruit io

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Pi Zero W, various Adafruit Sensors and Adafruit io

Post by Tom_Henry »

Sunday, October 17th

I need some help on this project I have created.

I am using a Pi Zero W set up for CircuitPython.

I am using i2C connected to the following Adafruit sensors: MS8607 and PMSA003I.

I have attached a photo of the components, the CircuitPython code, and the full error print out.

When I run the code, it will run for 2 to 8 hours, and then has an error(s). It prints out everything just fine and sends sensor values to Adafruit io just fine until a dreaded error occurs.

The error(s) is a direct result of the CircuitPython connection to Adafruit io. So the CircuitPython code from lines 168 to 205 are the main concern.

I have tried tweaking the code so many times, I am about to give up.

I have had great success running similar CircuitPython code and various sensors sending information to Adafruit io that will run for days and days with no errors. I have used very successfully the PyPortal and the Feather RP2040 with the AirLift WiFi FeatherWing connected to different sensors. After some tweaking, they now work error for days and days.

I have pretty much followed Brent Rubell’s CircuitPython code using his example of sending analog sensor values to an Adafruit IO feed. See a note at the beginning of the code.

I am looking for ideas/suggestions on how to catch errors and do something to keep the code running.

Hope someone can help out.

Thanks,

Tom Henry
Attachments
PI Zero Tom Henry.pdf
(222.88 KiB) Downloaded 4 times
PiSensors2.py
(6.2 KiB) Downloaded 4 times
Pi.txt
(3.8 KiB) Downloaded 3 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Pi Zero W, various Adafruit Sensors and Adafruit io

Post by adafruit_support_carter »

Were all of these projects running on the same wifi network? In general, it looks like some kind of temporary network issue:

Code: Select all

socket.gaierror: [Errno -3] Temporary failure in name resolution

User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Re: Pi Zero W, various Adafruit Sensors and Adafruit io

Post by Tom_Henry »

Yes, the Raspberry Pi Zero W was connected to our home WiFi network.

And the Raspberry Pi Zero W was connected to the PMSA003I, the MS8607, and the PCF8523 as you see in the photo.

What does "Temporary Failure in Name Resolution" mean?

Tom Henry

User avatar
Tom_Henry
 
Posts: 350
Joined: Wed Aug 26, 2020 8:19 pm

Re: Pi Zero W, various Adafruit Sensors and Adafruit io

Post by Tom_Henry »

Monday evening

Additional notes and comments:

Your comments and questions:

Were all of these projects running on the same wifi network? In general, it looks like some kind of temporary network issue:
socket.gaierror: [Errno -3] Temporary failure in name resolution

What doesn’t make sense here is I am running several other Adafruit devices running CircuitPython with multiple sensors. I have attached 3 screenshots showing results from Adafruit’s Metro ESP32-S2, Adafruit’s PyPortal with a multitude of Adafruit sensors, and Adafruit’s Feather RP2040 with the AirLift WiFi FeatherWing Coprocessor. All of these devices are on at the same time as the Raspberry Pi Zero W with Adafruit’s PMSA003I and MS8607.

All of Adafruit’s CircuitPython devices are currently running error free for days and days.

Only the Raspberry Pi Zero W running CircuitPython is the problem that keeps crashing. I am beginning to believer that the Raspberry Pi and CircuitPython don’t work well together. The Raspberry Pi will crash consistently within an hour or two.

I am ready to be proven wrong. I do like using a Raspberry Pi and Adafruit io because I can access the Pi via VNC and restart, stop, make changes remotely. I can’t do that with any of the above Adafruit devices. Whether you are running Arduino or CircuitPython, they are both the same. Turn the device on and it runs a program called something like code.py.

I really like the ease of use of Adafruit io once I figured out how to use it.
So, how can we fix the code for the Raspberry Pi so it will not crash every hour or so? I am open to any and all suggestions.

Thank you,

Tom Henry
Attachments
PyPortal Dashboard.png
PyPortal Dashboard.png (150.03 KiB) Viewed 121 times
Metro ESP32-S2 .png
Metro ESP32-S2 .png (145.88 KiB) Viewed 121 times
Feather RP2040 AirLift WiFi.png
Feather RP2040 AirLift WiFi.png (104.04 KiB) Viewed 121 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”