Weather Station Input Field Tidyness
This is borderline "feature request" but I thought I'd mention it, as it ultimately happened to me because iOS, and took log file peeping and web client usage to debug.
For eg HD-16, v4.0.1135
When selecting WUnderground, I used copy/paste on iOS to populate the ID of my weather station, copying from mobile safari to the RainMachine app.
And Rain Machine just kept failing, as if WUnderground were broken
WUnderground does get broken now and again, but this time it was a subtle issue
Looking in the logs,I saw this:
https://api.weather.com/v2/pws/dailysummary/7day?stationId=REDACTED &format=json&units=m&apiKey=redacted, error: HTTP Error 400: Bad Request
it may be less obvious in this web form, but there was a space between the end of the stationId and the first "&" of the POST
Looking ack on the Web interface, I could see - yes there was an extra space at the end. D'oh! iOS copypasta loves to do nonsense like this
Removed space, everything good again
So while this is indeed partial user error, please consider sanitizing fields such as this to avoid such issues - it's particularly easy to get bitten by this on iOS mobile app.
I suspect other weather services might have similar issues with un-trim()d station names or other request URL fields
Cheers
Please sign in to leave a comment.
Comments
1 comment