wunderground.sh problems

150 views
Skip to first unread message

Bob Mertz

unread,
Sep 6, 2012, 8:07:23 PM9/6/12
to fo...@googlegroups.com
Hello,
I am working on a new installation and I'm having some issues with reporting to weather underground.  This is Debian 6.0 machine with kernel 2.6.32-5-686. So far I have fowsr communicating with the USB device as I can run fowsr -d and get the current information and I can also use the xml script and/or fowsr -x and it also seems that pywws and PWS formats work fine but the wunderground doesn't seem to work.

I found that the use of the wunderground.sh script will act differently if fowsr.dat does not exist.  If I delete fowsr.dat and run the wunderground.sh script then I will get get a valid /var/wunderground.log file and the script goes into an endless loop of wget sessions trying to post to weather underground.  Once a fowsr.dat file is created I will no longer get a valid wunderground.log file but, instead, get just an empty file.  

The weird thing is that all of the other formats seem to work fine no matter whether fowsr.dat is there or not.

Does anyone have an idea of where to even start looking regarding this?

Thanks!
Bob

Bob Mertz

unread,
Sep 6, 2012, 11:06:47 PM9/6/12
to fo...@googlegroups.com
So I found out that I was using the wrong username and password.... actually, the fowsr website says to use your username and password but you actually need to your your station ID and password.  After correcting that I can upload to weather underground but I do still have the issue of after the dat file exists it doesn't reliably work.  I have actually seen a couple times where it will work but 90% of the time it will fail if the .dat file exists.  Any idea on why this would be?

Doug

unread,
Sep 6, 2012, 11:44:15 PM9/6/12
to fo...@googlegroups.com
Bob,

  I am successfully updating wunderground (KNJNORTH13)

One thing you need to do is set the update time which defaults to 30 minutes in the WS2080 to 5 minutes. You need to either do this on the console or much easier use the windows software to do the setups one time and be done.

I did change the place where the logs go by changing that in the source. I detailed that in an earlier message. I don't think that would have anything to do with it.

Unfortunately you have to search around for stuff and like you found the station ID and wunderground login password are what you use.

Also the wget in the shell script directs output to /dev/null.  I redirected that to a log file - /var/log/fowsr/fowsr.out
What that returns is the answer from wunderground as to success in transmitting the data. That is how I discovered why my pwsweather updates were not working.  I also detailed the changes I made in the source regarding that in an earlier message. For some reason one of the format strings was not working correctly on my system.


Doug
 


From: Bob Mertz <bibl...@gmail.com>
To: fo...@googlegroups.com
Sent: Thursday, September 6, 2012 11:06 PM
Subject: Re: wunderground.sh problems

Bob Mertz

unread,
Sep 7, 2012, 12:41:34 AM9/7/12
to fo...@googlegroups.com, Doug
The on unique situation for me is that the weather station is one that I got my dad for father's day and he lives in PA while I am in VA so I am actually configuring things via SSH :)  I, nor my dad, have Windows on any computer so that's not an option but I can see if he can change it from the console it's self.  Will this actually make a difference with this problem and, if so, any idea why?  I'm not having any issues with posting to weather underground and the points where it fails if fowsr.dat exists is before it even gets to the point where it starts wget.  Here is the output:

root@media:~# wunderground.sh KPANEWAL2 *password*
0805D800 | B1 79 49 50 __ __ __ __ __ __ __ __ __ __ __ __ | �yIP
usb_set_debug: Setting debugging level to 255 (on)
usb_os_find_busses: Found 005
usb_os_find_busses: Found 004
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 005
usb_os_find_devices: Found 002 on 004
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 004
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 001 on 001
USB error: could not get bound driver: No data available
usb_get_driver_np returned -61
0805D804 | 11 7A 49 50 __ __ __ __ __ __ __ __ __ __ __ __ | .zIP
failed to release interface: 0
failed to close interface: 0
root@media:~# 


For right now I have cron running a script called wuupdate every 2 mins which deletes the fowsr.dat file and then executes wunderground.sh

Thanks!

Doug

unread,
Sep 7, 2012, 1:24:51 AM9/7/12
to fo...@googlegroups.com
The code only sends updates if data has changed. If console update  is set to 30 minutes and you are doing "cron set" 5 minute updates it will not send any data until the 30 minute interval. I didn't realize this at first and I believe I saw the same thing you are seeing. Then I dug into the wiki  and saw the procedure to set the interval. Once I changed the console update interval to 5 minutes and did 5 minute cron updates all was well.

Deleting the data file makes it think it is a new update as it has no historical data when you delete the file so it makes a new log file with data. 

Doug

Cc: Doug <dsc...@yahoo.com>
Sent: Friday, September 7, 2012 12:41 AM
Subject: Re: wunderground.sh problems

Bob Mertz

unread,
Sep 7, 2012, 1:35:26 AM9/7/12
to fo...@googlegroups.com, Doug
Ok, that makes a lot of sense then!  Is 5 mins the shortest span that it can be set for?  Also, looking at the manual it only shows how to change the archive interval via the windows software which is pretty frustrating.  If I knew this weather station was so reliant on windows I would have bought a different one for him.  I sent Ambient Weather an email to see if they could tell me how to set it from the console.  I'm really hoping they have a way of doing that since my entire family uses either OSX or Linux and has no access to a Windows machine.

With me doing the updates like I am now weather underground is showing updates every 2 mins but are these actual updates or is it just sending the same data every 2 mins within the 30 mins interval?

Thanks for all of your help!

Doug

unread,
Sep 7, 2012, 2:05:12 AM9/7/12
to fo...@googlegroups.com
Bob,

  I am not sure if you can set it in the console. If you bought it at Ambient Weather they have great phone support. You could always ask a friend with windows if you could set it on there system. The software installs quickly. You could install it, change the parameters you want, and uninstall it in 5 minutes! Maybe you should install wine!

Don't get bummed out about the need to set it on windows if that is the case. It is a one time setting. The system is pretty good for the money. I doubt you would find anything else in that price range any better.

The settings on the console are rather cumbersome to make. You basically have to go through the entire settings, skiping each one you don't want to set to get to the next one. So much easier to do it using the program.

I am not sure exactly how the update works. I would have to study the source code. I think that wunderground might assume an update if you successfully connect and no data is actually sent. Not sure about that but you would have an empty wunderground log file so it really can't be sending anything. I assume you are not seeing anything change until the 30 minutes lapse?

Until you get the console update time corrected you could just set your cron update to 30 minutes to match. They each update should show valid data.

Doug
 


From: Bob Mertz <bibl...@gmail.com>
To: fo...@googlegroups.com
Cc: Doug <dsc...@yahoo.com>
Sent: Friday, September 7, 2012 1:35 AM
Subject: Re: wunderground.sh problems

Gerry

unread,
Sep 7, 2012, 9:42:49 AM9/7/12
to fo...@googlegroups.com
Bob,
2 things:
pywws has the ability to set the update interval.
http://pywws.googlecode.com/svn/trunk/doc/html/api/SetWeatherStation.html
(I don't have any Microsoft software)

I haven't tried pywws lately because they went off into hidapi and libusb1.0
land and it became difficult to get working. You may have better luck.

And it may bear repeating that the output you sent to the list "demonstrating"
the non-send did not contain anything other than normal output from fowsr.

Gerry

On Thu, 6 Sep 2012, Doug wrote:

> Bob,
>
>   I am not sure if you can set it in the console. If you bought it at
> Ambient Weather they have great phone support. You could always ask a
> friend with windows if you could set it on there system. The software
> installs quickly. You could install it, change the parameters you want,
> and uninstall it in 5 minutes! Maybe you should install wine!
>
> Don't get bummed out about the need to set it on windows if that is the
> case. It is a one time setting. The system is pretty good for the money. I
> doubt you would find anything else in that price range any better.
>
> The settings on the console are rather cumbersome to make. You basically
> have to go through the entire settings, skiping each one you don't want to
> set to get to the next one. So much easier to do it using the program.
>
> I am not sure exactly how the update works. I would have to study the
> source code. I think that wunderground might assume an update if you
> successfully connect and no data is actually sent. Not sure about that but
> you would have an empty wunderground log file so it really can't be
> sending anything. I assume you are not seeing anything change until the 30
> minutes lapse?
>
> Until you get the console update time corrected you could just set your
> cron update to 30 minutes to match. They each update should show valid
> data.
>
> Doug
>  
>
> __________________________________________________________________________
> __________________________________________________________________________
> From: Bob Mertz <bibl...@gmail.com>
> To: fo...@googlegroups.com
> Cc: Doug <dsc...@yahoo.com>
> Sent: Friday, September 7, 2012 12:41 AM
> Subject: Re: wunderground.sh problems
>
> The on unique situation for me is that the weather
> station is one that I got my dad for father's day and he
> lives in PA while I am in VA so I am actually
> configuring things via SSH :)  I, nor my dad, have
> Windows on any computer so that's not an option but I
> can see if he can change it from the console it's self.
>  Will this actually make a difference with this problem
> and, if so, any idea why?  I'm not having any issues
> with posting to weather underground and the points where
> it fails if fowsr.dat exists is before it even gets to
> the point where it starts wget.  Here is the output:
> root@media:~# wunderground.sh KPANEWAL2 *password*
> 0805D800 | B1 79 49 50 __ __ __ __ __ __ __ __ __ __ __
> __ | ???yIP
> __________________________________________________________________________
> From: Bob Mertz <bibl...@gmail.com>
> To: fo...@googlegroups.com
> Sent: Thursday, September 6, 2012
> 11:06 PM
> Subject: Re: wunderground.sh problems
>
> So I found out that I was using the wrong
> username and password.... actually, the
> fowsr website says to use your username and
> password but you actually need to your your
> station ID and password.  After correcting
> that I can upload to weather underground but
> I do still have the issue of after the dat
> file exists it doesn't reliably work.  I
> have actually seen a couple times where it
> will work but 90% of the time it will fail
> if the .dat file exists.  Any idea on why
> this would be?
>
> On Thursday, September 6, 2012 8:07:23 PM
> UTC-4, Bob Mertz wrote:
> Hello,I am working on a new
--
Gerry Skerbitz
gs...@skerbitz.org

Bob Mertz

unread,
Nov 9, 2012, 11:55:50 PM11/9/12
to fo...@googlegroups.com, gs...@skerbitz.org

So just to revisit this and post where I'm at, I did get pywws working and it worked ok for a while but for some reason it keeps wanting to crash and the weather station then stops responding until I have my dad do a complete reset of the station....  Just today I switched back to using fowsr which is possible since I can actually use the SetWeatherStation.py command in pywws to set the read interval to 2 mins.  I now have wunderground.sh running from cron every 2 mins and so far it seems to be working.   I'll need to give it a few days to see if the USB interface gets confused again and force us to do a complete reset again.

And yes, I was aware of what I posted above being normal output.  At the time I wasn't aware of the 30 min default interval.

Also, just as an additional note, I contacted Ambient Weather and they confirmed that there is no way to set the read interval from the console.  You do need to use either the windows software or install pywws in order to use the SetWeatherStation.py command.
Reply all
Reply to author
Forward
0 new messages