Page 1 of 2
<#rmonth> no returning correct value
Posted: Mon 16 Mar 2020 11:36 am
by TheBridge
I have added a ‘rainfall this month’ field on my ‘this month’ webpage using <#rmonth> tag. I did this in the middle of March and found it is only returning the rain value for yesterday and today. I was using Cumulus 1 at that time. I have and now upgraded to very latest MX (smooth and easy. love it!). Same results. I manually checked my dayfile.txt and added all rain as of 23:55 for each day this month and got the correct value of 2.22-inches but Cumulus dashboard and ‘this month’ webpage reports only 0.04-inches; which is yesterday’s rain value. Sure, I could maybe edit it in but rather understand how <#rmonth> works and why it miscalculates this month’s value if it is using data from the dayfile.txt and gets it wrong when my check of the raw data itself is correct.
Re: <#rmonth> no returning correct value
Posted: Mon 16 Mar 2020 3:16 pm
by mcrossley
Please start Cumulus with the -debug command line option, then post the MXdiags log file.
Did you make all the required changes to your Cumulus 1 data .ini files? Changing commas to dots etc?
Re: <#rmonth> no returning correct value
Posted: Mon 16 Mar 2020 3:53 pm
by sfws
TheBridge wrote: ↑Mon 16 Mar 2020 11:36 am
I have added a ‘rainfall this month’ field on my ‘this month’ webpage using <#rmonth> tag.
It always slightly annoyed me that the provided web pages put <#rmonth> on the "now" web page, but not on the ‘this month’ web page, so something I did almost as soon as I started using Cumulus over a decade ago was to make that change.
Can you confirm that the wrong figure is also showing on your "index.htm" now page, because if it is right there, then you have an error on your "thismonthT.htm" template page. I would even hazard a guess that you might have changed "thismonth.htm" instead of the template page, as that would prevent the figure being updated on successive days?
If you need to understand how the <#rmonth> figure is calculated, see the FAQ linked from the top of this page, specifically
https://cumuluswiki.org/a/FAQ#Where_doe ... ls_from.3F
TheBridge wrote: ↑Mon 16 Mar 2020 11:36 am
I manually checked my dayfile.txt and added all rain as of 23:55 for each day this month and got the correct value of 2.22-inches
This comment suggests you understand how it should work, and thus Mark's advice
mcrossley wrote: ↑Mon 16 Mar 2020 3:16 pm
Please start Cumulus with the -debug command line option, then post the MXdiags log file.
is the way forward. My only thought about
mcrossley wrote: ↑Mon 16 Mar 2020 3:16 pm
Did you make all the required changes to your Cumulus 1 data .ini files? Changing commas to dots etc?
is that you are saying it did not work with Cumulus 1, so whatever your problem is, it applies to both versions of Cumulus.
Re: <#rmonth> not returning correct value
Posted: Mon 16 Mar 2020 5:45 pm
by TheBridge
The 'Rain this Month to date' figure on the NOW page (in MX) is indeed not correct. It is showing only today's rain figure (0.06" so far). Yesterday (night) it is showed only that yesterday's rainfall figure. HOWEVER when I run Cumulus 1 the VIEW-THIS MONTH figure is correct for rainfall up to yesterday. Hmmm...
NOTE: I did have <#rmonth> in the "thismonthT.htm" template page.
I will turn on -debug ....however the first note above seems to make no sense as they are from with the app itself.
As an aside note, not that it changes the results of the first note above, no I didn't see anything in the update from V 1 to MX note regarding required changes to your Cumulus 1 data.ini files? Changing commas to dots etc? Is there a link on this and I shall endeavor to do so ASAP.
Re: <#rmonth> no returning correct value
Posted: Mon 16 Mar 2020 6:37 pm
by mcrossley
The editing of ini files is in Steve's post on MX -
Cumulus MX Announcements and Download - PLEASE READ FIRST
If you want to use your Cumulus 1 data with MX, and you use decimal commas in your Cumulus 1 data, you will need to edit the .ini files to change the decimal commas into periods/full stops, because Cumulus MX always expects periods/full stops in .ini files regardless of the locale in use. The other data files will be OK - assuming you are using the same decimal and list separators in MX as you used in Cumulus 1 (i.e. the same locale). If you try to switch to a different locale, then your data log files will of course no longer be in the correct format, so you would need to edit all of your files.
Admittedly that is long post, and it could do with being pulled together into a How-to Guide.
Re: <#rmonth> no returning correct value
Posted: Mon 16 Mar 2020 11:32 pm
by TheBridge
I hope this clarifies my point about 'Rain this month to date'.
Using Cumulus 1 (I have Cumulus MX also but will get back to that in a moment) I have a screen shot of the Cumulus 1 dashboard. The value shown 'rainfall - this month' is actually TODAY's rain (1.37") only.
Then compare to the 'VIEW - THIS MONTH' screen shot taken a minute or two later. It shows the correct amount of rain this month (2.26" as of yesterday...which is as it should be).
This then, I think, narrows down the issues eliminating any MX version, hardware or datafile concerns.
The (erroneous) value of the Cumulus 1 dashboard is the same value showing up on my web pages when I call out webtag '<#rmonth'.
About MX: The erroneous value (1.37") also shows up in MX when I view 'this month' recap. Apparently the pointer in Cumulus 1 dashboard, which yields the amount of rain TODAY, was carried over to MX's dashboard? What is the tag that the Cumulus 1 'VIEW - THIS MONTH' is using that it retrieves, or calculates, the right value?
Cumulus 1 dashboard.png
Cumulus 1 VIEW - THIS MONTH screen.png
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 2:08 am
by beteljuice
Your 'Today' rain is also greater than 'Last 24hrs' ??
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 1:11 pm
by TheBridge
Ok, good catch. This is from the core Cumulus app itself. Nothing I can do to fix this. Need help from the core app team on this.
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 1:17 pm
by mcrossley
I need to see the log files. Cumulus obviously works for everyone else with a Davis station (including me) so there is something wrong with your setup.
As well as zipping up the \MXdiags folder (with -debug on) it would be helpful if you zipped up your \data folder too.
From your screen shots you have accumulated all your monthly rain in a single day?
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 1:18 pm
by water01
Need help from the core app team on this.
Not sure what you mean by this as there is no maintenance or development of Cumulus 1.
I am puzzled as to why you can't use the editors in Cumulus 1 to fix this or alternatively rollback to a backup where the values are correct and roll forward using the logging on your station to see if that fixes the problem.
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 4:00 pm
by TheBridge
Hi Mark, good to hear that the problem is (only) in my setup only. I will be most curious as to where mine went off the tracks. Everything else with Cumulus (non-MX) has worked fine since 2014. That trying to post a monthly rain stat has revealed some problem will be smashing to fine what it is.
About the rain this month. We had (about) 2.22" BEFORE yesterday and got (about) 1.8" yesterday. I reverted to using Cumulus yesterday afternoon and last night as my MX version seems to stall after a while. So attached are the MX most recent datafiles (my datafiles go back to 2014 and didn't think you wanted 25MB of that) plus files from \MXdiags folder.
Thank you in advance for your genius on my issue/s
cumulusmxfiles.zip
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 7:34 pm
by mcrossley
You want to take a look at this line in your dayfile.txt
Code: Select all
2020-03-17 08:39:57.339 GetRainfallTotals: Error on line 2160 of dayfile.txt: Input string was not in a correct format.
That line is messed up, there is an extra column at position 3 - value = 0 - that shouldn't be there
Re: <#rmonth> no returning correct value
Posted: Tue 17 Mar 2020 11:50 pm
by TheBridge
Hi Mark, Thank you very much!
You found it (the problem) and it is now resolved!
Is an errant entry such as I had not unusual occurrence? What did you use to parse the file so that in the future I can do this investigation myself? I can use Excel to show the fields -- which I did do at one point but realized with over 3000 lines in the dayfile.txt doing manually can be very tedious. It seems you may have a template or use another app for this very purpose.
Hopefully this datafile file error may have been the cause of the MX 'stalling' so the next 24-hours will tell me if I'm completely out of the woods. II really like the look/feel of the MX webpage approach and appearance. Is there a possibility to program the MX DOS window to auto call up the MX home webpage?
Did I also see something about a (web) app that I can send to the viewers of my Cumlulus website so they can look up the historical data for date they choose?
Contribution coming. I did so in 2014 when I got started with Cumulus but time to feed the kitty again.
-Bridge
Re: <#rmonth> no returning correct value
Posted: Wed 18 Mar 2020 7:45 am
by sfws
I've updated Wiki FAQ
https://cumuluswiki.org/a/FAQ#My_monthl ... _are_wrong to specifically spell out this problem/solution, previously it only hinted at it.
TheBridge wrote: ↑Tue 17 Mar 2020 11:50 pm
Is an errant entry such as I had not unusual occurrence?
If you were to search this forum for "error at line ..." topics or indeed to look at FAQ
https://cumuluswiki.org/a/FAQ#Error_mes ... line....22 you will see it is not that unusual, but won't happen in normal siturations.
sfws wrote: ↑Mon 16 Mar 2020 3:53 pm
Can you confirm that the wrong figure is also showing on your "index.htm" now page, because if it is right there, then you have an error on your "thismonthT.htm" template page. I would even hazard a guess that you might have changed "thismonth.htm" instead of the template page, as that would prevent the figure being updated on successive days?
When you added in a subsequent post the screen shots it became obvious that it was a log file issue and nothing to do with web pages. That earlier wrong guess was based on you only mentioning the web page change in your first post.
Re: <#rmonth> no returning correct value
Posted: Wed 18 Mar 2020 9:28 am
by mcrossley
TheBridge wrote: ↑Tue 17 Mar 2020 11:50 pm
What did you use to parse the file so that in the future I can do this investigation myself?
The error message which points you at the problem is in the log files as Cumulus starts up. It gives you the filename and line number. I then just looked at your dayfile in VS Code which parses CSV into a colour coded more legible format - it also previews it in a table format too.