Hi there
I've been successfully uploading data to Metoffice for a few days now; I can see regular entries for my station - so very happy with that. So I thought I'd then add WU to the services..however, not such a success story!
Whilst I can see that Metoffice is receiving data, WU isn't - it shows my station as offline.
So I've checked the status of live logging and this is what I've just seen -
pi@raspberrypi:~ $ sudo service pywws status
● pywws.service - pywws weather station live logging
Loaded: loaded (/etc/systemd/system/pywws.service; static; vendor preset: enabled)
Active: active (running) since Sat 2020-08-29 08:17:26 BST; 8min ago
Main PID: 2470 (pywws-livelog)
Tasks: 4 (limit: 2065)
CGroup: /system.slice/pywws.service
└─2470 /usr/bin/python3 /usr/local/bin/pywws-livelog -v -l systemd /home/pi/weather/data
Aug 29 08:22:58 raspberrypi pywws-livelog[2470]: pywws.service.underground:2 records sent
Aug 29 08:23:39 raspberrypi pywws-livelog[2470]: pywws.service.underground:server response "success"
Aug 29 08:23:39 raspberrypi pywws-livelog[2470]: pywws.service.underground:http status: 401
Aug 29 08:24:19 raspberrypi pywws-livelog[2470]: pywws.service.underground:server response "success"
Aug 29 08:24:23 raspberrypi pywws-livelog[2470]: pywws.service.underground:http status: 401
Aug 29 08:24:23 raspberrypi pywws-livelog[2470]: pywws.service.underground:22 records sent
Aug 29 08:25:04 raspberrypi pywws-livelog[2470]: pywws.service.underground:server response "success"
Aug 29 08:25:04 raspberrypi pywws-livelog[2470]: pywws.service.underground:http status: 401
Aug 29 08:25:44 raspberrypi pywws-livelog[2470]: pywws.service.underground:server response "success"
Aug 29 08:25:45 raspberrypi pywws-livelog[2470]: pywws.service.underground:http status: 401
First question, why are there some successes and some failures?
I then thought I'd check to see what pywws is sending to WU -
pi@raspberrypi:~ $ python3 -m pywws.service.underground -vvv ~/weather/data
08:32:31:pywws.logger:pywws version 20.1.0, build 1673 (92d8868)
08:32:31:pywws.logger:Python version 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
08:32:31:__main__:data: {'dateutc': '2020-08-29 07:16:00', 'winddir': '315', 'windspeedmph': '1.57', 'windgustmph': '2.24', 'humidity': '93', 'tempf': '57.7', 'baromin': '29.5979', 'dewptf': '55.7', 'rainin': '0', 'dailyrainin': '0', 'action': 'updateraw', 'softwaretype': 'pywws', 'ID': 'IBECCL6', 'PASSWORD': 'SnzzdM8q'}
08:32:31:__main__:thread started Thread-1
08:32:31:__main__:stopping thread Thread-1
08:32:31:pywws.storage:waiting for thread Thread-1
08:32:32:urllib3.connectionpool:
https://weatherstation.wunderground.com:443 "GET /weatherstation/updateweatherstation.php?dateutc=2020-08-29+07%3A16%3A00&winddir=315&windspeedmph=1.57&windgustmph=2.24&humidity=93&tempf=57.7&baromin=29.5979&dewptf=55.7&rainin=0&dailyrainin=0&action=updateraw&softwaretype=pywws&ID=IBECCL6&PASSWORD=xxxxxxxxx HTTP/1.1" 401 13
08:32:32:__main__:http status: 401
08:32:32:pywws.storage:flushing
And now I've drawn a blank! Clearly pywws *can* connect as I've had successes, but it doesn't always work. Why? What's causing this?
Can anyone help with this one? Thanks!