Belchertown weekly graph

159 views
Skip to first unread message

Lorin Tremblay

unread,
Sep 29, 2023, 8:58:57 PM9/29/23
to weewx-user
Hi!

I’ve try to read on the graph documentation and having a hard time figuring out why I have no graph whatsoever in my weekly tab….

I assume there is something to do with the setting in graph.conf

Here is my week conf….

[week]
    # Chart Timespan Defaults
    title = "This Week"
    show_button = true
    button_text = "Week"
    time_length = 604800 # Last 7 days
    tooltip_date_format = "LLLL"
    aggregate_type = max
    aggregate_interval = 3600 # 1 hour
    gapsize = 3600 # 1 hour in seconds

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
#            name = Temperature
        [[[windchill]]]
        [[[inTemp]]]
            color = "#4efc03"
        [[[heatindex]]]
            color = "#f7a35c"
        [[[dewpoint]]]
            color = purple

    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            # Here we can override the timespan default aggregate type with our own specific to this chart
            aggregate_type = avg
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2

    [[chart3]]
        title = Rain
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total

    [[chart4]]
        title = Barometer
        aggregate_type = avg
        [[[barometer]]]
            color = "#BECC00"

vince

unread,
Sep 29, 2023, 10:29:44 PM9/29/23
to weewx-user
Try naming it "graphs.conf" (plural)

Kidney

unread,
Sep 29, 2023, 10:34:32 PM9/29/23
to weewx...@googlegroups.com
Yup that what's it’s named , was a typo in my email..

On Sep 29, 2023, at 22:29, vince <vince...@gmail.com> wrote:

Try naming it "graphs.conf" (plural)
--
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/e729a421-04cb-47f1-bde7-954b0aa19849n%40googlegroups.com.

vince

unread,
Sep 29, 2023, 10:50:20 PM9/29/23
to weewx-user
Well, I always suggest the old sysadmin credo of "when in doubt, comment it out" in working these kinds of things.  Start slowly and get 'one' chart working....and look at your syslogs.  Do yours say anything indicating a problem ?

You might also save your (not working) graphs.conf file someplace and 'copy' the graphs.conf.example file into place as graphs.conf which should definitely work.  At a minimum it'll take your edits out of the question at least temporarily....

I don't remember for Belchertown if you should stop/restart weewx after fiddling with graphs.conf but that might be wise in this case just in case....

Lorin Tremblay

unread,
Sep 30, 2023, 12:56:22 AM9/30/23
to weewx...@googlegroups.com
Well that might be part of my problem

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator'

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****  [Errno 13] Permission denied: '/var/www/html/weewx/json/week.json'

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****  Traceback (most recent call last):

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 197, in run

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****      obj.start()

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 385, in start

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****      self.run()

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****    File "/usr/share/weewx/user/belchertown.py", line 2817, in run

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****      with open(json_filename, mode="w") as jf:

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****  PermissionError: [Errno 13] Permission denied: '/var/www/html/weewx/json/week.json'

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:         ****  Generator terminated



What is the best way to correct this situation….


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

vince

unread,
Sep 30, 2023, 1:29:49 PM9/30/23
to weewx-user
The log file pretty clearly says which file it can't write to.  So you need to fix the permissions on that file.  Pretty simple.

Without any details on your setup it's hard to say more than that, other than if you're doing unusual things like writing across the network to a filesystem mounted on another computer or NAS, the possibilities of what's perhaps wrong grow a lot.

Do other skins work ok ?

Lorin Tremblay

unread,
Sep 30, 2023, 1:41:25 PM9/30/23
to weewx...@googlegroups.com
Found out that I was creating the issue by running it myself, but the weewx run as root so that problem doesn't occurs when it runs by itself…………

So the problem is really specific to only the week graph, every other thing work flawlessly other than the week repport.


Running all the latest version of Weewx for raspberry PI ans belchertown skin

So back to thinking the problem is in the preference of the week graph section….

[week]
    # Chart Timespan Defaults
    title = "This Week"
    show_button = true
    button_text = "Week"
    time_length = 604800 # Last 7 days
    tooltip_date_format = "LLLL"
    aggregate_type = max
    aggregate_interval = 3600 # 1 hour
    gapsize = 3600 # 1 hour in seconds

Or in the belchertown skin





jterr...@gmail.com

unread,
Sep 30, 2023, 2:45:00 PM9/30/23
to weewx-user
Lorin,

According to your "week" configuration, Belchertown should normally create a json file named week.json. (http://www.gestionlgt.com/Chalet/json/week.json).

Your problem seems to be due to the fact that another template is overwriting  the week.json file, and that the format of this json file is not recognized bat the Belchertown javascript :

Here the beginning of your current week.json file :
[{
    "_version": "week.json.tmpl version 0.3.2",
    "utcoffset": -240.0,
    "timespan": {
        "start": 1695441600000.0,
        "stop": 1696098600000
    },
    "temperatureplot": {
        "series":
        {
            "outTemp": {
                "name": "Temperature",
                "data": [[1695441900000.0, 8.4], [1695442200000.0, 8.3]
......L


If you look for example  at your day.json, the beginning of the file is :

{
    "belchertown_version": "1.3.1",
    "generated_timestamp": "09/30/2023 14:35:22",
    "colors": "#7cb5ec, #b2df8a, #f7a35c, #8c6bb1, #dd3497, #e4d354, #268bd2, #f45b5b, #6a3d9a, #33a02c",
    "chartgroup_title": "Today",
    "tooltip_date_format": "LLL",
    "credits": "highcharts_default",
    "credits_url": "highcharts_default",
    "credits_position": "highcharts_default",
    "chart1": {
        "series": {
            "outTemp": {
                "obsType": "outTemp",
                "yAxis_label": "Outside Temperature (\u00b0C)",
                "polar": "false",
                "zIndex": 1.0,
                "name": "Outside Temperature",
......

and the day.json is recognized and daily charts are generated.

Kidney

unread,
Sep 30, 2023, 5:03:25 PM9/30/23
to weewx...@googlegroups.com
Ok thanks for the insight, Highchart is overwriting my week.json, but not my other, day.json, month.json or year.json…. Now the question is why?


On Sep 30, 2023, at 14:45, jterr...@gmail.com <jterr...@gmail.com> wrote:

Lorin,

gjr80

unread,
Sep 30, 2023, 5:53:12 PM9/30/23
to weewx-user
On Sunday, 1 October 2023 at 07:03:25 UTC+10 kidn...@gmail.com wrote:
Ok thanks for the insight, Highchart is overwriting my week.json, but not my other, day.json, month.json or year.json…. Now the question is why?

Simple, the weewx-highcharts extensions produces two json files; week.json and year.json, it does not produce day.json or month.json. So that is why the Belchertown day.json and month.json are not overwritten. As for why year.json is not overwritten, it could be for a number of reasons. Have you disabled generation of weewx-highcharts year.json? Is it being written to another directory? By default weewx-highcharts places week.json and year.json in /home/weewx/public_html/json or /var/www/html/weewx/json depending on your WeeWX install type. I thought these would be safe, but perhaps not.

The answers will be in your config files. You have a few choices; either disable the Belchertown skin or weewx-highcharts or change the location of the generated Belchertown or weewx-highcharts output. You could also change the names of the weewx-highcharts generated json files, but I do not recommend this as it would entail editing some of the weewx-highcharts javascript.

Gary 

Lorin Tremblay

unread,
Sep 30, 2023, 7:00:49 PM9/30/23
to weewx-user
Well I commented out in skin.conf of the highchart

        # Highcharts week json data

#        [[[WeekJSON]]]

#            template = json/week.json.tmpl


        # Highcharts year json data

#        [[[YearJSON]]]

#            template = json/year.json.tmpl

 And my weekly now works!


Thanks for all the inputs, really appreciated!

--
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.
Reply all
Reply to author
Forward
0 new messages