Yes.

In general the archive table is readings during that archive period. I did 
a little checking in Excel to verify sum of all the 'rain' elements in the 
archive table in a particular rainy day here indeed matches the 'sum' in 
the archive_day_rain table to verify this.  It did.
So if your 'rain' element is the rolling total of rain to date for a 
particular day, you should be able to calculate corrected input data with 
rain over each archive period. I have to think it's something python or the 
scripting language of your choice could do pretty quickly.

# example query that does the first 5 archive periods for Sept-13 localtime
echo "select datetime(dateTime,'unixepoch','localtime'),dateTime,rain from 
archive where dateTime < 1726383600 and dateTime >= 1726210800 limit 5;" | 
sqlite3 weewx.sdb

# example output
2024-09-13 00:00:00|1726210800|0.0
2024-09-13 00:05:00|1726211100|0.0
2024-09-13 00:10:00|1726211400|0.0
2024-09-13 00:15:00|1726211700|0.0
2024-09-13 00:20:00|1726212000|0.0

Check to see which dateTime your rolling total resets to zero.   It might 
be 00:00:00, it might be shortly before/after that.

On Sunday, September 22, 2024 at 12:04:38 PM UTC-7 Václav Bittmann wrote:

> Hi, 
> Due slow death of my old weather station ( Lacrosse WS2-550, monitored and 
> saved for 14 years with Weather Display ) and death of dedicated laptop 
> (very similar age) running Weather Display,  I'm trying to move to new 
> weather station (DYI Based ) and to weewx. 
>
> I made weewx 5.1 working over weekend (connected by MQTTSubscriber/Driver 
> to my weather station), but I have failed with importing of historical 
> data. WD Import in documentation (
> https://weewx.com/docs/5.1/utilities/weectl-import-wd/#mapping-data-to-archive-fields)
>  
> maps log file field *rainlastmin* to weewx field *rain*. Unfortunatelly, 
> this field is 0.0 in my log files and only accumulated *dailyrain* log 
> field is properly populated.  I tried to map field *dailyrain *with units 
> *mm*  and reimport (no errors during import), but it seems that weewx 
> field rain expects really delta in particular minute. I have checked it on 
> 1.1.2024, where 0.3mm rain happened on 19:57.  I checked base records, and 
> between record 1187 and 1425 (last minute of day) is in database stored 
> value 0.03, so import works, but NOAA report ( and archive_day_rain table)  
> shows total rain value for day 7.17. After some investigation, I found that 
> 7.17 is close to (1425-1187)*0.03
> I have changed all units to METRIC ( for me easier to calculate than US 
> units) , generated new database before running import. 
> My main questions/issues :
> Any idea, how to fix import ? 
>
> Is really weewx rain field expected to be *rain delta* from last period 
> (I need to adjust code of my Weather station to provide this form of data)  
> ?
>
> Thanks, Vaclav
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8ccd9be3-ff50-4072-865e-b3df3c397887n%40googlegroups.com.

Reply via email to