Closed metbril closed 3 years ago
Hey there @bieniu, mind taking a look at this issue as its been labeled with a integration (airly
) you are listed as a codeowner for? Thanks!
Airly API responds There are no Airly sensors in this area yet
when I use your coordinates.
curl -X GET \
> --header 'Accept: application/json' \
> --header 'apikey: apikey' \
> 'https://airapi.airly.eu/v2/measurements/point?lat=51.914999&lng=4.480289'
{"current":{"fromDateTime":"2020-03-22T15:52:24.715Z","tillDateTime":"2020-03-22T16:52:24.715Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},"history":[{"fromDateTime":"2020-03-21T16:00:00.000Z","tillDateTime":"2020-03-21T17:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T17:00:00.000Z","tillDateTime":"2020-03-21T18:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T18:00:00.000Z","tillDateTime":"2020-03-21T19:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T19:00:00.000Z","tillDateTime":"2020-03-21T20:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T20:00:00.000Z","tillDateTime":"2020-03-21T21:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T21:00:00.000Z","tillDateTime":"2020-03-21T22:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T22:00:00.000Z","tillDateTime":"2020-03-21T23:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-21T23:00:00.000Z","tillDateTime":"2020-03-22T00:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T00:00:00.000Z","tillDateTime":"2020-03-22T01:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T01:00:00.000Z","tillDateTime":"2020-03-22T02:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T02:00:00.000Z","tillDateTime":"2020-03-22T03:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T03:00:00.000Z","tillDateTime":"2020-03-22T04:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T04:00:00.000Z","tillDateTime":"2020-03-22T05:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T05:00:00.000Z","tillDateTime":"2020-03-22T06:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T06:00:00.000Z","tillDateTime":"2020-03-22T07:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T07:00:00.000Z","tillDateTime":"2020-03-22T08:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T08:00:00.000Z","tillDateTime":"2020-03-22T09:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T09:00:00.000Z","tillDateTime":"2020-03-22T10:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T10:00:00.000Z","tillDateTime":"2020-03-22T11:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T11:00:00.000Z","tillDateTime":"2020-03-22T12:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T12:00:00.000Z","tillDateTime":"2020-03-22T13:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T13:00:00.000Z","tillDateTime":"2020-03-22T14:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T14:00:00.000Z","tillDateTime":"2020-03-22T15:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T15:00:00.000Z","tillDateTime":"2020-03-22T16:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]}],"forecast":[{"fromDateTime":"2020-03-22T16:00:00.000Z","tillDateTime":"2020-03-22T17:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T17:00:00.000Z","tillDateTime":"2020-03-22T18:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T18:00:00.000Z","tillDateTime":"2020-03-22T19:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T19:00:00.000Z","tillDateTime":"2020-03-22T20:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T20:00:00.000Z","tillDateTime":"2020-03-22T21:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T21:00:00.000Z","tillDateTime":"2020-03-22T22:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T22:00:00.000Z","tillDateTime":"2020-03-22T23:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-22T23:00:00.000Z","tillDateTime":"2020-03-23T00:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T00:00:00.000Z","tillDateTime":"2020-03-23T01:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T01:00:00.000Z","tillDateTime":"2020-03-23T02:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T02:00:00.000Z","tillDateTime":"2020-03-23T03:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T03:00:00.000Z","tillDateTime":"2020-03-23T04:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T04:00:00.000Z","tillDateTime":"2020-03-23T05:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T05:00:00.000Z","tillDateTime":"2020-03-23T06:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T06:00:00.000Z","tillDateTime":"2020-03-23T07:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T07:00:00.000Z","tillDateTime":"2020-03-23T08:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T08:00:00.000Z","tillDateTime":"2020-03-23T09:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T09:00:00.000Z","tillDateTime":"2020-03-23T10:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T10:00:00.000Z","tillDateTime":"2020-03-23T11:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T11:00:00.000Z","tillDateTime":"2020-03-23T12:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T12:00:00.000Z","tillDateTime":"2020-03-23T13:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T13:00:00.000Z","tillDateTime":"2020-03-23T14:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T14:00:00.000Z","tillDateTime":"2020-03-23T15:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]},{"fromDateTime":"2020-03-23T15:00:00.000Z","tillDateTime":"2020-03-23T16:00:00.000Z","values":[],"indexes":[{"name":"AIRLY_CAQI","value":null,"level":"UNKNOWN","description":"There are no Airly sensors in this area yet.","advice":null,"color":"#999999"}],"standards":[]}]}
On Airly page your coordinates have the same result.
This is not an integration issue.
Trying from this page
https://developer.airly.eu/api
with the coordinates shows the result. That's strange.
Hi folks
This is Marek from Airly. This behavior is intended. At the moment the /v2/measurements/point
operation returns interpolated measurement from Airly sensors only. National stations are not considered when calculating the result.
This may change in the future though.
Cheers
The front-end of the developer portal makes requests to the API the same way every other client does, so there cannot be any differences in API outputs.
The difference you are seeing is of different sort. There are two endpoints: /v2/measurements/point
and /v2/measurements/nearest
. The point
is for air pollution in that exact point. The nearest
finds the nearest available measurement for the specified point (up to N kilometers, specified in the query).
You are using the nearest
, while this integration uses point
. The problem is, that — although not specified anywhere — the point
endpoint returns interpolated values only for Airly sensors, while the one you are trying to obtain is an EEA one.
Proposed solutions:
installationId
instead of coordinates. Then it is explicilty specified which measurement you want to see,nearest
instead of point
. That way the measurement will be returned in these cases, where there are no Airly stations nearby.In my opinion integration, by default, should present the same data as the Airly website. nearest
method can only be an option.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Is there a solution for this issue? I have exactly the same problem.
If you get error No Airly stations in this area
that's not an issue. You can use other coordinates closer to the existing measuring station.
I used exactly the coordinates of the station. You can try it with this station:
{
"id": 9541,
"location": {
"latitude": 51.036105,
"longitude": 13.730205
},
"locationId": 9541,
"address": {
"country": "Germany",
"city": "Dresden",
"street": "Schnorrstraße",
"number": null,
"displayAddress1": "Dresden",
"displayAddress2": "Schnorrstraße"
},
"elevation": 120.77,
"airly": false,
"sponsor": {
"id": 548,
"name": "Umweltbundesamt",
"description": "Source",
"logo": "https://cdn.airly.eu/logo/UmweltBundesamt.png",
"link": "https://www.umweltbundesamt.de",
"displayName": "Umweltbundesamt"
}
}
Exactly @saxn-paule. That's what I already mentioned in my initial post:
When I replace my home coordinates with the lat/lon of the station itself, it produces the exact same error. So it won't find any station for me.
@frenck This issue isn't resolved. Would you mind re-opening it?
@saxn-paule Airly says there are no measuring station in these coordinates. Report the problem to Airly.
@metbril This isn't an issue of the integration. This is a feature request (using nearest
method).
I also tried the integration for other cities. Also for those that have only one sensor in town. Same behavior.
Please post coordinates.
Those are links for measure stations, not for coordinates. Use URL without station ID: https://airly.eu/map/en/#52.146264,14.638165
Ask Airly why they work that way. It's not an integration issue.
Could you please provide example coordinates that definitely work. It doesn't matter what I try. No coordinates work for me.
Well, I see the issue. It only works very close to round stations. If there are only square stations, nothing will be found.
Do you know, what's the difference?
I think it's related to this https://github.com/home-assistant/core/issues/33153#issuecomment-612427094
Okay, then this integration isn't usable in most cases. Thx for the reply.
The problem
When I add the integration through the UI using my API key and my home location, I expect Airly to find the nearest station. However, it only produces an error "Geen Airly meetstations in dit gebied." (No Airly stations in this area). When I move to the Airly developer area and try the API, I can find the nearest station to me:
When I replace my home coordinates with the lat/lon of the station itself, it produces the exact same error. So it won't find any station for me. Making the integration unusable.
Environment
Problem-relevant
configuration.yaml
n/a. using the integrations UI.
Traceback/Error logs
Additional information
n/a