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

Outdoor device has channels #61

Open
joostlek opened this issue May 1, 2024 · 1 comment
Open

Outdoor device has channels #61

joostlek opened this issue May 1, 2024 · 1 comment
Labels
no-stale This issue or PR is exempted from the stable bot.

Comments

@joostlek
Copy link
Collaborator

joostlek commented May 1, 2024

So the indoor device gives us a flat response. The Airgradient OpenAir on the other hand, returns a JSON object with channels:

{
    "wifi": -52,
    "serialno": "84fce60bec38",
    "channels": {
        "1": {
            "pm01": 3,
            "pm02": 5,
            "pm10": 7,
            "pm003Count": 639,
            "atmp": 14.37,
            "rhum": 72
        }
    },
    "tvocIndex": 0,
    "tvoc_raw": 31217,
    "noxIndex": 0,
    "nox_raw": 17248,
    "boot": 0,
    "ledMode": "co2",
    "firmwareVersion": "3.0.10beta",
    "fwMode": “O-1PPT”
}

If I understood correctly, this is to support the quality control/calibration sensors of older models because they can have multiple channels. But we should not use these values in Home Assistant.

Would it be possible to return the same JSON structure the indoor device does? And if there is any kind of reason the channels should still be included, could we still have the values added to the toplevel?

Example of my proposal:

{
    "wifi": -52,
    "serialno": "84fce612f5b8",
    "channels": {
        "1": {
            "pm01": 3,
            "pm02": 5,
            "pm10": 7,
            "pm003Count": 639,
            "atmp": 14.37,
            "rhum": 72
        }
    },
    "rco2": 778,
    "pm01": 3,
    "pm02": 5,
    "pm10": 7,
    "pm003Count": 639,
    "tvocIndex": 99,
    "tvoc_raw": 31792,
    "noxIndex": 1,
    "nox_raw": 16931,
    "atmp": 14.37,
    "rhum": 72,
    "boot": 28,
    "ledMode": "co2",
    "firmwareVersion": "3.0.10beta",
    "fwMode": “O-1PPT”
}

or

{
    "wifi": -52,
    "serialno": "84fce612f5b8",
    "rco2": 778,
    "pm01": 3,
    "pm02": 5,
    "pm10": 7,
    "pm003Count": 639,
    "tvocIndex": 99,
    "tvoc_raw": 31792,
    "noxIndex": 1,
    "nox_raw": 16931,
    "atmp": 14.37,
    "rhum": 72,
    "boot": 28,
    "ledMode": "co2",
    "firmwareVersion": "3.0.10beta",
    "fwMode": “O-1PPT”
}
@joostlek joostlek added the no-stale This issue or PR is exempted from the stable bot. label May 1, 2024
@airgradienthq
Copy link
Owner

Ok, I will check with our fw developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-stale This issue or PR is exempted from the stable bot.
Projects
None yet
Development

No branches or pull requests

2 participants