Hi, thx for the response.I must be overlooking something, as the rainrate becomes zero. I took just one day, January 12, 2023. Below what I did:
1. Stop weewx: /etc/init.d/weewx stop
2. Set rainrate to NULL for 12-01-2023
SQL: update archive set rainrate = NULL where date_format(from_unixtime(dateTime), '%d-%m-%Y') LIKE '12-01-2023';
3. Check for NULL (just a snippet) from 12-01-2023
SQL: select date_format(from_unixtime(dateTime), '%d-%m-%Y %H:%i') as datumtijd, round(rain,1) as rain,round(rainrate,1) as rainrate from archive where rain > 0 and date_format(from_unixtime(dateTime), '%d-%m-%Y') LIKE '12-01
-2023';
+------------------+------+----------+
| datumtijd | rain | rainrate |
+------------------+------+----------+
| 12-01-2023 00:18 | 0.2 | NULL |
| 12-01-2023 11:07 | 0.2 | NULL |
| 12-01-2023 11:58 | 1.0 | NULL |
| 12-01-2023 12:00 | 0.5 | NULL |
| 12-01-2023 12:01 | 0.5 | NULL |
| 12-01-2023 12:02 | 0.5 | NULL |
| 12-01-2023 12:03 | 0.5 | NULL |
<snip>
4. Run wee_database --calc-missing --date=2023-01-12
Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database 'archive_mysql'
Missing derived observations will be calculated from 2023-01-12 00:00:01 CET (1673478001) through to 2023-01-13 00:00:00 CET (1673564400) inclusive.
Proceed (y/n)? y
Calculating missing derived observations...
Type beaufort has been deprecated. Use unit beaufort instead.
Processing record: 1440; Last record: 2023-01-13 00:00:00 CET (1673564400)
Recalculating daily summaries...
Records processed: 1000; time: 2023-01-12 16:40:00 CET (1673538000)
Finished recalculating daily summaries
Missing derived observations calculated in 1.33 seconds
5. Check for rainrate
SQL: select date_format(from_unixtime(dateTime), '%d-%m-%Y %H:%i') as datumtijd, round(rain,1) as rain,round(rainrate,1) as rainrate from archive where rain > 0 and date_format(from_unixtime(dateTime), '%d-%m-%Y') LIKE '12-01-2023';
+------------------+------+----------+
| datumtijd | rain | rainrate |
+------------------+------+----------+
| 12-01-2023 00:18 | 0.2 | 0.0 |
| 12-01-2023 11:07 | 0.2 | 0.0 |
| 12-01-2023 11:58 | 1.0 | 0.0 |
| 12-01-2023 12:00 | 0.5 | 0.0 |
| 12-01-2023 12:01 | 0.5 | 0.0 |
| 12-01-2023 12:02 | 0.5 | 0.0 |
| 12-01-2023 12:03 | 0.5 | 0.0 |
| 12-01-2023 12:04 | 0.5 | 0.0 |
| 12-01-2023 12:05 | 0.5 | 0.0 |
| 12-01-2023 12:06 | 0.5 | 0.0 |
| 12-01-2023 12:07 | 0.5 | 0.0 |
| 12-01-2023 12:08 | 0.5 | 0.0 |
| 12-01-2023 12:09 | 0.5 | 0.0 |
| 12-01-2023 12:10 | 0.5 | 0.0 |
| 12-01-2023 12:11 | 0.5 | 0.0 |
| 12-01-2023 12:12 | 0.5 | 0.0 |
| 12-01-2023 12:13 | 0.5 | 0.0 |
What am I overlooking/missing?
Op zaterdag 14 januari 2023 om 23:17:09 UTC+1 schreef gjr80: