How can I read current wind gusts in a SuuntoPlus app?
Hi @suuntopartnerteam,
I’m working on a SuuntoPlus app that displays current weather and forecast weather data. I’m trying to show wind gusts for the current weather, but on the actual watch I only get --.
In my template I currently read current weather like this:
$.get('/Weather/Current', function(v) {
gWxNow = v;
renderNow();
});
and then I try to render current gusts with:
setText('#nowWg', windStr(v.windGust));
This works only if /Weather/Current returns a windGust field. On the watch, however, this seems to be undefined, so my formatter returns --.
What confused me is that in the SuuntoPlus VS Code simulator internals, the weather mock seems to return a richer weather object. In suunto-internals, getWeatherData() includes fields such as:
{
humidity: 43,
feelsLike: 293.15,
temp: 293.15,
weatherType: 2,
windDeg: 230,
windType: 5,
windGust: 8,
windSpeed: 6,
pop: .23,
rain: 1.2
}
So in the simulator, v.windGust can exist on the weather object.
But from the documented data paths, /Weather/Current seems to expose only something like:
{
temp,
weatherType,
windSpeed,
windType
}
and the listed current paths appear to be:
/Weather/Current
/Weather/Current.temp
/Weather/Current.weatherType
/Weather/Current.windSpeed
/Weather/Current.windType
I can read forecast gusts separately with a path like:
/Weather/Future/N.windGust
or at least this seems to work on the watch for forecast data. But I have not found an equivalent reliable path for current wind gusts, such as:
/Weather/Current.windGust
My main question is: is there any supported way to read current wind gusts in a SuuntoPlus app on the actual watch?
I also have a related question about forecast index 0.
What is the intended meaning of:
/Weather/Future/0
How is /Weather/Future/0 different from /Weather/Current?
Is Future/0 the nearest hourly forecast slot, the current forecast hour, or something else? I’m asking because if current gusts are not available, one possible fallback would be to use /Weather/Future/0.windGust, but I’m not sure whether that would be semantically correct.
More specifically:
Does /Weather/Current.windGust exist on hardware?
Should current gusts be read from another path, for example Observation data?
Is windGust only available for forecast data, not current weather?
Is the richer weather object in the VS Code simulator only mock data and not representative of the real watch API?
What exactly is the difference between /Weather/Current and /Weather/Future/0?
Right now, on the watch, current weather gusts display as --, while forecast gusts can be displayed.
Tested on hardware, not only in the simulator. The issue is that the simulator mock appears to include windGust in the current weather object, but the actual watch does not seem to expose that field.
Thanks for any clarification.