Wunderfixer (Development Version)

140 views
Skip to first unread message

Richard G

unread,
Feb 9, 2020, 12:39:54 PM2/9/20
to weewx-user
I had an outage of a week where no data was uploaded to wunderground. I discovered all the posts about the change of API etc. so pulled down the development branch. This version with the api_key allowed me to fix data on partial days i.e. when there was some data but on days where there is no data at all then it fails

Using database binding 'wx_binding', which is bound to database 'archive_sqlite'

Weather Underground Station:   INORFOLK**

Date to check:                 2020-02-07

Number of archive records:     288

Could not get Weather Underground data.

Reason: Probably a bad station ID or invalid date

Exiting.


The message "could not get Weather Underground data" is correct as there isn't any for that day, but it then needs to upload so there is. Looks like a bug but I thought I would check before reporting.

Thanks


Richard

Leon Shaner

unread,
Feb 9, 2020, 1:19:00 PM2/9/20
to weewx...@googlegroups.com
Richard,
It was a long thread.  Here is my workaround for the 204 response when the request is valid, but there are no records to return:

$ diff wunderfixer wunderfixer_tk
407,409c407
<                 # Valid response, it's just that WU has no records for the requested date
<                 # Return an empty list of TimeStamps (as in WU has no records)
<                 return {}
---
>                 raise IOError("Probably a bad station ID or invalid date")

Or if the line numbers don't match yours, it looks like this in context:

        if hasattr(response, 'code') and response.code != 200:
            if response.code == 204:
                # Valid response, it's just that WU has no records for the requested date
                # Return an empty list of TimeStamps (as in WU has no records)
                return {}
            else:
                raise IOError("Bad response code returned: %d" % response.code)

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPhone)

On Feb 9, 2020, at 12:40 PM, Richard G <richar...@gmail.com> wrote:


--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/04c6f04e-502a-40a2-ad9d-62a4fad5a8b5%40googlegroups.com.

iain MacDonnell

unread,
Feb 9, 2020, 2:39:27 PM2/9/20
to weewx-user
Workaround works for me (thanks!). Is there an open issue for this?

~iain

Richard G

unread,
Feb 9, 2020, 4:02:21 PM2/9/20
to weewx-user

Worked for me thanks.

Richard
Richard,
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Ernest Jillson

unread,
Feb 9, 2020, 9:59:00 PM2/9/20
to weewx-user
It "looks" like it's working for me, but doesn't.  I get this message:
 
"No results returned from Weather Underground (perhaps a bad station name??).
Publishing anyway."
 
It then proceeds to upload all my 5 minute obs.  Only thing is, they never show up on wunderground.

p q

unread,
Feb 9, 2020, 10:36:02 PM2/9/20
to weewx...@googlegroups.com
Is this one of those Python 2 vs Python 3 unicode/byte string issues? Is there anyway to tell what it's sending? 

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/30ac8208-34d8-4b47-a8ac-636151c794c2%40googlegroups.com.


--
Peter Quinn
(415)794-2264

Richard G

unread,
Feb 10, 2020, 2:02:28 AM2/10/20
to weewx-user
Having now checked wunderground some of the days worked others didn’t so there’s still an issue. Can’t work out what the difference is on the days it worked....

Richard

Leon Shaner

unread,
Feb 10, 2020, 9:35:34 AM2/10/20
to weewx...@googlegroups.com
Hey, Ernest.

If you check after some time has passed are the records there?
There is always a "lag" between the time the records are uploaded and when they appear.
Also, be sure to check via the WU web portal and not some app like WunderStation (which they've deprecated).

Anyway, the wunderfixer is doing its job.  What happens on the WU side is subject to their many bugs and infrastructure issues.  :-/

Regards,
\Leon
--
Leon Shaner :: Dearborn, Michigan (iPad)

On Feb 9, 2020, at 9:59 PM, Ernest Jillson <etji...@gmail.com> wrote:


To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/30ac8208-34d8-4b47-a8ac-636151c794c2%40googlegroups.com.

Ernest Jillson

unread,
Feb 10, 2020, 9:50:15 AM2/10/20
to weewx-user
Checking here: https://www.wunderground.com/dashboard/pws/KFLRIVER11/graph/2020-01-29/2020-01-29/daily
 
I pulled the weewx 4.0.0b11 down and used the wunderfixer from the bin folder.  My commands, minus my api key, were:
 
cd /home/pi/weewx4/weewx-4.0.0b11/bin
./wunderfixer /etc/weewx/weewx.conf --api-key="my_api_key" --date=2020-01-29
 
I applied the logic fix to get around the "204" error code. It definitely *thinks* it's sending the data. Lists every 5 minute observation and says "...published." after each one.  I've done this three times or more over the last few days, so it's not a lag issue.
 
It's looking like it may well be a WU problem that I'll just have to live with.  
 
Thanks for all your help.
Hey, Ernest.

Thomas Keffer

unread,
Feb 10, 2020, 11:38:31 AM2/10/20
to weewx-user
Could you try the present version of wunderfixer? I just patched it this morning.

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/31bc61de-9a1f-4fca-871f-6644f3717577%40googlegroups.com.

Ernest Jillson

unread,
Feb 10, 2020, 2:28:33 PM2/10/20
to weewx-user
I grabbed the latest wunderfixer updated 2 hours ago. I just ran it, and as before, it says it's doing everything it's supposed to do. So far, after 5 minutes, nothing on weather underground. I'll keep checking.
 

Thomas Keffer

unread,
Feb 10, 2020, 5:01:55 PM2/10/20
to weewx-user
That doesn't surprise me. Unfortunately, there is really nothing we can do about it. 😕

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/30ddf3f5-81c9-4f65-9a0a-8665d23c0a3a%40googlegroups.com.

Ernest Jillson

unread,
Feb 10, 2020, 9:04:52 PM2/10/20
to weewx...@googlegroups.com
Nope. Not your fault. Does it pull the URL from the weewx.conf?  I know I put those back to the original after weather underground gave up (for now) on their re-organization.


Thomas Keffer

unread,
Feb 10, 2020, 9:13:32 PM2/10/20
to weewx-user
No. The URL to get existing data is hardwired in wunderfixer, the URL to post new data is hardwired in weewx/restx.py.

-tk

Reply all
Reply to author
Forward
0 new messages