I am in the process of upgrading my WeeWX installation and switching to the
Belchertown skin. Since you posted the steps for adding METARs to the
Seasons skin, I will post them for those using the Belchertown skin and
both will be here for anyone who searches the forum for "metar".
Augment Weewx station data with Metar reports obtained from
aviationweather.gov
Works with WeeWX v4.10.2 & Belchertown skin v1.3.1 on Raspbian Bullseye
(weewx package install)
1. Download a copy of weewx-metar from github
$ wget -c
https://github.com/danimaciasperea/weewx-metar/archive/refs/heads/master.zip
-O weewx-metar.zip
2. Unzip it and:
$ sudo cp metargenerator.py /usr/share/weewx/user
3. Add the following to weewx.conf under [StdReport] [[Belchertown]]
[[[CheetahGenerator]]]
search_list_extensions =
user.belchertown.getData,user.metargenerator.MyMetarSearch
[[[MetarReport]]]
refresh_interval = 5
[[[[KBOI]]]]
[[[[KONO]]]]
[[[[KEUL]]]]
[[[[KMEV]]]]
4. Create a .inc file in /etc/weewx/skin/Belchertown depending on where you
want to display the METARS on the main page
(see
https://github.com/poblabs/weewx-belchertown#add-custom-content-to-the-front-page):
$ sudo nano
/etc/weewx/skins/Belchertown/index_hook_after_forecast.inc
<p style="font-size:24px">METARs</p>
<table>
<tr>
<td style="padding:10px;vertical-align:top">$KONO_metar</td>
<td style="padding:10px;vertical-align:top">$KEUL_metar</td>
</tr>
<tr>
<td style="padding:10px;vertical-align:top">$KBOI_metar</td>
<td style="padding:10px;vertical-align:top">$KMEV_metar</td>
</tr>
</table>
5. If you do not want to display TAFs along with the METARs, then edit
metargenerator.py and change this line:
url =
"https://www.aviationweather.gov/adds/metars?station_ids=%s+&std_trans=translated&chk_metars=on&hoursStr=most+recent+only&chk_tafs=on&submitmet=Get+Weather"
% (airport)
to tafs=off instead of tafs=on
On Tuesday, March 1, 2022 at 4:39:56 PM UTC-7 [email protected] wrote:
> 1 Download copy of weewx-metar from
> https://github.com/danimaciasperea/weewx-metar.
>
> 2 Copy file into /home/weewx/bin/user/
>
> 3 Add the following to the skin.conf:
>
> [CheetahGenerator]
>
> # Possible encodings include
> 'html_entities', 'strict_ascii', 'normalized_ascii',
>
> # as well as those listed in
> https://docs.python.org/3/library/codecs.html#standard-encodings
>
> encoding = html_entities
>
> search_list_extensions =
> user.metargenerator.MyMetarSearch
>
> …..
>
> [MetarReport]
>
> refresh_interval =
> 5 # Obtain every X minutes
>
> # Metar Airports to
> generate
>
> [[KCLE]]
> # Create a new Cheetah tag which will have a _metar suffix: $KCLE_metar
>
> [[KCGF]]
>
>
>
> 4 Create an “inc” file. Example “metar.inc”. Add the following to the
> file
>
> <table>
>
> <tr>
>
> <td class="widget_contents"> $KCLE_metar </td>
>
> <td class="widget_contents"> $KCGF_metar </td>
>
> </tr>
>
> </table>
>
>
>
> 5 In the index.html.tmpl file add the following:
>
> #include "metar.inc"
>
> Place this wherever you would like the data to appear.
>
> 6. Restart Weewx
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/44a1eebb-ab74-40a1-b864-239639452623n%40googlegroups.com.