OWM - weather data update interval not working properly.

Hello, I would like some advice and proper orientation so that I can correct the Error.

I am currently using the F6 watch and have a WF in it that provides weather via OWM.

The problem is that I wrote a function that at regular intervals e.g. 15, 30, 60 minutes is supposed to refresh the weather data, but this function does not work. In the morning, when I look at the latest weather update, it says like 1:00, but in reality it's already 5:00. But if I press the buttons on the watch DOWN + BACK-LP, the weather data is immediately restored and the last update time is also overwritten.

Thanks for the help

  • Are yoy getting an error in the callback from your makeWebRequest?  This can happen if your phone is out of range or borderline, and something you won't see in the sim unless you turn off the connection.

  • No, I don't get any error with makeWebRequest and the data is updated, but the problem is that not every time.

  • How many times have you seen this?  Could it be the weather station OWM is getting the data for your location down for a few hours so you keep getting the same data?  

  • This happens several times a day, mostly overnight. Even if I wouldn't see the update of new data on WF, I should be able to see the time of the last update in the Weather Update function, where the last update is loaded for me - when it was made and the time doesn't change either.

    rather, I would like to see an example of exactly where to insert the function and how to correctly set the call.

  • If I can, I'll ask for a link or a sample of weather updates at intervals, say 15 minutes, so I can see how to delegate everything properly. maybe there is a bug in my code...

  • If you run for a long time in the sim, do you see this?

    In the sim, how does your code react if you set connection type>ble to "not connected"?

    I've been using OWM with CIQ for many years, with widgets and watch faces, and this sure sounds to me like you are getting something other than a 200 status back from your makeWebRequest.  

    Something else to check is how much data you're trying to send to the main app using Background.exit().  There is a limit of about 8k.

  • If I set "ble" not connected in the SIM, after a while the message I wrote (connection error) appears

    I recently created a test application where I modified the code to only call the current temperature for the weather information to avoid filling up memory.

  • Where do you see the connection error message?  If you are seeing it on the debug console with a println, you won't see that on a real device unless you create a log file with the proper name.  And if you installed from the store, that name includes 8 characters generated by the app store.

  • I mainly don't understand why everything suddenly updates when I press the DOWN + BACK - LAP buttons on my watch. This is weird to me and I feel like I'm calling something wrong in the code...

  • Most of the tie the screen on a WF only updates once a minute, but with the buttons, it updates every second for a few seconds.