Hi,
As you found log_success has no effect on the 'Data uploaded' line, this is
clearly debug type info and should be controlled by the debug config option
in weewx.conf. Unfortunately, this is not how the uploader has been coded
so debug will have no effect either. I see looking at the wiki and the
Weather365 uploader that the uploader was in fact provided by Weather365.
The correct approach would be that you contact the author (Weather365) for
support.
In the interim you can quieten the uploader by locating the following code
in weather365.py (it will be in /home/weewx/bin/user or usr/share/weewx/user
):
def process_record(self, record, dbm):
r = self.get_record(record, dbm)
data = self.get_data(r)
url = urllib.urlencode(data)
if self.skip_upload:
loginf("skipping upload")
return
req = urllib2.Request(self.server_url, url)
loginf("Data uploaded to %s is: (%s)" % (self.server_url, url))
req.get_method = lambda: 'POST'
req.add_header("User-Agent", "weewx/%s" % weewx.__version__)
self.post_with_retries(req)
and changing it to (change highlighted):
def process_record(self, record, dbm):
r = self.get_record(record, dbm)
data = self.get_data(r)
url = urllib.urlencode(data)
if self.skip_upload:
loginf("skipping upload")
return
req = urllib2.Request(self.server_url, url)
logdbg("Data uploaded to %s is: (%s)" % (self.server_url, url))
req.get_method = lambda: 'POST'
req.add_header("User-Agent", "weewx/%s" % weewx.__version__)
self.post_with_retries(req)
Save and restart WeeWX. The 'Data uploaded' line can now be controlled by
the debug config option in weewx.conf (0 will hide it, 1 will show it). To
be consistent with the other RestFUL uploaders the 'Data uploaded' line
should only be shown when debug >= 2, but that involves more substantial
changes to the code and I thought it best to keep it simple. If you do
contact Weather365 do suggest the 'Data uploaded' line should only appear
when debug >= 2.
Gary
On Thursday, 16 April 2020 02:19:41 UTC+10, Jarmo Seppänen wrote:
>
> I feel my Weather365 is too chatty outputting as below to weewx.log:
> Apr 15 19:05:16 raspi3b weewx[10087]: restx: Weather365: Data uploaded to
> https://channel1.weather365.net/stations/index.php is:
> (dew2m=3.3&datum=202004151905&humidex=5.9&uvi=0.0&radi=31.0&prec_time=60&et=0.00000&alt=167.0&t2m=5.9&long=24.984&rainh=0.00&rxsignal=100&windrun=0.1&utcstamp=1586966700&wchill=5.9&txbattery=0&winddir=22&windspeed=0.4&windgust=1.3&press=998.206&relhum=83&lat=60.396&appTemp=4.2&heat=5.9&stationid=XXXXXX&raind=3.80&rainrate=0.00&cloudbase=383.2)
>
>
>
> I have configured only failures to be logged but this uploader does not
> seem to behave.
> log_success = False
> log_failure = True
>
> My python isn’t good enough to understand if there’s something I could do
> in weather365.py to silence the uploader.
>
> Any hints I could try?
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/1fd37d97-aa2d-4b0b-ab07-48053c78d219%40googlegroups.com.