Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

Catchup Custom MySQL

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
BrunswickWeather
Posts: 87
Joined: Fri 11 Mar 2011 2:04 am
Weather Station: Ecowitt GW1103
Operating System: windows 11 Pro/Raspberry pi 4
Location: Brunswick Australia

Catchup Custom MySQL

Post by BrunswickWeather »

How do I put the correct time in a MySQL database table with the catchup custom MySQL. The time of the Ecowitt observation is not used. The time that is used is the time when it is written to the database not the time of the observation. Is it possible to insert the date and time as per the Monthly SQL update (Logdatetime) during catchup.
The MySQL used:
INSERT IGNORE INTO extralogssensors (DateTime, Time, Date, YearMonth , FourthTemp , FourthHumidity , Temp , Humidity , ExtraOutTemp , ExtraOutHum , InsideTemp , InsideHum , VioletTemp , VioletHum , SoilMoisture1 , SoilMoisture2 , SoilMoisture3 ) VALUES ('<#date > <#timehhmmss >','<#timehhmmss >','<#date >','<#year>-<#month>',<#ExtraTemp1>,<#ExtraHum1>,<#temp>,<#hum>,<#ExtraTemp2>,<#ExtraHum2>,<#intemp>,<#inhum>, <#ExtraTemp3>,<#ExtraHum3>,<#SoilMoisture1>,<#SoilMoisture2>,<#SoilMoisture3> );

Attached a diagnostic file and the image of the database table
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 14382
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Catchup Custom MySQL

Post by mcrossley »

It will need a fix in Cumulus - I missed this issue when I implemented the catchup.
User avatar
mcrossley
Posts: 14382
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Catchup Custom MySQL

Post by mcrossley »

I have come up with a way of fixing this, but it will mean a change to your Custom MySQL statement(s)

In the next release I have defined a new web tag - <#DataDateTime> - which reflects the date/time of the data rather than the clock time which the other date and time web tags use.

So, your statement above would become...

Code: Select all

... VALUES ('<#DataDateTime format="yyyy-MM-dd HH:mm:00">','<#DataDateTime format="HH:mm:00">','<#DataDateTime format="yyyy-MM-dd">','<#DataDateTime format="yyyy-MM">', ...
Post Reply