Michael,
Sorry, busy few days.
And as far as I can see it worked(ish).
>
Looking at the output it looks like it is working, what is in the static
wxdata.txt file is appearing in the archive record in the output. So we
know your service works fine. The only other variable is the code that
generates wxdata.txt. So once you are on top of that it should be fine.
I am a little confused as to whether I really need to have rainRate?.
>
There are two fundamental ways to handle rainRate; either get it from the
hardware (if it's capable) or calculate it. I suspect that your hardware
does not natively provide rainRate, you could include the calculation in
your service or have weewx calculate it. weewx already has the ability to
calculate rainRate in the StdWXCalculate service. In a nutshell, if rainRate
is not present StdWXCalculate will calculate it and add it to the loop
packet or archive record. I would suspect you would be better off using
weewx; you simplify your code and would be using a standard way of
calculating rainRate. To have weewx take care of rainRate you need to set
the rainRate setting in [StdWXCalculate] in weewx.conf as follows:
[StdWXCalculate]
# Derived quantities are calculated by this service. Possible values
are:
# hardware - use the value provided by hardware
# software - use the value calculated by weewx
# prefer_hardware - use value provide by hardware if available,
# otherwise use value calculated by weewx
pressure = prefer_hardware
barometer = prefer_hardware
altimeter = prefer_hardware
windchill = prefer_hardware
heatindex = prefer_hardware
dewpoint = prefer_hardware
inDewpoint = prefer_hardware
rainRate = software
If it was me I would be letting weewx handle it all, ie follow the KISS
principle.
If you think what I have done is OK, I move on and try to work on the
> Maplin wind sensors I have just purchased, and start searh this group for
> help.
>
As mentioned above, I guess you would want to get a dynamic wxdat.txt
working.
One other thought (and probably one for down the track when you are able to
talk to all your sensors) but you probably would be well served by
consolidating your code into a driver rather than a service as you have
now. For example, at the moment you are running the simulator driver, a
service to add data from your grovepi data file and another piece of code
to generate the grovepi data file. It works, you are learning - that is
fine. You really should be able to distil this down to a driver (I know you
posted about this before, I think) or at the very least down to just
something like the fileparse driver and the code to generate the grovepi
output file. Some food for thought.
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].
For more options, visit https://groups.google.com/d/optout.