netbymatt / ws4kp

WeatherStar 4000+
https://weatherstar.netbymatt.com
MIT License
274 stars 47 forks source link

Local station no longer available? #55

Closed placeseer closed 3 weeks ago

placeseer commented 4 weeks ago

Sorry, I'm not super familiar with how exactly all of this works as far as coding so I'm unsure if this is a bug or something not in your control, but as of last week the weather star will no longer pull up my actual nearest station (KYIP). I know the station is at least still active and recording, the data is pulling properly on my download of WS4000v4 but I'm unsure if this is an API issue or a result of recent update of some kind? I did have an issue where it cycled through multiple Detroit stations when I tried resetting but now it's consistently reading one nearby but much further station as my local. Either way sorry to bother and thank you for your continued work on this project! It has brought me a lot of joy :) -MI, 48198 Tried on all browsers (Chrome, OperaGX, Edge) as well as through unraid docker version

netbymatt commented 3 weeks ago

Looks like it's pulling from KYIP again when I use your zip code as the location. There is some validation built into the code behind this application that makes sure at least a minimum of data that needs to be presented is returned by the station, and it's different on a screen-by-screen basis. If your local station stopped reporting, say, dewpoint because that instrument went down it would try the next closest station to see if that had all the data until it found one. That's all based on the upstream data from api.weather.gov. I just do the best I can with it.

When all the data isn't there, the displays looks weird. For example temperature might be reported as 32 degrees in the middle of summer (they output zero when there's no data). So from a visualization standpoint it's better to just find the nearest station that has all the data available.

I watched this closely when the last hurricane went through Tampa, FL last month and at one point only one nearby station was reporting data, somewhere up in the panhandle. The "Latest Observations" page looked almost blank because of this.

placeseer commented 3 weeks ago

That's actually super interesting! I saw there was a section of code meant to parse down noise from non-reporting local stations, but didn't know a single missing data point in the API could cause such chaos! Thank you so much for taking the time to explain the error to me and checking on it, your explanation actually made some of the other errors I've encountered make more sense! (I have also gotten the 32 degree error before) It also clarified for me a little more how the flow of data works from the stance of someone who admittedly doesn't know much about coding which is so cool. Sorry to bother you for an API issue and thank you so much for your continued work on this project!!