Hello Tom,
I have implemented the tag $seven_day.
The report is working fine for the past seven days now, although one thing 
I spotted for the pressure low for the past seven days occurred at 0345 
last Friday morning, not at 0345 today Friday, but it is clear on the 
plotted data on the graph what's happening.
So will leave it be for now.
First time I have implemented a change to my Weewx system in a while.
This is my station page hosted on a Raspberry Pi3 at home.
https://g0elm.dynalias.com/weewx/index.html

I am a professional electronic engineer/firmware developer  using 'C' so 
need all the help I can get with Python, it has another level of 
complexity, plus I never got on with C++!
Thanks again for your help.
Regards
Phil

On Friday, September 4, 2020 at 3:21:07 PM UTC+1 tke...@gmail.com wrote:

> Yes, that would be the error I outlined earlier. Type 'wind' appears only 
> in the daily summaries. Seven days prior to a moment does not necessarily 
> start at the beginning of a day, so the daily summaries are not always 
> available.
>
> But, it makes me think: perhaps tag $span should have an argument that 
> forces the start time to be the beginning of the day...? Something like
>
> $span($day_delta=7, $bod=True)
>
>
> If 'bod' (aka, 'beginning of day') is True, then the start time is rounded 
> to the start of the day.
>
> Or, am I being too clever?
>
> -tk
>
> On Fri, Sep 4, 2020 at 5:50 AM Phil Green <phil....@gmail.com> wrote:
>
>> Hello Tom,
>> I will try $seven_day rather than $week.
>> When I tried $span($day_delta=7) instead of $week I got the errors.
>> I have looked back in my log at the error messages and they are shown 
>> below, I have since gone back to using $week
>>
>> Sep  4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.manager: Added record 
>> 2020-09-04 11:35:00 BST (1599215700) to database 'weewx.sdb'
>> Sep  4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.manager: Added record 
>> 2020-09-04 11:35:00 BST (1599215700) to daily summary in 'weewx.sdb'
>> Sep  4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.restx: PWSWeather: 
>> Published record 2020-09-04 11:35:00 BST (1599215700)
>> Sep  4 11:35:15 Pi3-Weewx weewx[5658] INFO weewx.restx: Wunderground-PWS: 
>> Published record 2020-09-04 11:35:00 BST (1599215700)
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: 
>> Generate failed with exception '<class 'NameMapper.NotFound'>'
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>> Ignoring template /home/weewx/skins/Seasons/index.html.tmpl
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>> Reason: cannot find 'maxtime' while searching for 'wind.maxtime'
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>  Traceback (most recent call last):
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>    File "/home/weewx/bin/weewx/cheetahgenerator.py", line 322, in generate
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>      unicode_string = compiled_template.respond()
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>    File "_home_weewx_skins_Seasons_index_html_tmpl.py", line 309, in respond
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>    File "/usr/lib/python3/dist-packages/Cheetah/Template.py", line 1707, in 
>> _handleCheetahInclude
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>      self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>    File 
>> "cheetah__home_weewx_skins_Seasons_hilo_inc_1599215717_0843155_15331.py", 
>> line 372, in respond
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] ERROR weewx.cheetahgenerator: **** 
>>  NameMapper.NotFound: cannot find 'maxtime' while searching for 
>> 'wind.maxtime'
>> Sep  4 11:35:17 Pi3-Weewx weewx[5658] INFO weewx.cheetahgenerator: 
>> Generated 8 files for report SeasonsReport in 2.57 seconds
>> Sep  4 11:35:19 Pi3-Weewx weewx[5658] INFO weewx.imagegenerator: 
>> Generated 14 images for report SeasonsReport in 1.14 seconds
>>
>> In hilo.ic
>> The section showing when the max wind occurred, I copied the variable 
>> from the tooltip for that section as tooltips don't work on my iPad in 
>> Safari?
>>
>>       <tr>
>>         <td class="label">Wind Max</td>
>>         #for $archive in $archive_data
>>         <td class="data new_row hilo_$archive[0]">
>>           <span title="$archive[1].wind.maxtime">
>>             $archive[1].wind.max.format(add_label=False) 
>> ($archive[1].wind.maxtime)</span><br/>
>>           $archive[1].wind.gustdir.format(add_label=False)
>>         </td>
>>         #end for
>>         <td class="units">
>>           $unit.label.wind<br/>
>>           $unit.label.windDir
>>         </td>
>>       </tr>
>>
>>
>> Will let you know how I get on using $seven_day
>>
>> Regards
>> Phil
>>
>> On Friday, September 4, 2020 at 1:05:48 PM UTC+1 tke...@gmail.com wrote:
>>
>>> You didn't post what the "syntax errors" are, so it's hard to evaluate 
>>> what went wrong. I suspect the problem is a technical one: precisely seven 
>>> days earlier from the time may or may not lie on the start of a day. If it 
>>> does not lie on the start of a day, then the daily summaries cannot be used 
>>> to calculate 'wind' statistics. But, without seeing the "syntax error", I'm 
>>> just guessing.
>>>
>>> Why not just use the search list extension example that comes with 
>>> WeeWX? It creates a tag $seven_day, which does what you want.
>>>
>>> See the section *Extending the list 
>>> <http://www.weewx.com/docs/customizing.htm#extending_the_list>* in the 
>>> Customization Guide.
>>>
>>> -tk
>>>
>>> On Fri, Sep 4, 2020 at 4:00 AM Phil Green <phil....@gmail.com> wrote:
>>>
>>>> Thanks for the info.
>>>> Where would I change the 
>>>> $week to $span($day_delta=7)
>>>>
>>>> In the actual report file, in my case hilo.inc or in some definition 
>>>> elsewhere to set the aggravation period?
>>>> I have tried it in hilo.inc 
>>>> changing:-
>>>> #set $archive_data = [('day', $day), ('week', $week), ('month', 
>>>> $month), ('year', $year), ('rainyear', $rainyear)]
>>>> to:
>>>> #set $archive_data = [('day', $day), ('week', $span($day_delta=7)), 
>>>> ('month', $month), ('year', $year), ('rainyear', $rainyear)]
>>>> but it causes syntax errors.
>>>> So where would I change the definition of $week to a rolling 7 day 
>>>> period?
>>>> Regards
>>>> Phil
>>>>
>>>> On Tuesday, September 1, 2020 at 12:36:02 PM UTC+1 graha...@gmail.com 
>>>> wrote:
>>>>
>>>>> → see $span($day_delta=7) for rolling 7 days (vs $week for since start 
>>>>> of week)
>>>>>
>>>>> On 1 Sep 2020, at 7:27 am, Tom Keffer <tke...@gmail.com> wrote:
>>>>>
>>>>> NB: The weekly statistics start *Sunday*. It is not the same as "last 
>>>>> 7 days."
>>>>>
>>>>>
>>>>> -- 
>>>> 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+...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/97602bc2-65a0-4e3b-a9d2-782f77d605fen%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/97602bc2-65a0-4e3b-a9d2-782f77d605fen%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+...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/2f6d655f-ed0c-4133-ac8a-fc4437be08a7n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/2f6d655f-ed0c-4133-ac8a-fc4437be08a7n%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/02516a43-3a0e-4291-87c6-7bb898877c16n%40googlegroups.com.

Reply via email to