Page 1 of 1

CustomLogs and CMX webtag #snow24h(r)

Posted: Sat 18 Jan 2025 6:03 pm
by lse-cumulus
Hi Hans,
I tried to generate CustomLogs for snow (not really necessary as the CU chartscompiler supports snow charts directly), but I think there is an inconsistency in the naming of the webtags in CMX and CU for #snow24h(r).
  • CMX produces a file WebTags.txt during startup and that contains the tag with name snow24hr. Therfore I created the customlog CLogDailySnow in CMX settings as <#snow24hr rc=y nv=0>,<#snowdepth rc=y nv=0>. Also in the CMX Wiki the webtag is called <#snow24hr> with 'r' at the end. https://www.cumuluswiki.org/a/Full_list_of_Webtags
  • But the CU chartscompiler uses the plot variable Snow24h.
    CU complained during Website/UserAskedData and parsing CutilsCharts.def about the <#snow24hr rc=y nv=0>.
    I had to adapt CutilsCharts.def to use CLogDailySnowsnow24h, but also CMX settings for Customlogs to use <#snow24h rc=y nv=0>,<#snowdepth rc=y nv=0> without 'r' at the end.
  • Now CU CustomLogs setup is working and I get an empty CLogDailySnow chart, but I assume I will never get values for webtag #snow24h in CMX in the file CLogDailySnow.txt ... (But I have a working chartscompiler based chart with DailySnow).
https://leonas.ddns.net/Wetterstation.S ... gDailySnow
https://leonas.ddns.net/Wetterstation.S ... =DailySnow

Extract from my CutilsCharts.def:

Code: Select all

; working daily chartscompiler chart
Chart DailySnow Title Daily Snowfall and Snowdepth
Zoom 2
  PLOT Daily AverageTemp colour Violet zindex 40
  Plot Daily Snow24h As Column colour blue zindex 30
  Plot Daily SnowDepth As Area colour lightblue opacity 0.2 zindex 10
  Plot Daily DayRain As Column colour green zindex 20 INVISIBLE
EndChart

; CustomLogsCharts
Chart CLogDailySnow Title Trend Chart of CustomLog CLogDailySnow 
  PLOT ALL CLogDailySnowsnow24h As Column colour blue
  PLOT ALL CLogDailySnowsnowdepth As Area Colour lightblue Opacity 0.2
  PLOT ALL CLogDailySnowwchill Colour orange
EndChart
Currently used CMX Customlog settings:

Code: Select all

<#snow24h rc=y nv=0>,<#snowdepth rc=y nv=0>,<#wchill rc=y>
Extract from utilslog when trying to use CMX webtag:

Code: Select all

...
2025-01-18 14:05:02.121 Information Constructor CustomLogs: handling Custom log CLogDailySnow - Webtag <#snow24hr rc=y nv=0>
2025-01-18 14:05:02.121 Warning Constructor CustomLogs: Not a valid Webtag snow24hr used in Custom log CLogDailySnow
...
2025-01-18 13:58:22.144 Information Parsing User Charts Definitions : Chart CLogDailySnow'
2025-01-18 13:58:22.144 Error Parsing User Charts: No EVAL found for a PLOT statement' for CLogDailySnowsnow24hr when required'
2025-01-18 13:58:22.144 Error Parsing User Charts: Equation is required because Plotvariable does not translate to valid JSON variable
2025-01-18 13:58:22.158 Errors in Charts definition. See logfile, please correct and run again.
2025-01-18 13:58:22.158 Error No new cumuluscharts.txt is generated and the old one remains in place

Re: CustomLogs and CMX webtag #snow24h(r) [disabled]

Posted: Sun 19 Jan 2025 4:08 am
by lse-cumulus
  • As expected, during CMX end of day the CLogDailySnow.txt file was written with an empty string for webtag #snow24h and the JSON structure of (all) daily Customlogs got invalid and CU Customslogs did no longer disaply daily CLog charts.
  • I edited the CLogDailySnow.txt file manually and added/fixed some values and after running utils\bin\cumulusutils.exe Website again, I got the CLog charts back and took a screenshot how CLogDailySnow chart would loook like ...
  • Then I disabled CLogDailySnow in CMX Settings and removed the Chart CLogDailySnow from the CutilsCharts.def for the time being (could have also set the cumulusutils.ini paramter ExcludedCustomLogs=CLogDailySnow instead) ...
    After running utils\bin\cumulusutils.exe Website and UserAskedData all ExtraCharts and CLogCharts are back as usual (just without CLogDailySnow).
CLogDailySnow.txt (as created by CMX with setup <#snow24h rc=y nv=0>,<#snowdepth rc=y nv=0>,<#wchill rc=y>):

Code: Select all

18/01/25,,0,-3.1
Manually modified CLogDailySnow.txt to produce screenshot:

Code: Select all

14/01/25,0,0,1
15/01/25,2,2,1
16/01/25,0,0,0
17/01/25,0,0,0
18/01/25,0,0,-3.1
pws-suttenbrunn.screenshot.20250119.CLogDailySnow.fixed.data.jpg

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Tue 21 Jan 2025 7:01 am
by HansR
[Edited at 8h47]
If I may summarize your very verbose posts:

CMX uses the webtags: snowdepth and snow24hr
CMX uses the db field names: snowdepth and snow24h
CUtils uses the compiler names : SnowDepth and Snow24h
CUtils uses the allowed CustomLog names: SnowDepth and Snow24h

I see the discrepancy and suggest CUtils will use snow24hr which will solve the issue and make CMX/CUtils be consistent.
Will be fixed in the next release.


I see the discrepancy and suggest CMX will use snow24h which will solve the issue and make CMX/CUtils be consistent. When not the case I will need a mapping of dbname/webtag/JSON consistency. That is making life more difficult than it could be.

@Mark: I think snow24h would have been more consistent May I propose a full consistency in the naming/capitalisation of the webtag names/JSON parameters/db field names and wherever those names are used? That works for all JSONs but not for snow.

Is it possible to use snow24h everywhere in the naming?
If not, we will need a mapping of the field name to the webtag/JSON - chart parameter name

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Tue 21 Jan 2025 10:22 am
by mcrossley
HansR wrote: Tue 21 Jan 2025 7:01 am @Mark: I think snow24h would have been more consistent May I propose a full consistency in the naming/capitalisation of the webtag names/JSON parameters/db field names and wherever those names are used? That works for all JSONs but not for snow.
I really do not think that is practical. Even basic measurements such as outdoor temperature and humidity are inconsistent across the MySQL column names and web tags - Temp vs <#temp> temp, Humidity vs <#hum> forr the monthly table, MaxTemp vs <#tempTH> for the daily table etc, etc

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Tue 21 Jan 2025 11:13 am
by HansR
@Mark: OK, clear.

@Leo: I'll see how I solve this and let you know in this thread.

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Tue 21 Jan 2025 2:52 pm
by HansR
HansR wrote: Tue 21 Jan 2025 11:13 am @Leo: I'll see how I solve this and let you know in this thread.
#Snow24hr webtag now is valid in CustomLogs. This will be available soon in version 7.4.1 of CUtils.

A suggestion for harmonisation with the compiler keywords could be that the compiler will accept Snow24hr i.s.o. Snow24h as keyword vs the status quo (i.e. Snow24h remains the keyword). Any comments on this below please.

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Tue 21 Jan 2025 6:06 pm
by lse-cumulus
Hans,
thx for the fix in next CU release.
Regarding your proposal about compiler keyword: i can live with status quo or with a modified keyword. As compiler might already have been in use and for upward compatibility maybe best to keep status quo ... (as snow is already offered via diary.db and charts compiler the usage of Custom Log might be not as widespread).

Re: CustomLogs and CMX webtag #snow24h(r) [SOLVED]

Posted: Sun 26 Jan 2025 3:01 pm
by lse-cumulus
Hans,
just wanted to let you know, that after installing CU v7.4.1 the CLogDailySnow and Chart work fine with snow24hr tagname.
Well done.
thx
leo
https://leonas.ddns.net/Wetterstation.S ... gDailySnow

Re: CustomLogs and CMX webtag #snow24h(r)

Posted: Sun 26 Jan 2025 3:06 pm
by HansR
@leo: thnx