[arm-allstar] replacement script ---was: Weather.sh not working
David McGough
kb4fxc at inttek.net
Sun Nov 19 13:40:48 EST 2023
Hi Everyone,
Yes, something is currently flaky with the Accuweather RSS API. The
problem is with bad data coming from them, not the weather.sh script, per
se. Doing to goog'ling, (actually duck-duck-go), some comments are that
this Accuweather is no longer supporting this API and that it's
deprecated???? I'm not sure about this??
Anyhow, I've put together a new script that accesses the new NOAA weather
API directly. This seems to work well, for all the destinations I've
tested. The drawback is this will only work for US/NOAA destination. But,
it's a place to start. I'll release this code for testing later today.
73, David K4FXC
On Sun, 19 Nov 2023, Don Heide via ARM-allstar wrote:
> Here is a screenshot of various zip codes entered using the weather.sh
script. I have been intermittently loosing my hourly weather report with
a temperature of 0 degrees. If I change the zip code to another within a
few miles of the original it might work for one or two announcements and
then go to 0 degrees again.
As can be seen in the list there are some that work and some that don't.
If I wait a short time (10 to 20 min) and try again the results will be
different!
I am assuming it is a problem with the weather server as I get the same
random results by using various zip codes around the country.
Don W7MRI
On 11/18/23 22:26, David McGough via ARM-allstar wrote:
> Hi Rick,
>
> I did some experimenting earlier today. I agree that the returned results
> seem to be unreliable. I just read a comment in the Accuweather RSS
> documentation that setting metric=1 is for Celsius and metric=2 is
> Fahrenheit. I tried both and leaving the metric parameter out entirely.
> Sometimes the query works, sometimes it reports 0 degrees.
>
> Also, I tried running the query with and without TLS (HTTP/80 and then
> HTTPS/443)....The HTTP/80 results seemed more consistent, but still not
> perfect.
>
> Looking further at their API documentation, I'm suspecting that they're
> now requiring a key/subscription for "premium" access. Also, while
> accessing their on-line docs, I had several pages time-out, getting
> errors. So, they might have some kind of infrastructure issue going on??
>
> I know this API had worked very reliably....Not sure when this changed?
>
> 73, David K4FXC
>
>
>
> On Sat, 18 Nov 2023, R Harkins wrote:
>
>> Same problem here. User reported that the node was saying 'temperature
>> zero'. Here is the information you requested (using the stock weather.sh):
>>
>> [root at ssarcPi sbin]# host myip.hamvoip.org
>> myip.hamvoip.org is an alias for hamvoip.org.
>> hamvoip.org has address 74.91.126.182
>> hamvoip.org mail is handled by 10 mail.hamvoip.org.
>>
>> [root at ssarcPi sbin]# wget -qO-http://myip.hamvoip.org
>> 209.153.81.36
>>
>> [root at ssarcPi sbin]# weather.sh 64083
>> 0ôïF, -18ôïC /
>> [root at ssarcPi sbin]# weather.sh 28405
>> 0ôïF, -18ôïC /
>> [root at ssarcPi sbin]# weather.sh 28139
>> 66ôïF, 19ôïC / Sunny
>>
>> I did some experimenting with the curl command as found in weather.sh. I
>> found that if I removed the metric\=${FAHRENHEIT}\& from the curl command,
>> everything worked. Put it back in and temp=0.
>>
>> [root at ssarcPi sbin]# weather.sh 64083 *modified script*
>> 61ôïF, 16ôïC / Sunny
>> [root at ssarcPi sbin]# weathersave.sh 64083 *this is the original script
>> renamed*
>> 0ôïF, -18ôïC /
>>
>> I got mixed results when visiting the same urls in a browser on my desktop.
>> Sometimes it worked, sometimes I got zero temps. Very puzzling...
>>
>> Rick W0FH
>>
>> On Sat, Nov 11, 2023 at 11:01ââ¬Â¯PM David McGough via ARM-allstar <
>> arm-allstar at hamvoip.org> wrote:
>>
>>> Steve,
>>>
>>> This seems like some kind of network issue. From the bash shell prompt,
>>> please try these commands and report the results:
>>>
>>> [root at RPi-Z2W ~]# host myip.hamvoip.org
>>> myip.hamvoip.org is an alias for hamvoip.org.
>>> hamvoip.org has address 74.91.126.182
>>> hamvoip.org mail is handled by 10 mail.hamvoip.org.
>>>
>>> [root at RPi-Z2W ~]# wget -qO-http://myip.hamvoip.org
>>> 12.17.28.216
>>>
>>> [root at RPi-Z2W ~]# weather.sh 28405
>>> 52̡̉F, 11̡̉C / Cloudy
>>>
>>> [root at RPi-Z2W ~]# weather.sh 28139
>>> 50̡̉F, 10̡̉C / Cloudy
>>>
>>>
>>>
>>> 73, David K4FXC
>>>
>>> On Sat, 11 Nov 2023, Steve Polley via ARM-allstar wrote:
>>>
>>>> I recently had to rebuild my node from a lightning hit. I have set up
>>>> the node like my others and they work fine but this no always gives me a
>>>> No Report when using in a bash shell with either weather.sh or
>>>> saytime.pl. It says this on my superman page as well. I have tried
>>>> multiple zip codes and airport codes with the same results. I have also
>>>> copied over weather.sh from a working node and it will not work either.
>>>>
>>>> Any ideas?
>>>>
>>>> Steve N0SWP
>>> _______________________________________________
>>>
>>> ARM-allstar mailing list
>>> ARM-allstar at hamvoip.org
>>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>>
>>> Visit the BBB and RPi2/3/4 web page -http://hamvoip.org
>>>
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page -http://hamvoip.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: weathersh.jpg
Type: image/jpeg
Size: 100949 bytes
Desc: not available
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20231119/8ad936ec/attachment.jpg>
_______________________________________________
ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list