On Thursday, November 16, 2017 at 4:06:03 PM UTC-8, mwall wrote:
>
>
>
> On Thursday, November 16, 2017 at 6:03:18 PM UTC-5, iain MacDonnell wrote:
>>
>>
>> Hi,
>>
>> I started using weeWX about a month ago, on a RaspberryPi, to rapid-fire 
>> from my Vantage Pro2 to Wunderground. I'd previously been using meteohub. 
>> It had been working great, so I mostly forgot about it. Today, I went to 
>> look at my dashboard on Wunderground, and it was not there! It said that I 
>> had not been reporting since yesterday. I restarted the 'weewx' service, 
>> and it started reporting again. I used wunderfixer to fill in the missing 
>> data (nice). It appears it stopped reporting due to this:
>>
>> Nov 15 09:12:17 raspberrypi weewx[3376]: restx: Wunderground-RF: 
>> Unexpected exception of type <class 'httplib.InvalidURL'>
>> Nov 15 09:12:17 raspberrypi weewx[3376]: restx: Wunderground-RF: Thread 
>> exiting. Reason: nonnumeric port: '80index.asp'
>>
>>
>> Seems that that could be considered a transient failure, and it should 
>> have been able to keep trying to recover without needing my intervention?
>>
>
> that is odd.  we could modify the wu uploader so that it handles 
> InvalidURL exceptions, but typically that is something that would happen on 
> the first attempt to upload, not randomly after weewx has been running 
> awhile.
>
> it would be nice if we could figure out the root cause that fed it a port 
> of '80index.asp' instead of simply '80'
>

Agreed, although it'd be difficult to do after the fact. I'm guessing that 
it was some temporary glitch at WU (typo in their code or config) that was, 
perhaps, missing a '/' an an embedded URL somewhere, and it got fixed on 
their side.

 

> apt says I'm already at the latest version (3.7.1-1).
>>
>> In lieu of automatic recovery, is there a good way to detect that the 
>> reporting thread has stopped (other than log monitoring)? Perhaps a cron 
>> job to check and alert me if it breaks would be appropriate. I suppose I 
>> could look for a way to query wunderground for my last upload...
>>
>
> we don't have a generic way to monitor upload status from the weewx side 
> of things.  usually we depend on the upload destination to let you know if 
> there are any problems.
>
> maybe you could come up with a generic way to track the last status of any 
> restful uploader - a status file on disk written by each uploader, a weewx 
> service that maintains "last upload" state, etc.
>

Seems like something that could be recorded in the (local) database. I'll 
try to find some time to poke around in the code and see if it looks 
feasible.

 

> it does not provide immediate notification, but logwatch might help.  i 
> use logwatch to send a daily email from each computer to a 'system 
> administrator' account. that provides a pretty detailed history of what 
> things were doing.  a set of sieve rules at the mail server isolates the 
> logwatch mails from the ups, security, cron, and other types of system 
> administrator mails.  that makes it easy to browse with any imap client, 
> any time, to figure out when a problem happened and to see what led to it.
>
> look in the 'util/logwatch' directory in the weewx distribution.  since 
> you installed from deb, its even easier - just symlink to the logwatch 
> files that the installer put in /etc/weewx.  see the weewx logwatch wiki 
> page for details.
>
> https://github.com/weewx/weewx/wiki/logwatch
>
 
Yeah, I could do something like that, but one problem with log skimming is 
that you sortof have to know what's going to go wrong (what to look for in 
the log) before it happens.

I'm looking at 
"https://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=xxx&format=1";
 
as a possible way of checking for recent upload. It seems there ought to be 
something easier to parse (JSON would be nice), but I'm finding WU's API 
docs to be a bit ... challenging :/

Thanks,

    ~iain

-- 
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.

Reply via email to