--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
How do you get the first screenshot to happen ?(the 'simple display of one week forecast')
On Friday, December 9, 2016 at 11:59:36 AM UTC-5, vince wrote:How do you get the first screenshot to happen ?(the 'simple display of one week forecast')
the screenshots on the wiki are png images, but the forecast extension emits html.
include the file forecast_iconic.inc in one of your weewx template files. for example:
#include "forecast_iconic.inc"
will do a 7 day forecast using WU data.
#set global $forecast_iconic_settings = dict()
#set global $forecast_iconic_settings['source'] = 'UKMO'
#set global $forecast_iconic_settings['num_days'] = 10
#include "forecast_iconic.inc"
Dec 9 12:31:19 debian weewx[11249]: reportengine: copied 0 files to /home/weewx/public_html/forecastDec 9 12:31:20 debian weewx[11249]: **** Traceback (most recent call last):Dec 9 12:31:20 debian weewx[11249]: **** File "/home/weewx/bin/weewx/cheetahgenerator.py", line 315, in generateDec 9 12:31:20 debian weewx[11249]: **** print >> _file, textDec 9 12:31:20 debian weewx[11249]: **** File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1005, in __str__Dec 9 12:31:21 debian weewx[11249]: **** rc = getattr(self, mainMethName)()Dec 9 12:31:21 debian weewx[11249]: **** File "_home_weewx_skins_Standard_index_html_tmpl.py", line 251, in respondDec 9 12:31:21 debian weewx[11249]: **** File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1597, in _handleCheetahIncludeDec 9 12:31:21 debian weewx[11249]: **** nestedTemplateClass = compiler.compile(source=source, file=file)Dec 9 12:31:21 debian weewx[11249]: **** File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 706, in compileDec 9 12:31:21 debian weewx[11249]: **** fileHash += str(os.path.getmtime(file))Dec 9 12:31:21 debian weewx[11249]: **** File "/usr/lib/python2.7/genericpath.py", line 54, in getmtimeDec 9 12:31:21 debian weewx[11249]: **** return os.stat(filename).st_mtimeDec 9 12:31:21 debian weewx[11249]: **** OSError: [Errno 2] No such file or directory: '/home/weewx/skins/forecast/hilo.inc'
With a vanilla installation of forecast, I'm seeing a missing hilo.inc file in my logs (none is in the .tgz ball):
I marked up one of the files you attached to show where the problem is.In this case it shows snow of 25.4mm, which is not a sensible number to display since the forecast cannot possibly be that accurate.But knowing that there is 25.4mm in an inch leads me to believe that the forecast data is for 1 inch of snow, just getting displayed in mm.
Gary
I think the issue is simply one of forecasting precisely 25.4mm of rain seems wrong since forecasts are never issued to tenths of mm. Not sure there is much you can do about it, it's a fact of converting inches to mm, you could change the precision of what is displayed, might look ok. 2 inches would display as 51mm which may or may not be just as a nappealing. Otherwise find a forecast source that is in your preferred units I guess.
Gary
Just did a new 3.6.2 install along with the new forecast extension to mess around with and get the following errors. I haven't done anything other than install and put the correct NWS info in.
--
I have NWS data.
--
--
I made the change you suggested and I still got the errors so I added WU key and am still getting errors.
--
more fun! 3.2.3 includes an 'orientation' option for the iconic view. horizontal for time increasing across the page, vertical for time increasing down the page.
$period.qsf.nolabel('%.2f',' ')$period.qsf.cm.nolabel('%.2f',' ')It was absolutely a matter of formatting. With the right formatting I can round to whole numbers of rain or snow.I would prefer to display rain in mm and snow in cm, but there is only one group unit for precipitation.
weewx.conf:
# Options for extension 'forecast'
[Forecast]
data_binding = forecast_binding
[[OWM]]
api_key = INSERT_OWM_API_KEY_HERE
[[WWO]]
api_key = INSERT_WWO_API_KEY_HERE
[[WU]]
api_key = 9ed8cb535d935e48
[StdReport]
[[forecast]]
[[[Extras]]]
[[[[forecast_iconic_settings]]]]
source = WU
num_days = 7
HTML_ROOT = public_html/forecast
skin = forecast
in my html page:
<div class="right" >
<div class="card" >
<h1><i class="fa fa-umbrella m-blau" ></i> Coming soon...</h1>
#set global $forecast_iconic_settings = dict()
#set global $forecast_iconic_settings['source'] = 'WU'
#set global $forecast_iconic_settings['num_days'] = 7
#include "forecast_iconic.inc"
</div>
I'm sorry for my english......thanks.