Very clever, Louis! I don't like the WU protocol very much, as it breaks all kinds of rules about how to design a proper RESTful service. In particular, it uses an HTTP GET, when it should really use a POST.
-tk On Sat, Oct 27, 2018 at 6:38 AM Louis De Lange <[email protected]> wrote: > Richard, > > If you read through the restx.py file that controls all of the restx > services such wunderground uploads you will notice a number of parameters > that can be specified, such as post_interval and server_url. When you read > through the user guide you might notice that these specific parameters are > documented for use with CWOP upload, not WU - but they also work for WU > upload if you specify them in the [[Wunderground]] section of [StdRESTful] > in you weex.conf file. Another useful parameter is post_interval as it > allows you to send an upload at the intervals you want, not every time you > receive a loop packet. > > Below is an example of a [[Winderground]] config segment is use to upload > to my own remote server - and on the receiving end I use mwall's > interceptor driver to receive and decode it. > > [[Wunderground]] > # This section is for configuring posts to the Weather Underground. > > # If you wish to do this, set the option 'enable' to true, > # and specify a station (e.g., 'KORHOODR3') and password. > # To guard against parsing errors, put the password in quotes. > enable = true > station = MAKESOMETHINGUP > password = anthingIwant > > # Set the following to True to have weewx use the WU "Rapidfire" > # protocol. Not all hardware can support it. See the User's Guide. > rapidfire = true > > post_interval = 40 > log_success = false > log_failure = true > server_url = http://"insert_your_own_url_here" > max_tries = 2 > post_indoor_observations = true > > Why do this? I came up with this approach to receive loop data at my > remote cabin, and upload it to my home server running another instance of > weewx - all this to minimize the data transfer via cellular modem from the > remote site. > > Or you can just follow Tom's suggestions that was posted just before mine > :-) > > Louis > > > On Saturday, 27 October 2018 06:06:06 UTC-7, Richard wrote: >> >> I'm looking for a way to hit an url with weatherdata on the receive of >> each loop packet. >> >> If I look at the user guide, i can see the [StdRESTful] section and was >> thinking I need to configure something here. >> But I can't see a 'default' extension. Am i missing something? >> >> The rapidfire/wunderground extension sounds what I need, but only need to >> sent it to my URL instead of wunderground' :) >> >> -- > 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. > -- 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.
