-
Notifications
You must be signed in to change notification settings - Fork 32
Upgrading to v4.1
With v4.1 a lot of items are not configurable: Navigation items, gauge items, chart items, stats items, news_items, station info items, ...
Note, that when you customized your installation to use a custom item, it now is necessary to specify the item an its order. For instance, you want to add a custom gauge, you need to configure this gauge both in the [LiveGauges] section in "gauge_items" and in the gauges configuration section itself. For instance, you want to show a gauge showing the inside temperature and place it as first gauge on the page, this is how to do it in weewx.conf
:
[StdReport]
...
[[Defaults]]
...
[[[LiveGauges]]]
# This list determines which tables will appear as gauges on every page, as well as in which order.
live_gauge_items = inTemp, outTemp, barometer, windDir, outHumidity, windSpeed, windGust
[[[[inTemp]]
payload_key = inTemp_F
minvalue = 0
maxvalue = 100
splitnumber = 10
lineColor = '#428bca', '#b44242'
lineColorUntil = 32, maxvaluepoint
decimals = 1
For other configurable items this works in the same way, see how it's done in skin.conf
Let's say, you want to exchange the default about page with your own. Create a template files extra.html.tmpl and tell CheetahGenerator to handle it. Then exchange about with extra in the navigation_items. Then configure your new page in the [[extra]] stanza as below.
[[[CheetahGenerator]]]
[[[[HTMLFiles]]]]
[[[[[extra]]]]]
template = extra.html.tmpl
[[[Navigation]]]
navigation_items = index, stats, history, news, extra
[[[[extra]]]]
text = About
href = extra.html
If you just wanted to add an extra page without exchanging an existing page, do the same, but leave the "about" item in the list and specify an unique name for the new page:
[[[CheetahGenerator]]]
[[[[HTMLFiles]]]]
[[[[[extra]]]]]
template = extra.html.tmpl
[[[Navigation]]]
navigation_items = index, stats, history, news, extra, about
[[[[extra]]]]
text = Extra
href = extra.html
v4.1 introduced a new chart type "scatter". In prior versions there were only "line" and "bar" charts available. To be exact, the new versions now lets you define these types on every series. So now it is possible to mix, for instance, bar and line series in one chart. In prior versions a bar chart was implicitly configured by setting "aggregate_interval_minutes". So, if you have defined custom charts in that way, you may need to change this. Doing so in v4.1 will work, but it is deprecated and will be removed in future versions.
Before v4.1 a rain chart to show 30-minute-cumulative readings for rain in a bar chart:
[[rain]]
aggregate_interval_minutes = 30
[[[rain]]]
payload_key = rain_in
showMaxMarkPoint = false
showMinMarkPoint = false
showAvgMarkLine = false
lineColor = '#428bca'
decimals = 1
Now, the same is to be configured this way:
[[rain]]
[[[rain]]]
plotType = bar #new: specify plot type
aggregateType = sum #new: specify type for aggregation
aggregateInterval = 1800 #new: specify aggreagtion inteval in seconds for each series
payload_key = rain_in
showMaxMarkPoint = false
showMinMarkPoint = false
showAvgMarkLine = false
lineColor = '#428bca'
decimals = 2