Hello. First of all, thanks for the information. Second, I understand what you're saying, although looking at the apiLog.txt file, I don't see the information you put in the sample extract, and I attached an example of what I see. The concept is clear to me, CRON calls when it corresponds to api.php, but the second difference is how long it takes to get the information from the data logger.
Regarding the second question, maybe it has to do with this, but I don't know. Today's minimum temperature was 12.7 ºC at 7:35. This data appears in the station console and in the Weatherlink API (I leave the extract below), but the template prints the minimum temperature at 7:45, 10 minutes later. That has happened to me with other data, for example, wind gust, even collected by the cache and dumped into the database 15 minutes later. I don't know if I explained myself this time.
WeatherLink API
Code: Select all
<temp_day_high_f>65.7</temp_day_high_f>
<temp_day_high_time>1:20pm</temp_day_high_time>
<temp_day_low_f>54.8</temp_day_low_f>
<temp_day_low_time>7:35am</temp_day_low_time>
<temp_month_high_f>68.1</temp_month_high_f>
<temp_month_low_f>54.8</temp_month_low_f>
<temp_year_high_f>68.4</temp_year_high_f>
<temp_year_low_f>54.8</temp_year_low_f>
apiLog.txt
Code: Select all
Handling data from wlIP
update 'T' = 18.2
update 'H' = 67
update 'P' = 1018.1
update 'B' = 76
update 'W' = 24.1401
update 'G' = 37.01482
update 'R' = 0
update 'RR' = 0
update 'S' = 0
update 'U' = 1646750952 (2022-03-08 14:49:12)
update 'TIN' = 22.5
update 'HIN' = 53
update 'SW' = wlIP
Begin of common part of api script
Start handling live data
Checking if extra sensors should be logged
Extra sensor settings file not found.
Extra sensors data to save in db:
add live data: D: 11.9
add live data: DTime: 1646750943
add live data: A: 14.4
add live data: ATime: 1646750943
calculated D: 11.9
calculated A: 14.1
Save meteotemplateLive.txt: {"T":18.2,"H":67,"P":1018.1,"B":76,"W":24.1401,"G":37.01482,"R":0,"RR":0,"S":0,"U":1646750952,"TIN":22.5,"HIN":53,"SW":"wlIP","TTime":1646751006,"HTime":1646751006,"PTime":1646751006,"BTime":1646751006,"WTime":1646751006,"GTime":1646751006,"RTime":1646751006,"RRTime":1646751006,"STime":1646751006,"UTime":1646751006,"TINTime":1646751006,"HINTime":1646751006,"SWTime":1646751006,"D":11.9,"DTime":1646751006,"A":14.1,"ATime":1646751006}
Start data parsing
Parsing date; Server time: 2022-03-08 14:50:06
Validating date: 1646750952 (2022-03-08 14:49:12)
Date is valid; difference with server time is -54 s
Parsing temperature
Temperature: 18.2 C
Database units: C
Checking temperature is between limits specified in template Main settings.
Minimum temperature limit: -100 C
Maximum temperature limit: 100 C
Temperature is OK and within the allowed limits
Parsing maximum temperature
Parsing minimum temperature
Parsing humidity
Humidity: 67 percent
Checking humidity is between limits specified in template Main settings.
Minimum humidity limit: 0 %
Maximum humidity limit: 100 %
Humidity is OK and within the allowed limits
Parsing wind speed
Wind speed: 24.1401 kmh
Database wind speed units: kmh
Checking wind speed is between limits specified in template Main settings.
Minimum wind speed limit: 0 kmh
Maximum wind speed limit: 200 kmh
Wind speed is OK and within the allowed limits
Parsing wind gust
Wind gust: 37.01482 kmh
Database wind units: kmh
Checking wind gust is between limits specified in template Main settings.
Minimum wind gust limit: 0 kmh
Maximum wind gust limit: 200 kmh
Wind gust is OK and within the allowed limits
Parsing wind direction
Wind direction: 76 degrees
Wind direction is OK and within the allowed limits
Parsing daily cumulative precipitation
Precipitation: 0 mm
Database precipitation units: mm
Checking precipitation is between limits specified in template Main settings.
Minimum precipitation limit: 0 mm
Maximum precipitation limit: 800 mm
Precipitation is OK and within the allowed limits
Parsing rain rate
Rain rate: 0 mm/h
Database rain units: mm/h
Checking rain rate is between limits specified in template Main settings.
Minimum rain rate limit: 0 mm/h
Maximum rain rate limit: 500 mm/h
Rain rate is OK and within the allowed limits
Solar radiation sensor disabled in Main settings - skipping.
No extra sensors set to log to extra alldata table.
Cached data loaded from cache/apiCache.txt.
Parsing pressure
Pressure: 1018.1 hpa
Database pressure units: hpa
Checking pressure is between limits specified in template Main settings.
Minimum pressure limit: 950 hpa
Maximum pressure limit: 1100 hpa
Pressure is OK and within the allowed limits
Pressure is valid.
Calculated dew point: 11.9 C
Dew point ok.
Calculated apparent temperature: 14.1 C
Apparent temperature ok.
End time for database update based on timestamp of first cache data: 2022-03-08 14:45:14
Rounded end time for database update: 2022-03-08 14:50:00
Not yet time to update the db, saving new data to cache/apiCache.txt
Generating log file cache/apiLog.txt
ERRORS:
No max temperature data provided.
No min temperature data provided.