-
Your implementation of the waqi.info API is incomplete. It appears that DAKboard is implementing only a part of the API rather than the full API, and only supporting geolocation lookups by lat/long. The API specifically allows queries to "https://api.waqi.info/feed/" with lat/long args, in which case the API will return city-level data from the nearest city-level station to the provided geolocation parameters. For example, based on the data I've configured into my DAKboard, you would be querying the following URL: The API also specifically allows queries to "https://api.waqi.info/feed/" with the station ID, in which case the API will return station-level data from the specified station provided by the station parameter. For example, because my station ID is @123456, you would need to query the following URL: I would suggest the following: Allow the "Location" field to specify either an address to translate into lat/long, or, specifically a station ID (which always begin with the @ symbol). Then translate that field to call the API endpoint with either "geo:%LATLONG%" or "A%STATIONID%" appended to the URL base, based on if the Location field begins with an @ symbol or not. The API will return the data from either a geolocation-searched endpoint or a specific station ID in the same format, so zero change in output handling is required. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This has now been completed and released via work done on #1954 Air Quality block may now be configured with a location -or- a Station ID. |
Beta Was this translation helpful? Give feedback.
This has now been completed and released via work done on #1954
Air Quality block may now be configured with a location -or- a Station ID.