On Thursday, March 9, 2017 at 2:14:32 AM UTC+13, mwall wrote:
>
> On Tuesday, March 7, 2017 at 11:36:53 PM UTC-5, Ian Boag wrote:
>>
>> Not sure where to start - the obvious place is the fousb.py driver and 
>> have it go to a file with the downloaded query in it (instead of talking to 
>> the station). I can read the numbers etc. I assume that fousb.py just 
>> returns the values from the station .... and would return them from a file 
>> instead.  I can do the python for the JSON query and 
>> extraction/reformatting etc.
>>
>
> consider these options:
>
> 1) write your own driver.  this driver would query the weather station.  
> run one instance of weewx using this driver, and another instance of weewx 
> with your existing configuration, resulting in two databases.  integrate 
> the data from both instances in a combined report.
>
> 2) write a service.  this service would query the weather station and add 
> its data to whatever data you are currently getting.  if the data overlap 
> (e.g., both stations report windSpeed) then you will have to extend the 
> database schema.
>
> option (1) will be much easier to write and maintain.
>
> what kind of hardware is the commercial grade weather station?
>
> how do you communicate with it?
>
>
> ===================================================================================
>

I possibly haven't been as clear as I might have been

This Pi/camera setup has no physical WS attached, so there are no "real 
local" readings.  The commercial WS has its own web posting setup and 
generates a JSON file from logging in with /&cmd=json on the end of the 
URL.  Using a bit of Python screen scrape stuff gets that into the Pi.I 
know the guys that make and install them for the NZ Rural Fire Service.  
They have quite a few at airfields because airfields are a convenient place 
to put them.  They are quite happy for me to scrape the data and re-post in 
a more pilot-friendly form. 

I can write a Python job that runs as a cron and loads these values into a 
file for weewx to pick up ....

Then I just want to poke those numbers into the weewx system so they look 
like the values that would have been read from a "local" station.  No need 
for two instances or merging dbs etc.  I guess if I wrote a new driver the 
logical place to start would be to either clone the simulator ... or maybe 
hijack the driver call (in engine.py?). 

    I'm not good enough at  OOP Python to make a lot of sense out of the 
simulator driver ....   

Reply via email to