Hi Tim
Here is my configuration
*In weewx.conf:*
only aqi_enabled=1
Id and secret are in 2 parameters forecast_api_id and forecast_api_secret
My location is in 2 parameters longitude and latitude
*In belchertown.py:*
aqi = 0
aqi_category = ""
aqi_time = 0
aqi_location = ""
and
aqi_url = (
"
https://api.aerisapi.com/airquality/%s,%s?&format=json&client_id=%s&client_secret=%s
"
% (latitude, longitude, forecast_api_id,
forecast_api_secret)
and
try:
aqi = data["aqi"][0]["response"][0]["periods"][0]["aqi"]
aqi_category =
data["aqi"][0]["response"][0]["periods"][0]["category"]
aqi_dominant =
data['aqi'][0]['response'][0]['periods'][0]['dominant']
aqi_time =
data["aqi"][0]["response"][0]["periods"][0]["timestamp"]
aqi_location =
data["aqi"][0]["response"][0]["place"]["name"].title()
As I said in issue #498 (
https://github.com/poblabs/weewx-belchertown/issues/498) closest method
does not work.
Didier
Le ven. 12 févr. 2021 à 15:12, tim lambert <[email protected]> a
écrit :
> Didier,
>
> I killed the test account -- but it did resolve, as does my Production
> account url. Attached is json from the Production account.
>
> My primary question is which parameter would I associate the valid Aeris
> AQI url in the weewx.conf? I have the aqi_enabled set to 1, however I'm
> uncertain which parameter needs to have the URL set. Should the URL be
> associated with aqi_location_enabled? These are the only two AQI related
> parameters that I can ascertain.
>
>
> On Friday, February 12, 2021 at 3:25:28 AM UTC-8 [email protected]
> wrote:
>
>> Your Id and secret are not valid...
>>
>> {"success":false,"error":{"code":"invalid_client","description":"The client
>> provided is invalid."},"response":[]}
>>
>>
>> Le ven. 12 févr. 2021 à 02:02, tim lambert <[email protected]> a
>> écrit :
>>
>>> Vince,
>>>
>>> The URL is a test account -- I have another Production account. Thanks
>>> for the concern.
>>>
>>> I have the aqi_enabled set to 1, however I'm uncertain which parameter
>>> needs to have the URL set. Should the URL be associated with
>>> aqi_location_enabled? These are the only two AQI related parameters that
>>> I can ascertain.
>>>
>>> Thanks in Advance!
>>>
>>> - Tim
>>>
>>>
>>>
>>> On Thursday, February 11, 2021 at 4:47:33 PM UTC-8 vince wrote:
>>>
>>>> You really shouldn't post your Aeris private API key and secret.....I'd
>>>> suggest you change them and disable the old one.
>>>>
>>>> Parameters are under
>>>> https://github.com/poblabs/weewx-belchertown#forecast-options
>>>>
>>>>
>>>> On Thursday, February 11, 2021 at 3:47:50 PM UTC-8 tim lambert wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Two questions on this topic:
>>>>>
>>>>> 1. Which config parameter(s) did you use to set the aeris url for the
>>>>> Belchertown skin? In my case:
>>>>> https://api.aerisapi.com/airquality/45.349518,-122.823247?&format=json&client_id=RPt5vXyj9IavCW5i7hvwY&client_secret=BQEa1WWhdpGBk9jRNwTO9jKy0yp0WTkVJTicZOpp
>>>>> which does resolve with information
>>>>>
>>>>> 2. Has the issue you reported been resolved?
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>
>>>>> On Thursday, February 4, 2021 at 11:38:58 PM UTC-8 [email protected]
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have the same issue. but no solution so far
>>>>>> [email protected] schrieb am Dienstag, 26. Januar 2021 um
>>>>>> 18:06:56 UTC+1:
>>>>>>
>>>>>>> Hi what would be causing all this as I get a good webpage to display
>>>>>>> after each update but with this in log every loop?????
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> an 26 08:22:02
>>>>>>>
>>>>>>> raspberrypi weewx[22225] INFO weewx.restx: Wunderground:Posting not
>>>>>>> enabled. Jan 26 08:22:02 raspberrypi weewx[22225] INFOweewx.restx:
>>>>>>>
>>>>>>> PWSweather: Posting not enabled. Jan 26 08:22:02 raspberrypi
>>>>>>> weewx[22225]INFO weewx.restx:
>>>>>>>
>>>>>>> CWOP: Posting not enabled.
>>>>>>>
>>>>>>> Jan 26 08:22:02 raspberrypi weewx[22225] INFO weewx.restx: WOW:
>>>>>>> Posting not enabled. Jan 26 08:22:02 raspberrypi weewx[22225] INFO
>>>>>>> weewx.restx:
>>>>>>>
>>>>>>> AWEKAS: Posting not enabled. Jan 26 08:22:02 raspberrypi
>>>>>>> weewx[22225] INFO __main__: Starting up weewx version 4.3.0 Jan 26
>>>>>>> 08:22:03
>>>>>>> raspberrypi weewx[22225] INFO weewx.engine: Clock error is 3.18 seconds
>>>>>>> (positive is fast) Jan 26 08:22:03 raspberrypi weewx[22225] INFO
>>>>>>>
>>>>>>> weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb' Jan
>>>>>>> 26
>>>>>>>
>>>>>>> 08:22:03 raspberrypi weewx[22225] INFO weewx.manager: Starting
>>>>>>> backfill of daily summaries Jan 26 08:22:05 raspberrypi weewx[22225]
>>>>>>> INFO
>>>>>>>
>>>>>>> weewx.engine: Starting main packet loop. Jan 26 08:25:14 raspberrypi
>>>>>>> weewx[22225] INFO weewx.manager: Added record 2021-01-26 08:25:00 MST
>>>>>>>
>>>>>>> (1611674700) to database 'weewx.sdb' Jan 26 08:25:14 raspberrypi
>>>>>>> weewx[22225] INFO weewx.manager: Added record 2021-01-26 08:25:00 MST
>>>>>>>
>>>>>>> (1611674700) to daily summary in 'weewx.sdb' Jan 26 08:25:17
>>>>>>> raspberrypi weewx[22225] INFO weewx.cheetahgenerator: Generated 8 files
>>>>>>> for
>>>>>>> report SeasonsReport in 1.77 seconds Jan 26 08:25:17 raspberrypi
>>>>>>> weewx[22225] INFO weewx.imagegenerator: Generated 15 images for report
>>>>>>> SeasonsReport in 0.67 seconds Jan 26 08:25:17 raspberrypi weewx[22225]
>>>>>>> INFO
>>>>>>> weewx.reportengine: Copied 5 files to /var/www/html/weewx Jan 26
>>>>>>>
>>>>>>> 08:25:17 raspberrypi weewx[22225] INFO user.belchertown: version 1.2
>>>>>>> Jan 26 08:25:17 raspberrypi weewx[22225] ERROR user.belchertown: Error
>>>>>>> getting AQI from Aeris weather. The error was:#012list index out of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*******************
>>>>>>>
>>>>>>> Jan 26 08:25:18 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*********************
>>>>>>>
>>>>>>> getting AQI from Aeris weather. The error was:#012list index out of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=************************
>>>>>>>
>>>>>>> Jan 26 08:25:19 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=**********************
>>>>>>>
>>>>>>> Jan 26 08:25:19 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*************************
>>>>>>>
>>>>>>> Jan 26 08:25:19 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*****************************
>>>>>>>
>>>>>>> Jan 26 08:25:19 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=********************************
>>>>>>>
>>>>>>> Jan 26 08:25:20 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=********************************
>>>>>>>
>>>>>>> Jan 26 08:25:20 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*********************************
>>>>>>>
>>>>>>> Jan 26 08:25:20 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=dgm******************************
>>>>>>>
>>>>>>> Jan 26 08:25:20 raspberrypi weewx[22225] ERROR user.belchertown:
>>>>>>> Error getting AQI from Aeris weather. The error was:#012list index out
>>>>>>> of
>>>>>>> range#012The response from the Aeris AQI server was:#012[{'success':
>>>>>>>
>>>>>>> True, 'error': {'code': 'warn_no_data', 'description': 'Valid
>>>>>>> request.
>>>>>>>
>>>>>>> No results available based on your query parameters.'}, 'response':
>>>>>>>
>>>>>>> []}]#012The URL being used
>>>>>>>
>>>>>>> is:#012
>>>>>>> https://api.aerisapi.com/airquality/closest?p=42.8375,-103.0094&format=json&radius=50mi&limit=1&client_id=*******************
>>>>>>>
>>>>>>> Jan 26 08:25:21 raspberrypi weewx[22225] INFO weewx.cheetahgenerator:
>>>>>>>
>>>>>>> Generated 11 files for report Belchertown in 3.76 seconds Jan 26
>>>>>>>
>>>>>>> 08:25:21 raspberrypi weewx[22225] INFO weewx.reportengine: Copied 37
>>>>>>> files to /var/www/html/weewx/belchertown Jan 26 08:30:14 raspberrypi
>>>>>>> weewx[22225] INFO weewx.manager: Added record 2021-01-26 08:30:00 MST
>>>>>>>
>>>>>>> (1611675000) to database 'weewx.sdb' Jan 26 08:30:14 raspberrypi
>>>>>>> weewx[22225] INFO weewx.manager: Added record 2021-01-26 08:30:00 MST
>>>>>>>
>>>>>>> (1611675000) to daily summary in 'weewx.sdb' Jan 26 08:30:15
>>>>>>> raspberrypi weewx[22225] INFO weewx.cheetahgenerator: Generated 8 files
>>>>>>> for
>>>>>>> report SeasonsReport in 0.74 seconds Jan 26 08:30:16 raspberrypi
>>>>>>> weewx[22225] INFO weewx.imagegenerator: Generated 15 images for report
>>>>>>> SeasonsReport in 0.66 seconds Jan 26 08:30:16 raspberrypi weewx[22225]
>>>>>>> INFO
>>>>>>> weewx.reportengine: Copied 0 files to /var/www/html/weewx
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>> 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].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/a37bfb29-3878-49ee-9c56-781ee322d9fbn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/a37bfb29-3878-49ee-9c56-781ee322d9fbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
>>
>> --
>> Quel temps fait-il à Auffargis <https://meteo-auffargis.decoodt.eu> ?
>>
> --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/85c74592-9f28-4aa5-a9ec-17ed19961245n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/85c74592-9f28-4aa5-a9ec-17ed19961245n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Quel temps fait-il à Auffargis <https://meteo-auffargis.decoodt.eu> ?
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/CAAvt3%3DSyqP-Uh7zbRwtw4_6m_T5srRO33J%2B10-PwAC3KVXqVUg%40mail.gmail.com.