time_length = day_ago_to_now

105 views
Skip to first unread message

Joachim Puttkammer

unread,
Aug 2, 2020, 6:35:10 AM8/2/20
to weewx-user
Hi,

i try to create a chart with time-lenght=day_ago_to_now or hour_ago_to_now according to the documentation.
I do not succeed.

WeeWX version: 4.1.1  Belchertown Skin Version: 1.2rc1

/var/log/weewx.log

weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.82 seconds
weewx.reportengine: Copied 3 files to /var/www/html/public_html
weewx.reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator'
weewx.reportengine:         ****  invalid literal for int() with base 10: 'day_ago_to_now'
weewx.reportengine:         ****  Traceback (most recent call last):
weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
weewx.reportengine:         ****      obj.start()
weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
weewx.reportengine:         ****      self.run()
weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 1507, in run
weewx.reportengine:         ****      time_length = int(time_length) # Convert to int() for minstamp math and for point_timestamp conditional later
weewx.reportengine:         ****  ValueError: invalid literal for int() with base 10: 'day_ago_to_now'
weewx.reportengine:         ****  Generator terminated

--------------------------
graphs.conf

aggregate_type = None
time_length = 90000 # Last 25 hours
type = line
tooltip_date_format = "LLL"

[homepage]
    # Chart Timespan Defaults
    title = "Homepage"
    show_button = true
    button_text = "Homepage"
#    time_length = today
    tooltip_date_format = "LLL"
    gapsize = 300000

    [[chart1]]
        title = Temperature
        time_length = day_ago_to_now
        time_ago = 1
        start_at_midnight = true     
        [[[outTemp]]]
            zIndex = 1
            name = Temperature


Joachim

Pat

unread,
Aug 3, 2020, 10:39:50 AM8/3/20
to weewx-user
Your graphs.conf looks correct, but the error is not related to day_ago_to_now, it looks like day_ago_to_now is being skipped for some reason. 

Take a backup of graphs.conf, then try this as your only item in graphs.conf? 

[timetestchart]
    title = Time Test Chart
    show_button = true
    button_text = Time Test Chart
    gapsize = 300

    [[chart1]]
        title = Temperature
        time_length = day_ago_to_now
        time_ago = 1
        start_at_midnight = true
        #aggregate_type = max
        #aggregate_interval = 86400 # 1 day
        gapsize = 86400
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
        [[[dewpoint]]]



Pat

unread,
Aug 3, 2020, 10:41:52 AM8/3/20
to weewx-user
Ah, I see your gapsize is still in milliseconds. That tells me you haven't upgraded to the latest version of the skin, or you've skipped upgrading belchertown.py. 

Keep your graphs.conf the same, and upgrade all files to the latest version of all files. You'll notice in the development release notes the breaking change of gapsize is now in seconds (300) , not milliseconds (300000)

On Sunday, August 2, 2020 at 6:35:10 AM UTC-4 jputt...@gmail.com wrote:

Joachim Puttkammer

unread,
Aug 3, 2020, 11:43:30 AM8/3/20
to weewx-user
To avoid rewriting the graph.conf, I simply copied the old version (1.1.) into the Belchertown skin 1.2.
I will now rewrite to '300'. If it doesn't work, install it again.

Joachim Puttkammer

unread,
Aug 3, 2020, 12:05:33 PM8/3/20
to weewx-user
My archive_interval is 60.
Had I to change the intervall to 300


 


Am Montag, 3. August 2020 16:41:52 UTC+2 schrieb Pat:

Pat

unread,
Aug 3, 2020, 12:17:45 PM8/3/20
to weewx-user
Make the two match

Joachim Puttkammer

unread,
Aug 8, 2020, 11:18:44 AM8/8/20
to weewx-user
I have completely deleted Belchertown and reinstalled ver. 1.2. Now the new features worked.
So it was a mistake of me to copy simply  files of the ver.1.1. into the ver. 1.2. . This mix did not work and led to some nonsensical requests in this group. I am sorry.

Joachim
Reply all
Reply to author
Forward
0 new messages