A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By Mikejstb
#18755 the strangest thing - every since yesterday my weather station no longer works.
It starts up and shows the google ip, then prints "updating weather" to the console, then nothing.
I put some debug messages in and it appears that the conn:on("receive", function(conn, payload)
never completes.

I've tried on my "permanent" project and also on a proto board - two different ESP-s. And they both are doing or not doing the same thing.

Something about the TCP connection I guess.
I rebooted my router as a guess but that didn't make any difference.
User avatar
By kubi
#18758 The same here. It doesn't fetch any weather data any more. I think we neeed a loop that does more often try to get data until it's successful. I figured out earlier already that openweathermap.org doesn't always reply on each request. Any thoughts?
User avatar
By Mikejstb
#18778 well I'm glad it's not just me!
I think you must be right, for some reason sometimes (all the time lately) openweathermap isn't responding.
Here's the troubleshooting I've tried:
- tried substituting my city,state with the city code number - no difference
- tried sending the query info via the url like this -
api.openweathermap.org/data/2.5/forecast/city?id=5429032&APPID=myApiID

This displays the json data correctly. But it's not exactly the same as doing the TCP request, so it may have no meaning.

I also tried putting my city,state in that url - when I do that I get a 404 error.

I don't know how to look closer at the tcp request in Lua, to see if there is some kind of error or failure happening beyond just seeing that the conn:on(receive...) isn't ever executing