Hey everyone.

I'm having a bit of a brain freeze over how to tell Weewx what units 
(metric or US) to expect when importing a temperature figure from a text 
file.
My set up uses Weewx version 3.9.2 running under Python2 (setup.py install 
method) on a Raspberry Pi 4, OS is Raspian Buster (Debian 10)

I have two data sources at the moment:
The main weather station is an Aercus Instruments Weathersleuth which is 
basically a fine offset observer. That uses the Intercepter plugin 
/home/weewx/bin/user/interceptor.py
I also have two extra sensors feeding from another pi on the network using 
the One Wire (OWFS) plugin /home/weewx/bin/user/owfs.py - these are mapped 
as extraTemp1 & 2 and report as Greenhouse and Garage temperatures.

As far as I'm aware all of those report the temperature as metric when 
polled by weewx and I don't recall having to modify anything.

What I want to do is map a third, extraTemp3, to data from a Temper USB 
temperature sensor I've got in the cupboard where the Raspberry Pi sits 
(the one running Weewx) 

All well and good, i've installed a python application which when called 
will report the temperature from the Temper.

> temper-poll

Found 1 devices

Device #0: 39.7°C 103.4°F

I'm sure I can write a bash script to run temper-poll, strip out unwanted 
data, and overwrite the result to a file in /tmp/ (such as cupboard.txt) - 
once happy I'll set up a cron for the script and then a service in 
/home/weewx/bin/user as per the 
example: https://github.com/weewx/weewx/wiki/add-sensor  - modifying as 
needed.

As per notes within weewx.conf [StdConvert] has always remained as US units.

What I can't figure out is how Weeex knows whether the incoming data, from 
any of the sensors across the system, are metric or US? is it specified 
within the service(s) themselves?
I notice further down in the example of adding an extra sensor::

That is, whatever unit system you use in pond.txt, must match the unit 
system used by the incoming record. The unit system used by the incoming 
record will be given by event.record['usUnits']

Does that mean I need to add the above to my new service?

In short:
Both Interceptor and Owfs are presenting temperature data in degrees C, but 
the Weewx [stdConvert] is untouched from default (US)
My reports are in metric, but of course that's just the reports. I could 
change it at any time without affecting the database or the incoming sensor 
data to Weewx.
Do I need to do anything to my new service in /weewx/bin/user/ to specify 
that the data is metric or US depending on what value gets presented from 
/tmp/cupboard.txt ?

I'm reluctant to just try it as I don't want incorrect data, even though 
this is just so I an easily see the temperature of the cupboard where my 
main "server" raspberry pi, router, network switch and a few other bits of 
kit reside. Ignore the alarmingly high temp as the stick is currently 
plugged directly into the pi and its a hot day here - a USB extension cable 
will give a more accurate reading of the ambient temp.

Thanks for any help and guidance and of course apologies in advance if it's 
in the instructions (I did try a search - honest!)

Regards

Ashley


-- 
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/20ca2276-ca92-4d98-aa20-9d0cc78114d9o%40googlegroups.com.

Reply via email to