Thanks a lot Richard for the script,

I can use your script to work at the following:

Because the weewx and meteotempalte databases are not on the same computer.
Either I update the meteotemplate database on the webserver remotely or I 
send the data via http to a self-written updateApi.php which will be 
derived from the meteotemplates api to store the data.
I also can use that aupdateApi to:

   1. Request for the most recent record in meteotemplates database
   2. Send a timestamp to the update api and get a true/false status when 
   such meteotemplate record exists or not.
   Or... just send all weewx records newer than a given date and let the 
   uploadApi discard info of already stored meteotemplate records.
   The latter method might be faster.

Richard, where did you put your weewx_to_meteo_zeus.php script and how (by 
whom) is it called?

Luc



On Thursday, 16 March 2017 12:48:01 UTC-3, Richard Sears wrote:
>
> You Bet - See Attached.....
>
>
>
> On Thursday, March 16, 2017 at 7:29:20 AM UTC-7, Luc Heijst wrote:
>>
>> Hi Richard,
>>
>> Can you please share with us your script to export data frrom weewx to 
>> meteotemplate? I don't like reinventing the wheel! -:)
>>
>> Luc
>>
>> On Monday, 11 April 2016 03:58:01 UTC-3, Richard Sears wrote:
>>>
>>> hank you both, it is clear to me now. I wrote a script that exports data 
>>> from weewx to meteotemplate and today was the first time it has rained 
>>> since I wrote it and no rain was showing up...now I understand why!
>>>
>>> Thanks Again
>>>
>>> On Sunday, April 10, 2016 at 11:46:46 PM UTC-7, gjr80 wrote:
>>>>
>>>> Yes, drop the 'highest'. wsum holds the running sum for the observation 
>>>> concerned. It is updated every archive period. So for archive_day_rain, 
>>>> wsum holds sum of the rain seen in all the archive records for that day. 
>>>> The dateTime values used in the archive_day_xxxx tables is the dateTime of 
>>>> midnight at the start of the day concerned. If you select the 'greatest' 
>>>> dateTime value in the table then you have today's rainfall since midnight. 
>>>> If you select some other dateTime then you have the total rainfall for the 
>>>> day that started at dateTime. wsum for archive_day_rain is useful as it 
>>>> is, 
>>>> but wsum for say archive_day_outTemp usually requires something like count 
>>>> to work out an average outTemp for the day etc (ie wsum for outTemp is a 
>>>> fairlly meaningless number by itself).
>>>>
>>>> Gary
>>>>
>>>> On Monday, 11 April 2016 15:54:49 UTC+10, Richard Sears wrote:
>>>>>
>>>>> humm...maybe I should not say highest, but instead this would give me 
>>>>> the total daily rainfall since midnight...
>>>>>
>>>>> On Sunday, April 10, 2016 at 10:49:16 PM UTC-7, Richard Sears wrote:
>>>>>>
>>>>>> Andrew - 
>>>>>>
>>>>>> Thanks! I got it now....
>>>>>>
>>>>>> so this would always give me the highest rainfall since midnight:
>>>>>>
>>>>>>
>>>>>> mysql> SELECT wsum FROM weemx_archive_day_rain  ORDER by dateTime 
>>>>>> DESC LIMIT 1;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Correct?
>>>>>>
>>>>>

-- 
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.

Reply via email to