Love this idea. I previously hacked the CSV plug in to take the loop data 
and make an XML file, but one could easily do JSON.

I'm wondering if there would be a way to do either:

Defined generator for loop data that can be run at a user defined interval 
(so one can determine how realtime is realtime enough) with the ability to 
customize the tags/index name and write out a file of ones choosing - txt, 
json, csv, xml 

or 

the same, minus the write, but then feed it to a RESTful service beyond the 
currently defined services.

I am using weewx to take weather station data from several sensors and then 
feeding it to a home automation system to run a greenhouse. This currently 
works by writing an XML file every two seconds (how often the loop data 
comes it) and having the home automation server run a script once per 
minute to parse the data. The automation system could just as easily be 
accessed by its RESTful interface if there was an easy way to do so 
directly from Weewx. I'm sure any number of other users would appreciate 
the implications of being able to send near real time data from weewx to 
nearly any webservice. I'm a total hack as a programer, but could help on 
the what one would want to do and why. 

-Geoff

On Sunday, January 8, 2017 at 2:06:20 PM UTC-8, Darryn Capes-Davis wrote:
>
> Good thoughts all. 
>
> Speaking in Use Cases
>
> Use Case 1: Realtime JSON data
>
> I had not thought about realtime data. Makes good sense to wish to do so. 
> I am thinking that we already have the restful services. An option would be 
> build a small restful end point to live on web server and the use new 
> restful service to push json data. I am happy wIth weather underground and 
> its apps, so realtime is not a priority for me.
>
> Use Case 2: Archve reporting and graphing
>
> What I was after is a way to have archve data transferred to a server, 
> also probably with chart config information, to make the client graphing 
> much richer. You would have a bunch of JSON data files that somewhat mirror 
> the plots currently generated. Also some config for each (colours etc) that 
> would get transferred to the server. Client script would basically load a 
> rich chart for each data set and config. Overnight I was thinking that if 
> written correctly, you should be able to take a skin, replace 
> [ImageGenerator] section title with [HighchartsGenerator] (or something) 
> and have no other skin.conf change.
>
> I hope that explains better what I want to achieve and the use Case.
>
> Off to work now. :-)
>
> Cheers
>
> Darryn
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
>
> ------------------------------
> *From:* [email protected] <javascript:> <
> [email protected] <javascript:>> on behalf of mwall <
> [email protected] <javascript:>>
> *Sent:* Monday, January 9, 2017 12:53:56 AM
> *To:* weewx-development
> *Cc:* [email protected] <javascript:>
> *Subject:* Re: [weewx-development] Re: Json data for Graphing 
>  
> On Sunday, January 8, 2017 at 8:42:48 AM UTC-5, Tom Keffer wrote: 
>>
>> Alternatively, make a "loop report engine," analogous to the present 
>> archive report engine. Or, adapt the existing report engine so it can work 
>> on loop data. 
>>
>> This would be the more general solution.
>>
>
> agreed.  a loop report engine would make it much easier to emit 
> realtime.txt, customraw.txt, realtime.xml, csv loop data, csv json data.
>
> you could have a simple engine that uses cheetah
>
> then you could have a realtime.txt.tmpl that would work with either 
> cheetahgenerator for archive data or the loopreportengine for loop data
>
> hey gary, are you up for this?  you don't have anything else on your 
> plate, do you? ;)
>
> m
>

Reply via email to