On Saturday, 30 September 2023 at 13:25:10 UTC+10 [email protected] 
wrote:

>From restx.py:
        'dayRain': 'dailyrainin=%.2f',

So the daily rain amount sent to WU is from the value 'dayRain'.  Since 
this is not a database observation type, if I add a 'dayRain' field to the 
database will restx.py use that instead?


I guess this is the dayRain reference  you mentioned in your other post. 
The problem with digging into the code is that you need to read it in its 
entirety, in this case, earlier on in restx.py you will find a comment 
<https://github.com/weewx/weewx/blob/master/bin/weewx/restx.py#L254> that 
mentions dayRain. In my response to your other post I mentioned that some 
drivers pass on a field dayRain to WeeWX, the dayRain entry/code you found 
in restx.py will make use of the current dayRain field if it is available, 
if it is not available WeeWX will calculate the value from the rain data in 
the database. Remember, WeeWX (generally) makes all fields received from 
the driver available in the current archive record, this is irrespective of 
whether the fields exist in the database. So if the driver passes through 
dayRain, dayRain will appear in the current archive record irrespective of 
whether dayRain is in the database schema. The same thing will happen if 
dayRain is in the database schema, but in this case dayRain is also saved 
to database.

To answer your question more succinctly, if you add dayRain to the database 
restx.py will use it, but not because you added it to the database, rather 
because your station/driver passes the value to WeeWX. If the dayRain field 
is not passed to WeeWX by the station/driver WeeWX will calculate the value 
separately.

Gary

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/73847815-5a5e-42cb-9c58-c281cf3bd627n%40googlegroups.com.

Reply via email to