WXforum.net
Weather Software => WeeWX Software => Topic started by: cou2vent on May 28, 2020, 09:25:06 AM
-
For a customized weather internet page I need the wind direction generated from WeeWX.
How do I get directly the wind direction please?.
In the index.html report "Current Conditions" I see
<tr>
<td class="label">Vent</td>
<td class="data">0 km/h N/A ( N/A)</td>
</tr>
Where does it come from please?
What do I invoque to get the wind direction on its own?
And I just want the rose ordinals like SE, ENE, etc.
-
According to the WeeWX customizing guide, the value I am looking for is
$current.windDir.ordinal_compass
How do I get it please?
-
You get wind direction by putting exactly what you have written into the template:
$current.windDir.ordinal_compass
For example, I have the following in https://www.paloaltoweather.com/weatherboard/
<td id="windSpeedAndBearing" style="font-family:monospace;font-size:105px;text-align:center;">$current.windSpeed $current.windDir.ordinal_compass</td>
Of course, if there is no wind (the example you show), then there is no wind direction. Your example is being generated by this in skins/Seasons/index.html
<tr>
<td class="label">$obs.label.wind</td>
<td class="data">$current.windSpeed $current.windDir.ordinal_compass ($current.windDir)</td>
</tr>
In this example, your getting both the compass direction and numeric value; but, since wind is 0, direction is meaningless.
If you are always showing 0 for wind (and presumably there is actually wind), that is a different story; but unrelated to showing wind direction.
Cheers,
John Kline
https://www.paloaltoweather.com/
-
Thank you very much John.
I kind of suspected what you say, but now I am sure!
And my html page is ready with $current.windSpeed , etc... where I need them.
WeeWX is rather clever to understand what is required so simply!
My problem now is how do I call my customized html page because I want to keep the existing index.html? In fact I want 2 WeeWX reports generated from the same data.
These 2 reports will be 2 distinct pages and visitors will toggle from one to the other.
http://www.sevestre.net/Rasp/index.html
and http://www.sevestre.net/Plug/indexSevestreFontanes.html (broken at the moment)
One last question. I changed moon phases (in French) in weewx.conf to no avail. Do you know how to overcome this? I did not find any other file with moon phases and therefore could not try to translate. I am talking about "Last quater" that appear under SUN & MOON in your slick Palo Alto page https://www.paloaltoweather.com/
By the way congratulations about this page.
-
Hi,
You can add more templates (templates generate pages) to either skin.conf (where they will be overwritten on an update) or to weewx.conf.
To add to weewx.conf:
[[SeasonsReport]]
[[[CheetahGenerator]]]
[[[[ToDate]]]]
[[[[[newpage]]]]]
template = newpage.html.tmpl
As for translation, although I *think* I can answer that, it’s best if you asked someone who has done this sort of thing in WeeWX. It’s best if you asked on http://groups.google.com/group/weewx-user
-
John,
How to execute the scheme you are proposing in weewx.conf only to overcome the overwritting problem at update?
It looks like it is only possible in Seasons skin.conf.
[CheetahGenerator]
[[ToDate]]
[[[newpage]]]
template = newpage.html.tmpl
Along with a reference in weewx.conf but which one? It already says
[[SeasonsReport]]
# The SeasonsReport uses the 'Seasons' skin, which contains the
# images, templates and plots for the report.
skin = Seasons
enable = true
And will weewx generate the newpage.html and put it all right in /var/www/html/weewx/ to be FTPed to the internet server?
As far as translation is concerned, I am not member of Google's group and do not intend to be.
I'll keep searching for the moon phases translation. It's only a detail anyway.
Jean-Paul
-
With no problem WeeWX generates the classic Seasons, Smartphone and Mobile pages.
http://www.sevestre.net/Rasp/index.html
I tried to produce an additional web page without success, .
WeeWX does not generate the corresponding index.html file in /var/www/html/weewx/meteofontanes.
In weewx.conf there is
[ MeteoFontanesReport ]
skin = MeteoFontanes
enable = true
HTML_ROOT = /var/www/html/weewx/meteofontanes
and in MeteoFontanes skin.conf there is
[CheetahGenerator]
encoding = html_entities
[[ToDate]]
[ MeteofFontanes ]
template = index.html.tmpl
File permissions look OK.
Any idea what I am doing wrong to produce this additional reportplease?
Error 404.
-
Curious, though, that so many people read this page and that there is only one person trying to help. Should I rephrase my question?
Why doesn't WeeWX generate the requested report when it generates 3 other reports: Seasons, Smartphone and Mobile?
There must be a specificity in the requested report that WeeWX doesn't like, but what is it? Do you have an idea?
-
I just started with WeeWx yesterday and I was curious about your question.
-
Curious, though, that so many people read this page and that there is only one person trying to help. Should I rephrase my question?
Possibly because the official WeeWX user support forum is at http://groups.google.com/group/weewx-user
Gary
-
Possibly yes, but I am not member of google's group and do not intend to join the group.
-
Possibly yes, but I am not member of google's group and do not intend to join the group.
Oh, well good luck then.
Gary
-
If the same misadventure happens to you, change [Celestial] to [Almanac] in weewx.conf and everything will return to normal.
Moon phases in your language will appear!