5

When I started looking at getting the weather using the relatively new Snapshot API I was a bit puzzled/concerned when I couldn't find any sort of timestamp on the results being returned.

I implemented the usage of the API and everything seemed ok for a while. However, now I have been getting the same Weather data for like four days across three very different locations. And the conditions and temperature have indeed not been the same in real life (and another device gave different (correct) data).

If you trust the API to deliver you snapshot data with no timestamp or location or anything you really need to be able to trust the data being returned.

Is this a known issue for the Snapshot API? Is there a way to avoid this type of situation to happen? How can you recover when the weather gets stuck like this? And is there some way to know the age and/or location of the data being returned?

I have debugged the device in question and seen that it isn't the app caching the data and the WeatherResult has status as success.

Roy Solberg
  • 18,133
  • 12
  • 49
  • 76
  • 1
    the awareness api is not very aware of the weather (or at least it wasn't at the time this question was posted) and when i worked with it, it was pretty buggy and unreliable, on top of only updating every 4 hours when it did work properly, so i abandoned the idea of using awareness api for weather. see my post here: https://stackoverflow.com/questions/38146933/awareness-api-always-returning-cloudy-weather – user2322082 Nov 27 '17 at 20:38

1 Answers1

0

The API documentation says that weather snapshots are returned at the device's current location. Having tested it, the weather definitely updates itself if the location changes or every few hours (as opposed to being a known issue).

About the second question, if caller needs to know the location, there is a separate API getLocation() which gives that information.

If "getting stuck" means the returned weather data never changes, a bit more detail on period of waiting or distance traveled will be helpful.

MRC
  • 56
  • 4