Community Support
Hi Pierre,
Thanks for the mention in your directions about the stickertags and regional networks 🙂
I've set up a test site with your software (current WP/live-weather-software).
Neither method cited in the directions (the examples) work on my site.. both yield
Unable to generate the requested page. Header "HTTP 400 / Bad Request." sent to client.
** REQUEST DETAILS **
REQUEST_URI => /wp-content/plugins/live-weather-station/generator.php?type=stickertags&station=yx:00:00:00:00:01
REQUEST_METHOD => GET
REMOTE_ADDR => 24.5.140.48
HTTP_USER_AGENT => Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
The URL cited in my control panel was for https://{my.website}/get-weather/yx:00:00:00:00:01/stickertags/ which also didn't work.
What debugging do I need to do? Is 'yx:00:00:00:00:01' the 'station ID' I should be using?
Best regards,
Ken (Saratoga-Weather.org)
Hi @ken!
It's an honor to see you here ????
Regarding your issue, it can come from many different things... The first being the poor quality of the doc I've made : I realize that I have never explicitly written that published url are in the data column (fifth column) in the station view. Could you confirm the url you try is this url?
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
Hi Pierre,
The URL I tried first was the one suggested on the Station entry under the checked
Data Publishing
This file can be accessed at this URL, or at many alternates URLs. See documentation for detailed information.
The 'this URL' was https://wpwx.stgawx.org/get-weather/yx:00:00:00:00:01/stickertags/
The 'alternate URL' I tried based on the documentation was
Both resulted in the 400 error claiming invalid station ID
Thanks for your assistance.
For me, the second one is working (if you replace the & by a simple &).
For the first one, it's more problematic because it's a 404. Are you using a multisite version of WordPress?
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
OMG. I see from where come the "&", it's from my uggly documentation ????- so sorry. Will be corrected on the new version I'm working on... Nevertheless, it doesn't explain the 404 on the standard url if you're on a "non multisite" version.
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
AhHa! Yes, I now see a conditions stickertags at http://wpwx.stgawx.org/wp-content/plugins/live-weather-station/generator.php?type=stickertags&station=yx:00:00:00:00:01
One issue is the Last-modified: header for the return uses the GMT time the query was processed. To be useful for the Regional Weather Networks, that should be the UTC time of the last observation that the stickertags represents.
Wowowow. I though time and date were grabbed right from the file. Do you confirm it is grabbed from the HTTP header? That's definitely new to me... For now this header field contains the date at which data is requested to the database and served as a "virtual" file, so typically this header is equivalent to "now"+ ε...
PS : glad you've a working file now 😉
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
Hi Pierre,
Yes, the webserver's Last-modified: date is used by the regional networks as it is the only date likely to be 'good'. The timestamps (date/time) in the stickertags are ignored as they use many different formats (m/d/y, y-m-d, d/m/y and times in 12 or 24 hr syntax). The only reliable time is the webserver's Last-modified one which reflects (in UTC time) exactly when the data was last updated by the weather software.
It also helps when networks cover multiple timezones (like the European and Southwestern networks) so the 'age' of the observation can be easily computed from 'now' v.s. Last-modified .
So yes, please change the stickertags generator to use the server's gmdate() when the data was collected, then emit that value as the Last-modified header -- then stations using your software will be fully compatible with the regional network conditions collectors (which run at 5 minute intervals).
Hello Ken.
You explanation makes sense. I was not aware of this. Do you have some links to redirect me to a full description of the stickertags format?
PS: this feature will be implemented in the 3.5.3 version...
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
The stickertags were originally developed for use with the Anole wxgraphic weather stickers in 2004, at about the same time we started developing the regional networks (with the Southwestern one being the first).
About 2006, a change to include the units was made so stations within networks (who happened to use different units) could also be processed by the regional networks.
There's not a 'formal' definition for the stickertags, but here's the current definition that uses WeatherLink variable names which are human readible and pretty much self explanatory. The stickertags are comma-delimited and all the numbers use decimal points (not decimal comma). The date can be either m/d/y, d/m/y or y-m-d, time can be hh:mm hh:mm am/pm.
stationTime, stationDate, outsideTemp, outsideHeatIndex, windChill, outsideHumidity, outsideDewPt, barometer, BarTrend, wind10Avg, windDirection, dailyRain, condition, sunriseTime, sunsetTime, windAvg10, windHigh10, tempUnit|windUnit|barUnit|rainUnit
I've added new-lines to highlight the field names -- normally it is one long string without the new-lines shown above. The 'condition' field is usually null (that is ,, ) for stations that do not use a solar sensor to show sky condition based on solar irradiation.
windDir is one of the 16 compass point abbreviations (in English) (e.g "N", "NNE", "NE", "ENE",
"E", "ESE", "SE", "SSE",
"S", "SSW", "SW", "WSW",
"W", "WNW", "NW", "NNW")
barTrend is one of the English phrases "Steady", "Rising Slowly", "Rising Rapidly", "Falling Slowly", "Falling Rapidly" based on rate of pressure change over 1hr (or 3hr).
I hope this helps.. I look forward to the revised generate stickertags functionality.
Best regards,
Ken
Many thanks @ken for all these details. I will check it carefully before releasing next version.
Thanks.
Pierre
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...
Hey @ken!
Sorry for this late answer. With the website redesign, I've forgotten to alert you: fixes have been made in 3.5.4...
If you like Weather Station, please consider to make a review to help make it known. That would be the best way to thank me...