Brilliant. Now I get the forecast if I set the location to “Poway, CA.” and 
that works for me.
Where in the configuration for Aeris would I change the location for getting 
their forecast for my city?

        David

> On Apr 25, 2020, at 5:20 PM, John Kline <j...@johnkline.com> wrote:
> 
> Yikes.  Forgot the diff.  The line numbers won’t match, but this should be 
> easy to apply to your current forecast.py.
> 
> diff --git a/bin/user/forecast.py b/bin/user/forecast.py
> index d947fb3..2254fed 100644
> --- a/bin/user/forecast.py
> +++ b/bin/user/forecast.py
> @@ -5033,9 +5033,9 @@ if __name__ == "__main__":
>                            help="specify the location")
>          parser.add_option("--api-key", dest="api_key", type=str, 
> metavar="KEY",
>                            help="specify the api key")
> -        parser.add_option("--client-id", dest="client-id", type=str,
> +        parser.add_option("--client-id", dest="client_id", type=str,
>                            metavar="ID", help="specify the client id")
> -        parser.add_option("--client-secret", dest="client-secret", type=str,
> +        parser.add_option("--client-secret", dest="client_secret", type=str,
>                            metavar="SECRET", help="specify the client secret")
>          parser.add_option("--filename", dest="filename", metavar="FILENAME",
>                            help="file that contains forecast data",
> @@ -5078,6 +5078,9 @@ if __name__ == "__main__":
>                  fcast = AerisForecast.download(
>                      options.client_id, options.client_secret, options.loc)
>                  print(fcast)
> +            elif options.method.lower() == 'aeris':
> +                fcast = AerisForecast.download(options.client_id, 
> options.client_secret, options.loc)
> +                print(fcast)
>              elif options.method.lower() == 'wwo':
>                  fcast = WWOForecast.download(options.api_key, options.loc)
>                  print(fcast)
> 
>> On Apr 25, 2020, at 4:59 PM, John Kline <j...@johnkline.com> wrote:
>> 
>> 
>> Here’s a diff showing the changes I had to make so that the command below 
>> will run.
>> 
>> Please make those changes and then run the command again pointing to your 
>> changed file.  You don’t even have to update the forecast.py that weewx is 
>> using.  This is just so that you don’t get the method not supported error 
>> below when running directly.
>> 
>> Of course, you also need to plug in your client-I’d and secret-key.
>> 
>> BTW, you didn’t have to send me this error.  I told you it wouldn’t work 
>> without modifying the code.
>> 
>>> On Apr 25, 2020, at 4:51 PM, David Barto <ba...@kdbarto.org> wrote:
>>> 
>>> Running Weewx 3.9.2.
>>> Forecast skins/forecast/skin.conf:    version = 3.3.2
>>> 
>>> 
>>> Magrathea:weewx-installed katherinebarto$ 
>>> PYTHONPATH=/Users/shared/weewx/bin python bin/user/forecast.py --method 
>>> Aeris --action download --client-id XXX --client-secret YYY --loc “32.98265 
>>> -117.0405"
>>> 
>>> Returns:
>>> unsupported forecast method Aeris
>>> 
>>>> On Apr 25, 2020, at 2:48 PM, John Kline <j...@johnkline.com 
>>>> <mailto:j...@johnkline.com>> wrote:
>>>> 
>>>> I switched from my free trial Aeris to a free one based on the thread you 
>>>> mention.  I got back the same client ID and secret.  It continues to work 
>>>> for me.
>>>> 
>>>> You should be able to do something like the following to test:
>>>> 
>>>> PYTHONPATH=/home/weewx/bin python3 bin/user/forecast.py --method Aeris 
>>>> --action download --client-id XXX --client-secret XXX--loc 
>>>> "37.431495,-122.110937"
>>>> 
>>>> If you could do that, you could quickly see wether the issue is that no 
>>>> forecast is available for the location you requested.
>>>> 
>>>> Alas, I notice that Aeris isn’t supported when running as main.  I added 
>>>> the support to do that and fixed some bugs WRT command line arguments.  I 
>>>> will add it to my fork, but I will need to test more.
>>>> 
>>>> What version of WeeWX and the forecast plugin are you running?
>>>> 
>>>> ALSO, PLEASE REPLY ON THE LIST RATHER THAN DIRECTLY TO ME.
>>>> 
>>>> 
>>>>> On Apr 25, 2020, at 12:23 PM, David Barto <ba...@kdbarto.org 
>>>>> <mailto:ba...@kdbarto.org>> wrote:
>>>>> 
>>>>> 
>>>>> galfert posted that you can get free Aeris forecasting:
>>>>> 
>>>>> The free Aeris Weather account is not advertised. You have to use the 
>>>>> link I provided to get in on the special "Contributor account" only for 
>>>>> those that contribute with their station to PWSweather.com 
>>>>> <http://pwsweather.com/>.
>>>>> 
>>>>> This link: https://www.aerisweather.com/signup/pws/ 
>>>>> <https://www.aerisweather.com/signup/pws/>
>>>>> 
>>>>> -----
>>>>> So I signed up for Aeris through the pws, and got my 2 hashes.
>>>>> 
>>>>> I added the Aeris data to weewx.conf and restarted.
>>>>> The forecast page doesn't show any forecast for Aeris, while the
>>>>> NWS does show up.
>>>>> 
>>>>> https://www.kdbarto.org/weather/forecast/multiple-tables.html 
>>>>> <https://www.kdbarto.org/weather/forecast/multiple-tables.html>
>>>>> 
>>>>> The log output for weewx is showing an error:
>>>>> /var/log/system.log:Apr 25 11:17:16 Magrathea weewx[28709]: forecast: 
>>>>> AerisThread: Aeris: failed attempt 1 to download forecast: HTTP Error 
>>>>> 400: Bad Request
>>>>> /var/log/system.log:Apr 25 11:17:16 Magrathea weewx[28709]: forecast: 
>>>>> WUThread: WU: failed attempt 1 to download forecast: HTTP Error 503: 
>>>>> Service Unavailable
>>>>> /var/log/system.log:Apr 25 11:17:17 Magrathea weewx[28709]: forecast: 
>>>>> AerisThread: Aeris: failed attempt 2 to download forecast: HTTP Error 
>>>>> 400: Bad Request
>>>>> /var/log/system.log:Apr 25 11:17:17 Magrathea weewx[28709]: forecast: 
>>>>> WUThread: WU: failed attempt 2 to download forecast: HTTP Error 503: 
>>>>> Service Unavailable
>>>>> /var/log/system.log:Apr 25 11:17:17 Magrathea weewx[28709]: forecast: 
>>>>> AerisThread: Aeris: failed attempt 3 to download forecast: HTTP Error 
>>>>> 400: Bad Request
>>>>> /var/log/system.log:Apr 25 11:17:17 Magrathea weewx[28709]: forecast: 
>>>>> AerisThread: Aeris: failed to download forecast
>>>>> /var/log/system.log:Apr 25 11:17:17 Magrathea weewx[28709]: forecast: 
>>>>> AerisThread: Aeris: no forecast data for 32.983056,-117.04 from 
>>>>> http://api.aerisapi.com/forecasts/ <http://api.aerisapi.com/forecasts/>
>>>>> 
>>>>> Clearly I've not configured something correctly. Anyone want to point out 
>>>>> the error of my ways?
>>>>> 
>>>>> Thanks.
>>>>> 
>>>>>   David
>>>>> 
>>>>> -- 
>>>>> 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+unsubscr...@googlegroups.com 
>>>>> <mailto:weewx-user+unsubscr...@googlegroups.com>.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/B0791C0B-3281-4B24-B3BF-9C0FB08F650F%40kdbarto.org
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/B0791C0B-3281-4B24-B3BF-9C0FB08F650F%40kdbarto.org?utm_medium=email&utm_source=footer>.
>>>> 
>>>> 
>>>> -- 
>>>> 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+unsubscr...@googlegroups.com 
>>>> <mailto:weewx-user+unsubscr...@googlegroups.com>.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/D9F2FB46-0DB0-444F-A6B1-2FA010DA09AE%40johnkline.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/D9F2FB46-0DB0-444F-A6B1-2FA010DA09AE%40johnkline.com?utm_medium=email&utm_source=footer>.
>>> 
>>> 
>>> -- 
>>> 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+unsubscr...@googlegroups.com 
>>> <mailto:weewx-user+unsubscr...@googlegroups.com>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/CAADAC99-1915-4991-BE1B-17A2B6494962%40kdbarto.org
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/CAADAC99-1915-4991-BE1B-17A2B6494962%40kdbarto.org?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> 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+unsubscr...@googlegroups.com 
> <mailto:weewx-user+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/4D096217-378D-4503-834D-4209225A78F1%40johnkline.com
>  
> <https://groups.google.com/d/msgid/weewx-user/4D096217-378D-4503-834D-4209225A78F1%40johnkline.com?utm_medium=email&utm_source=footer>.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/C18B5595-C485-4CE4-BA85-3786D9413E5D%40kdbarto.org.

Reply via email to