Author Topic: Wind direction  (Read 824 times)

0 Members and 1 Guest are viewing this topic.

Offline cou2vent

  • Member
  • *
  • Posts: 9
Wind direction
« 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.

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #1 on: June 03, 2020, 04:37:31 PM »
According to the WeeWX customizing guide, the value I am looking for is
$current.windDir.ordinal_compass
How do I get it please?

Offline jkline

  • Member
  • *
  • Posts: 11
    • PaloAltoWeather.com
Re: Wind direction
« Reply #2 on: June 14, 2020, 01:22:45 PM »
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/

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #3 on: June 14, 2020, 03:08:13 PM »
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.

Offline jkline

  • Member
  • *
  • Posts: 11
    • PaloAltoWeather.com
Re: Wind direction
« Reply #4 on: June 14, 2020, 05:01:17 PM »
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

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #5 on: June 15, 2020, 03:12:25 AM »
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

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #6 on: June 24, 2020, 04:29:29 AM »
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.

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #7 on: June 26, 2020, 11:29:12 AM »
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?

Offline Ed243

  • Member
  • *
  • Posts: 1
Re: Wind direction
« Reply #8 on: June 26, 2020, 12:23:07 PM »
I just started with WeeWx yesterday and I was curious about your question.

Offline gjr80

  • Member
  • *
  • Posts: 40
Re: Wind direction
« Reply #9 on: June 26, 2020, 04:52:51 PM »
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

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #10 on: June 27, 2020, 02:16:51 AM »
Possibly yes, but I am not member of google's group and do not intend to join the group.

Offline gjr80

  • Member
  • *
  • Posts: 40
Re: Wind direction
« Reply #11 on: June 27, 2020, 03:05:07 AM »
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

Offline cou2vent

  • Member
  • *
  • Posts: 9
Re: Wind direction
« Reply #12 on: July 14, 2020, 12:20:53 PM »
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!

 

anything