smartbutnot / flightportal

Project for displaying the details of planes overhead on an Adafruit MatrixPortal and LED matrix
263 stars 23 forks source link

Board resets after finding a flight #23

Open medd49 opened 3 months ago

medd49 commented 3 months ago

I have been running this for about a year now with no issues. Recently, I've found that the board stays connected whenever there is no flight overhead. However, once the board does find a flight, it will display it correctly, but then crash during the next loop. This ONLY happens after it successfully found a flight. It seems to have an issue with the following line:

response=requests.get(url=FLIGHT_SEARCH_URL,headers=rheaders).json()

in the get_flights definition.

The strange thing is that it works fine the first time it finds a flight, but then resets when trying to do so again. It'll then reconnect to the wifi via the CheckConnection Function and find the next flight, only to reset again after finding that one.

PG20050223 commented 3 months ago

I am having this issue also. Same as described above. This behaviour started around 7 days ago.

medd49 commented 3 months ago

@PG20050223 Yes! Same here - about 7 days ago. Glad to know its not just localized to my setup. I've tried debugging some, but once I tracked it to the JSON parsing, that is above my paygrade 😄

Hopefully someone is able to figure out the issue. I'll keep trying

resmithn commented 1 week ago

Also same issue here, just noticed a few weeks ago after I plugged board into PC. [Normally runs on a USB Wall plug] I tried adding w.feed after each scroll but no difference. Let it run with MU serial open and don't see any error msgs, e.g. HTTP. The board just disconnects so hard to see/know what the error may be. Of course reconnects and works if flight is found. Wanted to get in the loop if a solution is found.

resmithn commented 1 week ago

[StarTrailMeteor] opened an issue re: running Flight code on an S3. I had a Word Clock running on an S3 so changed the wifi and request code in the current flight code to what the Word Clock S3 was using and loaded the flight code on another S3. It works and the bigger surprise is: No disconnects, none.

PG20050223 commented 1 week ago

Awesome! Can you share the working World Clock wifi and request code?

resmithn commented 1 week ago

[PG20050223]: I would but this thread is for the M4 Portal. [StarTrailMeteor] was trying to run on ESP32-S3 so that mod code is what I sent to [StarTrailMeteor] . It won't work on an M4 Portal. Still trying to figure out the disconnect issue on the M4, will add comments when/if I [or someone] can figure out the issue.