Weather Diary (C1 and MX Differences) - Resolved already in MX
Posted: Fri 27 Mar 2020 11:04 pm
I moved from Cumulus 1 to MX, and this post has my observations re Weather Diary.
While MX can read most Cumulus 1 log files, it cannot read the Cumulus 1 log.xml file and transfer its contents to diary.db. Luckily, there has not been much snow here since I moved and restarted my Cumulus 1 last January, so in my case I manually copied my 3 entries across. I don't know whether an automated transfer would be useful for anyone else, but for me it might be easy to write a PHP script to do that.
To me the key Weather Diary functionality difference is that in Cumulus 1 you can select the time at which the snow settings rollover (Cumulus.ini, Station section, SnowDepthHour=9), and I am guessing MX does not support that (as there is no mention in build 3046/3047 announcements) although I have not experimented yet to test accurately when the web tag <#snowdepth> is updated in MX.
Another difference is that Steve's design permitted multiple entries on a single day (all edits) to be retained, but Mark's editor design only has a date picker, (all entries are recorded at time of 00:00:00) so any edit overwrites previous entry.
Anyway, my schema for my daily summary table in my MySQL database (written a decade ago for use with Cumulus 1) includes columns for all that is now in the sqlite database as well as reading dayfile.txt and some other logs. For MX, my minor change to my database table update script (that normally runs when Cumulus is processing the rollover) is so it reads the sqlite db when forming the INSERT or UPDATE queries for my daily summary table. I use the"PHP Data Objects (PDO)" commands to access the sqlite database and then "foreach" constructs to read the one row for each date and assign the values to the relevant MySQL columns. I'm guessing the MX SQL facilities can not do this?
While MX can read most Cumulus 1 log files, it cannot read the Cumulus 1 log.xml file and transfer its contents to diary.db. Luckily, there has not been much snow here since I moved and restarted my Cumulus 1 last January, so in my case I manually copied my 3 entries across. I don't know whether an automated transfer would be useful for anyone else, but for me it might be easy to write a PHP script to do that.
To me the key Weather Diary functionality difference is that in Cumulus 1 you can select the time at which the snow settings rollover (Cumulus.ini, Station section, SnowDepthHour=9), and I am guessing MX does not support that (as there is no mention in build 3046/3047 announcements) although I have not experimented yet to test accurately when the web tag <#snowdepth> is updated in MX.
Another difference is that Steve's design permitted multiple entries on a single day (all edits) to be retained, but Mark's editor design only has a date picker, (all entries are recorded at time of 00:00:00) so any edit overwrites previous entry.
Anyway, my schema for my daily summary table in my MySQL database (written a decade ago for use with Cumulus 1) includes columns for all that is now in the sqlite database as well as reading dayfile.txt and some other logs. For MX, my minor change to my database table update script (that normally runs when Cumulus is processing the rollover) is so it reads the sqlite db when forming the INSERT or UPDATE queries for my daily summary table. I use the"PHP Data Objects (PDO)" commands to access the sqlite database and then "foreach" constructs to read the one row for each date and assign the values to the relevant MySQL columns. I'm guessing the MX SQL facilities can not do this?