Praveen Chandrasekaran wrote:
> Hi Glenn,
> 
> Just like how you have shift_rain can we do the same for temperature also? 

Yes.
It's all doable, just code, time, and testing.

So long as you don't get in the way of weewx doing its thing - updating,
archiving etc then you can basically do whatever you like with a well
crafted SQL string. Providing you want to put the work into it.
I'm currently up to my proverbial in jobs that need doing so I'll be of
limited assistance, plus this isn't an itch I have.

https://github.com/glennmckechnie/weewx-wxobs
is up to date and has had a few changes to it over the last couple of
months. Use it rather than any older version.

The wxobs extension runs independently of weewx. It uses weewx's database to
fetch the values required but that's all, no writes are ever involved. There
will be no access to tags, labels or other weewx report variables.
(That's not quite true, just consider wxobs as being a separate method
of access.)

Running mysql is probably the safer option if you intend running a lot
of queries. sqlite tends to baulk sometimes if you lock the database and
weewx needs it (if it's the other way around, it just means that wxobs
misses its chance and you get to try again). 
That said, the remote feature uses a duplicate sqlite database for it access
so that's one way around any possible clashes - they just can't happen.

As you note, shift_rain is the variable to follow. It controls the starting
time for the rain calculations. Duplicate that logic / use that variable
with the other values and if you get your commas and semicolons right then
it should all be golden. ?

Is it only temperature that you are wanting to change? I gather from your
brief comment elsewhere that it may have been all readings?
Changing temperature, would also require changes to Delta-T and appTemp,
if you use those fields.
You could probably just move the temps to the rain statement and that
will fetch values in sync with the rain timing. Change a few table
headers...
If it was everything then it would be a case of changing the start and
end dates/times for the main query(ies).

> The meteorological day is different in different countries and it is not 
> just for rain.

There seem to be a few variations on it, but I've never found a list
that spells out the differences.
I would assume they'll always be there too, otherwise historical data
would become less than useful.

That being said, I'm more than happy with midnight to midnight for my
PWS. It's just difficult comparing with the official records, but it
does avoid having to read the rain gauge at midnight !


-- 

Cheers
  Glenn

 rorpi - read only raspberry pi & various weewx addons
 https://github.com/glennmckechnie

Beer & Pretzels -- Breakfast of Champions.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to