Weather Underground - sporadic problems

51 views
Skip to first unread message

thisismatt

unread,
Aug 29, 2020, 3:42:55 AM8/29/20
to pywws
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:31:urllib3.connectionpool:Starting new HTTPS connection (1): weatherstation.wunderground.com:443
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!

Jim Easterbrook

unread,
Aug 29, 2020, 4:47:59 AM8/29/20
to py...@googlegroups.com
On 29/08/2020 08:42, thisismatt wrote:
>
> 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.

It takes a few days for a new station to be added to their list. They
check your data for sanity.

> So I've checked the status of live logging and this is what I've just seen -
>
> Aug 29 08:23:39 raspberrypi pywws-livelog[2470]:
> pywws.service.underground:http status: 401

401 means "unauthorized". As you're only getting it occasionally the
only explanation I can think of is that your credentials haven't yet
propagated to all their servers. Each time you connect you may get a
different server.

> I then thought I'd check to see what pywws is sending to WU -

I suggest you change your WU password now you've revealed it to the
world. Or not bother - what's the worst that could happen?
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

thisismatt

unread,
Aug 30, 2020, 12:49:14 PM8/30/20
to pywws
Oh well, it’s only the upload password! Didn’t see it a second time 😂

Thanks for response once more 👍

Reply all
Reply to author
Forward
0 new messages