Ok, I just copied this part from multiple-ables.html.tmpl into forecast.inc:
#set global $forecast_table_settings = dict()
#set global $forecast_table_settings['num_periods'] = 300
#set global $forecast_table_settings['show_legend'] = 1
#set global $forecast_table_settings['show_hourly'] = 1
#set global $forecast_table_settings['show_day'] = 1
#set global $forecast_table_settings['show_date'] = 1
#set global $forecast_table_settings['show_outlook'] = 1
#set global $forecast_table_settings['show_temp'] = 1
## set global $forecast_table_settings['show_dewpoint'] = 1
#set global $forecast_table_settings['show_wind'] = 1
#set global $forecast_table_settings['show_tides'] = 1
#set global $forecast_table_settings['show_sun'] = 1
#set global $forecast_table_settings['show_moon'] = 1
#set global $forecast_table_settings['show_pop'] = 1
#set global $forecast_table_settings['show_precip'] = 1
#set global $forecast_table_settings['show_obvis'] = 1
#set global $forecast_table_settings['source'] = 'WU'
above the existing
#include "forecast_table.inc"

show_dewpoint is commented out. That works!
Then I aligned the table by modifying

<td class='col-sun'><img src='icons/sunriseset.png' class='legend-img' 
alt='S' title='Sun' /><br/><span class='units'>Sunrise <br/>Sunset</span>
</td>

and for the moon accordingly. I did this, because I looked into the 
generated index.html file and realized, that the headers of the table are 
in a separate table than the data, which prevents the two tables for common 
alignment. Thus, I just decided to adjust the column width by adding "some 
text" to the headers. Old style, I know.....

But this enlighted me, concerning the moon phase, so that I could realize, 
that the phase are not shown as png replacements such as the clouds are, 
but as simple percent values of the moon phase. Shame on me.... I could 
find the code also in forecast-table.inc, which told me, that almanac data 
are used. I am assuming, that the data are from pyephem and not extracted 
from the json file. However, the ephemerial data for today differ somewhat. 
The forecast data read for today 25%, celestial data read 28%. Why?
Anyway, almost everything (except of the clouds) is fine now, even, as I do 
not understand much of what I did.
Vetti52 schrieb am Sonntag, 23. August 2020 um 10:24:18 UTC+2:

> To inactivate dewpoint, I thought to delete (or comment out) the line in 
> forecast-table.inc:
> ## Now assign the values that will actually be used
> ..
> #set $show_dewpoint = int($local_settings.get('show_dewpoint', 
> $show_dewpoint))
>
> or is it better to inactivate it in multiple-tables.html.tmpl 
> Example file:
>
> <h1>Forecast Table</h1>
> <p>
> Display forecast data in multiple tables, one table for each forecast 
> source.
> </p>
>
> #set global $forecast_table_settings = dict()
> #set global $forecast_table_settings['num_periods'] = 300
> #set global $forecast_table_settings['show_legend'] = 1
> #set global $forecast_table_settings['show_hourly'] = 1
> #set global $forecast_table_settings['show_day'] = 1
> #set global $forecast_table_settings['show_date'] = 1
> #set global $forecast_table_settings['show_outlook'] = 1
> #set global $forecast_table_settings['show_temp'] = 1
> #set global $forecast_table_settings['show_dewpoint'] = 1
> ..
> <h2>Weather Underground</h2>
> #set global $forecast_table_settings['source'] = 'WU'
> #include "forecast_table.inc"
>
> curiously, as my forecast.inc looks like
>
> <link rel='stylesheet' type='text/css' href='forecast_table.css'/>
>
> <div id='forecast_widget' class="widget">
>   <div class="widget_title">
>     Vorhersage
>     <a class="widget_control"
>       onclick="toggle_widget('forecast')">&diams;</a>
>   </div>
>   <div class="widget_contents">
>
> #include "forecast_table.inc"
>
>   </div>
> </div>
>
> which is evoked as a widget in the skin. There the dew point is not shown, 
> but only, when the same inc file from multiple-tables.html.tmpl is used. 
> And then, there are those misaligned columns containing the empty moon 
> phases. But, maybe, it is a difference, when the file is invoked from a 
> html.tmpl or as inc file? Sorry, but my view into the Weewx and python 
> philosophy is not very deep. But, moon phases should anyway be shown 
> according to the moonPhaseCode data, which are present in the json file, 
> which is not the case.
>
> So, at least, one "problem" is solved: When retrieving the json file from 
> WU with "language=en-US", I get (the long and short versions do not differ 
> much):
>
> wxPhraseShort 
> 0 "PM Showers"
> 1 "Shwrs Late"
> 2 "Rain"
> 3 "P Cloudy"
> 4 "PM Showers"
> 5 "Showers"
> 6 "Rain/Wind"
> 7 "Shwrs Early"
> 8 "P Cloudy"
> 9 "Shwrs Late"
> 10 "T-Showers"
> 11 "Showers"
>
> when language is set to "de-DE", I get
>
> wxPhraseLong 
> 0 "Nachm. Schauer"
> 1 "Später Schauer"
> 2 "Regen"
> 3 "Wolkig"
> 4 "Nachm. Schauer"
> 5 "Schauer"
> 6 "Regen/Wind"
> 7 "Zunächst Schauer"
> 8 "Wolkig"
> 9 "Später Schauer"
> 10 "Gewitterschauer"
> 11 "Schauer"
> wxPhraseShort 
> 0 ""
> 1 ""
> 2 ""
> 3 ""
> 4 ""
> 5 ""
> 6 ""
> 7 ""
> 8 ""
> 9 ""
> 10 ""
> 11 ""
>
> So, there is an issue with WU. The solution would be either to use the 
> wxPhraseLong or to urge the request to use US values. 
> Maybe there is already a way to set the language somewhere, but I did not 
> find it yet. Moreover, I know, that I've read about the interval for 
> retrieving forecasts at times, e.g. whenever the Weewx site is updated or 
> at defined times, but do not find it again. Same might be with the language 
> settings. In case, the request should be retrieved in en-US, will the data 
> be shown in Weewx still in German? At least temperature and windSpeed seem 
> to be converted into metric values.
>
>
> Am Samstag, 22. August 2020 18:27:17 UTC+2 schrieb John Kline:
>
>> Yes, I concluded that WU does not provide a dew point nor wind gust when 
>> I wired it up.
>>
>> I would remove the columns in your copy of these files (since you have 
>> copied them to another skin).  I have modified various files when I copied 
>> them to another skin at https://www.paloaltoweather.com/ (see the 
>> Graphic and Detailed tabs under forecast).  It seems a reasonable thing to 
>> do.  I believe Matthew Wall, the author of this extension, meant the skin 
>> to be examples that one can copy to another skin and modify.  I’m not 
>> inclined to spend a lot of time playing with formatting.  My fork is, 
>> presumably, temporary until Matthew gets around to this extension again.
>>
>> I can’t think of a reason that you would need to delete the 
>> $show_dewpoint setting—if that is what you meant by delete the global 
>> setting.  Simply don’t use it.
>>
>> I think your understanding of the json file is fairly on target.  The 
>> stuff under daypart will have 11 or 12 entries depending on the time of day 
>> that you look (after “apparent” 3PM, at your location, you’ll only have 11 
>> as the first will be None).  These entries are for 7am-7pm and 7pm-7am. 
>>  Thus, you’ll have either 5 1/2 or 6 days of 12-hour forecasts.
>>
>> The entries outside of daypart apply to 24 hours (rather than 12 hours).
>>
>> The B1.png icon you refer to comes from the following code in forecast.py 
>> and corresponds to wxPhraseShort in the json:
>>
>> WU_SKY_DICT = {
>>         'Sunny': 'CL',
>>          'M Sunny': 'FW',
>>          'P Sunny': 'SC',
>>         'P Cloudy': 'B1',
>>          'M Cloudy': 'B2',
>>          'Cloudy': 'OV'}
>>
>> You might notice if you go searching that much of what is in this file is 
>> not defined anywhere.  If you do find something definitive, please let me 
>> know.  You can start here:
>>
>>
>> https://docs.google.com/document/d/1_Zte7-SdOjnzBttb1-Y9e0Wgl0_3tah9dSwXUyEA3-c/edit
>>
>> I am very interested in if I’m missing any conversions (for example, if 
>> you see anything in wxPhraseShort in the json file that isn’t listed in 
>> WU_SKY_DICT above).  Since I can’t find documentation, I can’t for a 
>> complete list and reports from you and other can help me find anything that 
>> may be missing.
>>
>> You also allude to the fact that there is much in the json file that is 
>> ignored.  That is true.  The way this extension is written, there is a 
>> single schema for all forecast types.  If I could not find a place in the 
>> schema, I ignored it (as is the same for every other forecast 
>> implementation in this extension).
>>
>> On Aug 22, 2020, at 8:42 AM, Vetti52 <drv...@gmail.com> wrote:
>>
>> 
>> Well, I took forecast-table.inc for my Weewx site now. There is no dew 
>> point column, although it is set to #set $forecast_source = 'WU', and  
>> the inc file includes #set $show_dewpoint = 
>> int($local_settings.get('show_dewpoint', $show_dewpoint))
>> The dew point column shows only in the multiple-tables.inc in the WU 
>> section. I have not activated any other forecaster. So, should I delete the 
>> global setting for dew point in multiple-tables.html.tmpl, rather than 
>> removing it inforecast_table.inc?
>> Same with windGust, which also does not exist in the WU json file. In 
>> contrast, multible tables contains a column for moon phase, but it does not 
>> show anything. The two columns to the right are therefore shifted next to 
>> moonrise. The header columns are not adjusted correctly, so that the sun 
>> icon is slightly left to the sunrise/set column, the moon icon merely above 
>> these data, the moon phase icon  slightly left from the moonrise/set data 
>> and the moon phase icon POP icon on the right border of these data. So, it 
>> is somewhat confusing to coordinate the table. 
>>
>> The URL returns a 5day.json file, which does not show an entry for 
>> dewpoint nor windGust, as far as I can configure. Indeed, there are plenty 
>> of entries. I could detect 11 entries each in the section daypart:0: 
>> temperature:, temperatureHeatIndex: , and temperatureWindChill. There 
>> are two sections for moon phase: moonPhase and moonPhaseCode, which 
>> contain 5 entries each.
>>
>> Today forecast-table shows at two places the B1.png icon, depicted as 
>> "Mostly cloudy". The entries are for today and next thursday. I can not 
>> find the corresponding data in the json file. The most promising entry 
>> would be in 
>>
>> *narrative:*
>>
>>
>> 0 : "Showers possible early. Lows overnight in the mid 50s."
>> 1 : "Cloudy with showers and thunderstorms. Highs in the upper 60s and 
>> lows in the mid 50s."
>> 2 : "Showers possible. Highs in the mid 60s and lows in the low 50s."
>> 3 : "Showers possible in the afternoon. Highs in the low 70s and lows in 
>> the upper 50s."
>> 4 : "Light rain and windy. Highs in the upper 60s and lows in the mid 
>> 50s."
>> 5 : "Partly cloudy. Highs in the upper 60s and lows in the low 50s."
>>
>> Mostly cloudy, however, does not occure anywhere in the json file.
>>
>> Am Freitag, 21. August 2020 16:45:38 UTC+2 schrieb John Kline:
>>
>>> As your incorporating this into your Seasons skin, it makes sense to 
>>> remove (from the .inc files) the data that is not provided by WU (e.g., dew 
>>> point).
>>>
>>> You should have a look at what’s coming back from WU by using the 
>>> following URL (assuming you are using the default–station’s lat/long–for 
>>> the forecast).  Do substitute your api key for the XXX.
>>>
>>>
>>> https://api.weather.com/v3/wx/forecast/daily/5day?geocode=37.431495,-122.110937&format=json&units=e&language=en-US&apiKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
>>>  
>>> <https://api.weather.com/v3/wx/forecast/daily/5day?geocode=37.431495,-122.110937&format=json&units=e&language=en-US&apiKey=d8e258b8a134405ba258b8a134805b1e>
>>>
>>> Let me know if you think something in the WU forecast returned from the 
>>> above URL is amiss in the forecast extension.  Note: there is plenty in 
>>> what WU sends that has no place in the forecast extension schema.
>>>
>>>
>>> -- 
>> 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 weewx...@googlegroups.com.
>>
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/31491044-d207-4219-9018-4c92f0d40795o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/31491044-d207-4219-9018-4c92f0d40795o%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f8285083-51b2-44db-9e4f-20fef3d01aafn%40googlegroups.com.

Reply via email to