-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyPortal.get_local_time() calls incorrect IP/domain #86
Comments
Interesting. This will need further investigation. It doesn't look like io.adafruit.com is redirecting, so it should be hitting the same url each time. |
For the timeout error, there's already an issue open in the library where the error is occurring. You can follow it here: adafruit/Adafruit_CircuitPython_ESP32SPI#170 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using PyPortal 7.X to create a weather station display for Netatmo. I have an on-prem ASP.NET 6 proxy against the Netatmo API, so PyPortal qeries my proxy, which queries Netatmo and prepares the response in a json structure that's easy to display as widgets on the PyPortal.
I have the following program loop:
I experience unexpected behavior when
pyportal.get_local_time()
executes the second time (and all times after). First time the Adafruit API at http://io.adafruit.com is called as expected. But the second time, even though the URL looks correct, my local ASP.NET proxy is called instead. That's the same IP aspyportal.fetch()
calls.This is a flowchart describing what happens:
I added Azure Application Insights to my ASP.NET proxy to figure out what's going on, and was surprised to see requests for the domain
io.adafruit.com
hitting my on-prem proxy. I've documented proof of the traffic in my own project in this issue:blog-eivindgl-com/netatmo-pyportal-display#9
I don't know why this happens, but I suspect there's some kind of local DNS issue on the PyPortal that incorrectly maps
io.adafruit.com
to the same IP address as the URL of thefetch()
call.The text was updated successfully, but these errors were encountered: