History begins yesterday?!?

88 views
Skip to first unread message

mrzimgjugl asdf

unread,
Oct 2, 2019, 12:21:48 PM10/2/19
to weewx-user
Graphs are fine. They show 7 or 30 day history correctly.

But, below the graphs, it seems like max or total lines of text look only into this month! And today is second day of the month. They do not take into account 7 days or 30 days or whatever is in the graph above them.

How to fix that? I am seeing this in Smartphone skin.

Pila

unread,
Oct 4, 2019, 7:49:09 AM10/4/19
to weewx...@googlegroups.com
Does the same wrong thing for a day, too. Graph shows rain in last 24 (27) hours but all totals ignore anything before the midnight.

How can I correct this behaviour?
--
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj sažetosti.

Thomas Keffer

unread,
Oct 4, 2019, 8:42:38 AM10/4/19
to weewx-user
This is the correct behavior. As the title says, the aggregate values are the aggregate for today, that is, since midnight, not for 24 hours.

If you want 24 hours, you will have to use a search list extension. There is an example of how to write one in the section Extending the list in the Customizing Guide.

Same for other time periods (month, year, etc.)

-tk

--
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/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com.

Pila

unread,
Oct 5, 2019, 4:11:26 AM10/5/19
to weewx...@googlegroups.com
Terrible choice in a great program. Sort of like writing close over the switch that opens.

Say there is a thunderstorm. As soon as midnight strikes, stat says it is a drizzle out or even no rain at all! While the graph above it shows flood! Same for week and month. I want stats for the entire period, not a Cinderella version.

I will look into your link how to rectify the problem.

Pila

unread,
Oct 5, 2019, 4:19:06 AM10/5/19
to weewx...@googlegroups.com
Actually, I can not believe we are the only ones wanting aggregate data for a month to show 30 days instead of just one day or aggregate for 27 hours to show data for 27 hours instead of nothing at 4 minutes after midnight.

Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer <tke...@gmail.com> wrote:

Andrew Milner

unread,
Oct 5, 2019, 4:54:34 AM10/5/19
to weewx-user
if people wanted 24 hours or 30 days they will have written a search list extension to provide the information

most people are probably like me - and work in days (which start at midnight), months (which start on the first of themonth) and years (which start on 1st January)


On Saturday, 5 October 2019 11:19:06 UTC+3, Pila wrote:
Actually, I can not believe we are the only ones wanting aggregate data for a month to show 30 days instead of just one day or aggregate for 27 hours to show data for 27 hours instead of nothing at 4 minutes after midnight.

Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer <tke...@gmail.com> wrote:
This is the correct behavior. As the title says, the aggregate values are the aggregate for today, that is, since midnight, not for 24 hours.

If you want 24 hours, you will have to use a search list extension. There is an example of how to write one in the section Extending the list in the Customizing Guide.

Same for other time periods (month, year, etc.)

-tk

On Fri, Oct 4, 2019 at 4:49 AM Pila <mrzim...@gmail.com> wrote:
Does the same wrong thing for a day, too. Graph shows rain in last 24 (27) hours but all totals ignore anything before the midnight.

How can I correct this behaviour?

Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf <mrzim...@gmail.com> wrote:
Graphs are fine. They show 7 or 30 day history correctly.

But, below the graphs, it seems like max or total lines of text look only into this month! And today is second day of the month. They do not take into account 7 days or 30 days or whatever is in the graph above them.

How to fix that? I am seeing this in Smartphone skin.


--
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj sažetosti.

--
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.

John Smith

unread,
Oct 5, 2019, 6:02:52 AM10/5/19
to weewx-user


On Saturday, 5 October 2019 18:54:34 UTC+10, Andrew Milner wrote:
if people wanted 24 hours or 30 days they will have written a search list extension to provide the information

most people are probably like me - and work in days (which start at midnight), months (which start on the first of themonth) and years (which start on 1st January)

I too was after this and I submitted a PR but I'm yet to be told of a simple way to do it without patching manually patching things.

Pila

unread,
Oct 5, 2019, 6:13:16 AM10/5/19
to weewx...@googlegroups.com
I understand this is done simple way: enter current month as a filter to database. But, it is wrong. Current easy is correct only if an user and history for a particular month.

Completely different issue is: show last 30 days. Both must be available. Same for week and last 7 days, same for a day and last 27 hours. And year or last 365 days.

Particular since above such totals now we have graphs showing correct spans corresponding to the titles.

I am reading how to fix it. Why we can not simply use the same spans for graphs and aggregate totals?

John Smith

unread,
Oct 5, 2019, 6:19:49 AM10/5/19
to weewx-user


On Saturday, 5 October 2019 20:13:16 UTC+10, Pila wrote:
I understand this is done simple way: enter current month as a filter to database. But, it is wrong. Current easy is correct only if an user and history for a particular month.

Completely different issue is: show last 30 days. Both must be available. Same for week and last 7 days, same for a day and last 27 hours. And year or last 365 days.

That would be easier than what I wanted, you only need to do it from now - 86400 * 30 

Pila

unread,
Oct 5, 2019, 6:37:27 AM10/5/19
to weewx...@googlegroups.com


Na 5. listopada 2019. 10:54:34 CEST, Andrew Milner <andrew.s...@gmail.com> wrote:
>if people wanted 24 hours or 30 days they will have written a search
>list
>extension to provide the information

I am begging if someone did it to mail it to me as I will need days do do it.


>most people are probably like me - and work in days (which start at
>midnight), months (which start on the first of themonth) and years
>(which
>start on 1st January)

Not when the title says Rain in last 30 days. Not when the title in the graph says the same. Not when the graph shows the last 30 days of rain. How can it now be good to show aggregate claiming no rain at all? Just because it is after the midnight of the next month!


>
>On Saturday, 5 October 2019 11:19:06 UTC+3, Pila wrote:
>>
>> Actually, I can not believe we are the only ones wanting aggregate
>data
>> for a month to show 30 days instead of just one day or aggregate for
>27
>> hours to show data for 27 hours instead of nothing at 4 minutes after
>
>> midnight.
>>
>> Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer <tke...@gmail.com
>> <javascript:>> wrote:
>>>
>>> This is the correct behavior. As the title says, the aggregate
>values are
>>> the aggregate *for today*, that is, *since midnight,* not for 24
>hours.
>>>
>>> If you want 24 hours, you will have to use a search list extension.
>There
>>> is an example of how to write one in the section *Extending the list
>
>>> <http://www.weewx.com/docs/customizing.htm#extending_the_list>* in
>the
>>> Customizing Guide.
>>>
>>> Same for other time periods (month, year, etc.)
>>>
>>> -tk
>>>
>>> On Fri, Oct 4, 2019 at 4:49 AM Pila <mrzim...@gmail.com
><javascript:>>
>>> wrote:
>>>
>>>> Does the same wrong thing for a day, too. Graph shows rain in last
>24
>>>> (27) hours but all totals ignore anything before the midnight.
>>>>
>>>> How can I correct this behaviour?
>>>>
>>>> Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf
><mrzim...@gmail.com
>>>> <javascript:>> wrote:
>>>>>
>>>>> Graphs are fine. They show 7 or 30 day history correctly.
>>>>>
>>>>> But, below the graphs, it seems like max or total lines of text
>look
>>>>> only into this month! And today is second day of the month. They
>do not
>>>>> take into account 7 days or 30 days or whatever is in the graph
>above them.
>>>>>
>>>>> How to fix that? I am seeing this in Smartphone skin.
>>>>>
>>>>>
>>>> --
>>>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj
>>>> sažetosti.
>>>>
>>>> --
>>>> 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 <javascript:>.
><https://groups.google.com/d/msgid/weewx-user/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com?utm_medium=email&utm_source=footer>
>>>> .

Thomas Keffer

unread,
Oct 5, 2019, 7:37:44 AM10/5/19
to weewx-user
On Sat, Oct 5, 2019 at 1:11 AM Pila <mrzim...@gmail.com> wrote:
Terrible choice in a great program. Sort of like writing close over the switch that opens.

Sorry you feel that way.

Allowing it to be done either way is something I could spend my time on, but I'm not --- there are other, higher, priorities. 

A central feature of WeeWX is its extensibility, allowing anyone to customize it to just the way they want. In this case, not only is your way possible, there are examples of how to do it.

Andrew Milner

unread,
Oct 5, 2019, 9:12:59 AM10/5/19
to weewx-user
Thinking about this a little bit more - can't you just change the template to use, for example
rainfall for last 27 hours is $span(hour_delta = 27).rain.sum
or
rainfall for last 30 days is $span(day_delta=30).rain.sum
or
max temp in last 24 hours is $span(hour_delta=24).outTemp.max

and so on

in this way you are specifying the span of the total or over which the max is calculated, and should satisfy your needs I suspect.

Pila

unread,
Oct 5, 2019, 11:42:30 AM10/5/19
to weewx...@googlegroups.com
I am using it for about a month. So for now I did only small adjustments. Plus, I do not know cheetah or phyton nor what can be done. I will try to fit in your proposal.

I just expected it to do what it says on the tin: show the 30 day summary. I lost time searching what I broke to cause it to show 1 day summary under titles and graphs showing 30 days.

I am funny that way. If it says 30 days, I expect 30 days. Not 1 day, 2 tomorrow, 3 on the next day...

Pila

unread,
Oct 5, 2019, 12:30:49 PM10/5/19
to weewx...@googlegroups.com



>Thinking about this a little bit more - can't you just change the
>template
>to use, for example
>rainfall for last 27 hours is $span(hour_delta = 27).rain.sum
>or
>rainfall for last 30 days is $span(day_delta=30).rain.sum
>or
>max temp in last 24 hours is $span(hour_delta=24).outTemp.max

Almost works! Many thanks for your help. But.... I tried dew point for 30 days and changed its template:

min 30 days: $span(day_delta=30).dewpoint.min u $span(day_delta=30).dewpoint.mintime<br/>
max 30 days: $span(day_delta=30).dewpoint.max u $span(day_delta=30).dewpoint.maxtime<br/>

min: $month.dewpoint.min u $month.dewpoint.mintime<br/>
max: $month.dewpoint.max u $month.dewpoint.maxtime

That extracts data from correct data span. But fails to print the corresponding date. Here is new output above the old wrong one. I can not say if the time is correct but the date is missing.

min 30 days: -6,2°C u 10:30:00
max 30 days: 24,0°C u 08:40:00

min: 3,5°C u 04.10.2019 12:46:09
max: 20,0°C u 02.10.2019 15:14:57

Plus, I must find a date format without leading zero in day and hour.


>
>and so on
>
>in this way you are specifying the span of the total or over which the
>max
>is calculated, and should satisfy your needs I suspect.
>
>
>
>On Saturday, 5 October 2019 14:37:44 UTC+3, Thomas Keffer wrote:
>>
>> On Sat, Oct 5, 2019 at 1:11 AM Pila <mrzim...@gmail.com
><javascript:>>
>> wrote:
>>
>>> Terrible choice in a great program. Sort of like writing close over
>the
>>> switch that opens.
>>>
>>
>> Sorry you feel that way.
>>
>> Allowing it to be done either way is something I could spend my time
>on,
>> but I'm not --- there are other, higher, priorities.
>>
>> A central feature of WeeWX is its *extensibility*, allowing anyone to
>
>> customize it to just the way they want. In this case, not only is
>your way
>> possible, there are examples of how to do it.
>>

Thomas Keffer

unread,
Oct 5, 2019, 8:23:59 PM10/5/19
to weewx-user
I am funny that way. If it says 30 days, I expect 30 days. Not 1 day, 2 tomorrow, 3 on the next day...

Where are you seeing this? The table heading in the Standard skin is clearly marked "This Month," the Seasons skin marked "Month."

-tk

Liz

unread,
Oct 6, 2019, 1:52:51 AM10/6/19
to weewx...@googlegroups.com
On Sat, 05 Oct 2019 12:37:21 +0200
Pila <mrzim...@gmail.com> wrote:

> Not when the title says Rain in last 30 days. Not when the title in
> the graph says the same. Not when the graph shows the last 30 days of
> rain. How can it now be good to show aggregate claiming no rain at
> all? Just because it is after the midnight of the next month!

Are you using a Croatian translation, because my English display does
not say "last 30 days"?

If so, your frustration comes from a difference in meaning when
translated.
Your title says what you want
but the author's title says what he wrote, and it seems that they are
not the same.

Do you know how to go to github and get John Smith's code which
provides something closer to what you want?


Liz

Pila

unread,
Oct 6, 2019, 4:15:21 AM10/6/19
to weewx...@googlegroups.com
I translated the titles. So, ignore the titles. I use the smartphone skin. On the rain page, there is a graph showing last 30 days of rain.

But lines of text directly under the graph were saying no rain. Graph was displaying rain history. I do not accept 0 rain on the 1st of the month as acceptable when 106 mm of rain are shown on the 30 day train graph!

All I want is to have relevant numbers showing minimums, maximums, totals under the graph to refer to the data displayed in the graph directly above the text.

Not from the midnight, Monday or the first date of the current month.

Thanks to Andrew here, I converted to Delta method. It seems to work for data, but it is not displaying dates and day names at all, only the time.

Also, in docs I do not see if Delta 7 days includes values from today or uses the last previous entire day for end. Because, that would also not correspond to the graph above it.

Pila

unread,
Oct 6, 2019, 4:25:18 AM10/6/19
to weewx...@googlegroups.com



>Are you using a Croatian translation, because my English display does
>not say "last 30 days"?

I apologize for taking to much poetic liberty. I want text to accurately sum the graph above it.

>
>Do you know how to go to github and get John Smith's code which
>provides something closer to what you want?

I am building SmartHome system and WeeWX is just one piece of the puzzle. I am reading it's customisation guide but it takes time. I do not know phyton. For now I am more frustrated examining SmartHome programs which I find unnecessary complicated.

WeeWX just shocked me claiming no rain under the graph showing 106mm of rain.



>
>
>Liz

Pila

unread,
Oct 6, 2019, 4:44:09 AM10/6/19
to weewx...@googlegroups.com
Here is an example. I use WeeWX as a source of rain, wind, temperature, sunrise and sunset info.

Based on that, shutters will open and close automatically.

But, I need to gage limits for e.g. at which cold temperature we start closing the balcony door. Or I risk closing a shutter with a cat on the balcony. I am even thinking of a PIR sensor.

But when WeeWX shows legend under the graphs unrelated to the graphs, I can make mistakes. And keep our cats stranded on the balcony!

Pila

unread,
Oct 6, 2019, 5:02:12 AM10/6/19
to weewx...@googlegroups.com
Copied from the original installation:

Smartphone skin

rain.html.tmpl
<h4>24h rain</h4>
<h4>Rain last 7 days</h4>
<h4>Rain last 30 days</h4>

temp.html.tmpl
<h4>24h temperature</h4>
<h4>7-day temperature</h4>
<h4>30-day temperature</h4>

wind.html.tmpl
<h4>24h</h4>
<h4>Last 7 days</h4>
<h4>Last 30 days</h4>

No ambiguity here.





>
>-tk
Reply all
Reply to author
Forward
0 new messages