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, [email protected] <[email protected]> wrote:

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.


Le samedi 30 septembre 2023 à 19:41:25 UTC+2, Lorin Tremblay a écrit :
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





On 30 Sep 23, at 13:29, vince <[email protected]> wrote:

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 ?

On Friday, September 29, 2023 at 9:56:22 PM UTC-7 Lorin Tremblay wrote:
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….


On 29 Sep 23, at 22:50, vince <[email protected]> wrote:

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


--
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 [email protected].

--
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 [email protected].

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/df223a63-f055-4f1a-978c-793ed63e4495n%40googlegroups.com.

--
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 [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/E385A63A-2B08-44FB-AC5F-0E1861F906AF%40gmail.com.

Reply via email to