Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM2.5, CO and O3 stoped working #46

Closed
rickstaa opened this issue Oct 21, 2023 · 10 comments
Closed

PM2.5, CO and O3 stoped working #46

rickstaa opened this issue Oct 21, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@rickstaa
Copy link

rickstaa commented Oct 21, 2023

I just stumbled upon a problem: the Particulate matter (PM2.5), Carbon monoxide (CO), and Ozone (O3) sensors seem to have stopped working over the past few months. The culprit might be an API tweak on WAQI's end. I'm more than willing to roll up my sleeves and investigate, but given my greenhorn status with HA integrations, I thought it would be good to check if you're already aware of these issues.

How to reproduce

  1. Kick-off HA in a Docker container using docker-compose:
version: "3.8"

services:
  homeassistant:
    image: "ghcr.io/home-assistant/home-assistant:stable"
    container_name: homeassistant
    volumes:
      # - /mnt/NAS/video:/media/NAS/video # Mount your NAS video folder.
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
  1. Install the the worlds-air-quality-index plugin.
  2. Configure the integration with a station that contains the PM2.5, CO, and O3 values (like this one).
  3. Navigate to the HA entities tab and confirm the absence of these values under the World's Air Quality Index integration.
  4. Double-check that these values are supported by the station -> Station Link.

image

@luberk8
Copy link

luberk8 commented Oct 23, 2023

Having the same issue

@pawkakol1
Copy link
Owner

I will take a look on it today

@pawkakol1
Copy link
Owner

I verified it using Postman, and I got below data, an I also visit WAQI web site - there is no O3 nor PM2.5 in current data list ("iaqi") - they are in forecast only
{ "status": "ok", "data": { "aqi": 10, "idx": 7937, "attributions": [ { "url": "http://www.luchtmeetnet.nl/", "name": "RIVM - Rijksinstituut voor Volksgezondheid en Milieum, Landelijk Meetnet Luchtkwaliteit", "logo": "Netherland-RIVM.png" }, { "url": "https://waqi.info/", "name": "World Air Quality Index Project" } ], "city": { "geo": [ 52.370508, 4.642319 ], "name": "Schipholweg, Haarlem", "url": "https://aqicn.org/city/netherland/haarlem/schipholweg", "location": "" }, "dominentpol": "pm10", "iaqi": { "h": { "v": 90 }, "no2": { "v": 20.4 }, "p": { "v": 990.7 }, "pm10": { "v": 10 }, "t": { "v": 11.6 }, "w": { "v": 0.1 }, "wg": { "v": 1 } }, "time": { "s": "2023-10-27 18:00:00", "tz": "+02:00", "v": 1698429600, "iso": "2023-10-27T18:00:00+02:00" }, "forecast": { "daily": { "o3": [ { "avg": 8, "day": "2023-10-27", "max": 20, "min": 1 }, { "avg": 18, "day": "2023-10-28", "max": 28, "min": 14 }, { "avg": 24, "day": "2023-10-29", "max": 27, "min": 18 }, { "avg": 11, "day": "2023-10-30", "max": 21, "min": 1 }, { "avg": 1, "day": "2023-10-31", "max": 1, "min": 1 } ], "pm10": [ { "avg": 9, "day": "2023-10-27", "max": 14, "min": 5 }, { "avg": 9, "day": "2023-10-28", "max": 13, "min": 5 }, { "avg": 7, "day": "2023-10-29", "max": 8, "min": 3 }, { "avg": 13, "day": "2023-10-30", "max": 17, "min": 8 }, { "avg": 18, "day": "2023-10-31", "max": 19, "min": 18 } ], "pm25": [ { "avg": 32, "day": "2023-10-27", "max": 54, "min": 14 }, { "avg": 30, "day": "2023-10-28", "max": 45, "min": 16 }, { "avg": 16, "day": "2023-10-29", "max": 21, "min": 9 }, { "avg": 38, "day": "2023-10-30", "max": 55, "min": 19 }, { "avg": 57, "day": "2023-10-31", "max": 59, "min": 57 } ] } }, "debug": { "sync": "2023-10-28T02:29:51+09:00" } } }

image

@rickstaa
Copy link
Author

rickstaa commented Oct 31, 2023

I verified it using Postman, and I got below data, an I also visit WAQI web site - there is no O3 nor PM2.5 in current data list ("iaqi") - they are in forecast only { "status": "ok", "data": { "aqi": 10, "idx": 7937, "attributions": [ { "url": "http://www.luchtmeetnet.nl/", "name": "RIVM - Rijksinstituut voor Volksgezondheid en Milieum, Landelijk Meetnet Luchtkwaliteit", "logo": "Netherland-RIVM.png" }, { "url": "https://waqi.info/", "name": "World Air Quality Index Project" } ], "city": { "geo": [ 52.370508, 4.642319 ], "name": "Schipholweg, Haarlem", "url": "https://aqicn.org/city/netherland/haarlem/schipholweg", "location": "" }, "dominentpol": "pm10", "iaqi": { "h": { "v": 90 }, "no2": { "v": 20.4 }, "p": { "v": 990.7 }, "pm10": { "v": 10 }, "t": { "v": 11.6 }, "w": { "v": 0.1 }, "wg": { "v": 1 } }, "time": { "s": "2023-10-27 18:00:00", "tz": "+02:00", "v": 1698429600, "iso": "2023-10-27T18:00:00+02:00" }, "forecast": { "daily": { "o3": [ { "avg": 8, "day": "2023-10-27", "max": 20, "min": 1 }, { "avg": 18, "day": "2023-10-28", "max": 28, "min": 14 }, { "avg": 24, "day": "2023-10-29", "max": 27, "min": 18 }, { "avg": 11, "day": "2023-10-30", "max": 21, "min": 1 }, { "avg": 1, "day": "2023-10-31", "max": 1, "min": 1 } ], "pm10": [ { "avg": 9, "day": "2023-10-27", "max": 14, "min": 5 }, { "avg": 9, "day": "2023-10-28", "max": 13, "min": 5 }, { "avg": 7, "day": "2023-10-29", "max": 8, "min": 3 }, { "avg": 13, "day": "2023-10-30", "max": 17, "min": 8 }, { "avg": 18, "day": "2023-10-31", "max": 19, "min": 18 } ], "pm25": [ { "avg": 32, "day": "2023-10-27", "max": 54, "min": 14 }, { "avg": 30, "day": "2023-10-28", "max": 45, "min": 16 }, { "avg": 16, "day": "2023-10-29", "max": 21, "min": 9 }, { "avg": 38, "day": "2023-10-30", "max": 55, "min": 19 }, { "avg": 57, "day": "2023-10-31", "max": 59, "min": 57 } ] } }, "debug": { "sync": "2023-10-28T02:29:51+09:00" } } }

image

Thank you for bringing this to my attention. It appears that the station has updated its sensors. If I understand correctly, your tool is designed to showcase values under the iaqi category and consolidate them into a forecast variable when they are projected. Your explanation clarifies things, and upon reviewing my setup, the forecast variable no longer exists. 🤔

@rickstaa
Copy link
Author

rickstaa commented Nov 2, 2023

@pawkakol1 should I create a new issue for the forecast variable?

@pawkakol1 pawkakol1 reopened this Nov 2, 2023
@pawkakol1
Copy link
Owner

No, I didn't notice your post about the forecast

@pawkakol1 pawkakol1 self-assigned this Nov 2, 2023
@pawkakol1 pawkakol1 added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Nov 2, 2023
@pawkakol1
Copy link
Owner

@rickstaa in the README description there is below sentence:

If the station supports forecast of some pollution sensor, but it doesn't support actual value of this sensor, then the forecast will be omitted.

But in next version there will be sensor with UNAVAILABLE current state, and read forecast like below:
image

@rickstaa
Copy link
Author

rickstaa commented Nov 2, 2023

@rickstaa in the README description there is below sentence:

If the station supports forecast of some pollution sensor, but it doesn't support actual value of this sensor, then the forecast will be omitted.

But in next version there will be sensor with UNAVAILABLE current state, and read forecast like below: image

Amazing thanks for the explanation. Looking forward to the next version 🚀.

@pawkakol1
Copy link
Owner

Done in version 1.0.4

@rickstaa
Copy link
Author

rickstaa commented Nov 3, 2023

Great 🎉!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants