Solved: Airvisual Node Pro Air Quality Monitor Support

@bachya Could you please also extract data from “date_and_time” section of latest_config_measurements.json?

It would be nice to see the time measurement was made. Now HA can only show the time when the values were read.

I can! :+1:t2: I’ll follow up soon.

This PR has been created: https://github.com/home-assistant/core/pull/44801 – note that the HASS standard is to use UTC everywhere, so the PR takes the timestamp from the JSON file and converts it to UTC before adding it as an attribute to AirVisual air_quality entities.

@bachya Thanks a lot, looking forward the merge.

By the way.
Why isn’t “carbon dioxide” a separate sensor, but an attribute in another sensor? So one needs to write yaml to show the value (see above)?

This is how air_quality platforms are designed: https://github.com/home-assistant/core/blob/3a32e16f4dc1eee4e3bf38fe10f0a6a15d0292a0/homeassistant/components/air_quality/init.py

1 Like

So, having carbon_dioxide as an attribute of air_quality is “standard”.

Why not adding a separate sensor in addition, so that one can use it without creating custom sensor in yaml?

Because, as mentioned, that’s the standard for air_quality platforms.

HASS uses it’s architecture repo to discuss these types of issues, larger changes, etc. It looks like there’s a proposal to do exactly what you’re saying (deprecate/remove air_quality and use a bundle of sensor entities instead): https://github.com/home-assistant/architecture/issues/362

I recommend you contribute to that proposal. If it gets approved, I will certainly make the changes to AirVisual.

EDIT: after chatting with the core team, I got approval to extend the AirVisual integration by adding sensors alongside the existing air_quality platform, which avoids any sort of breaking change and doesn’t need to wait on an architecture proposal.

So, I’ll get started soon!

3 Likes

As I can see, PR was closed as “not relevant to have this information”.

But it is really relevant.
AirVisual Node integration does not read data from device sensors directly.
The device makes measurements and write values to local storage once in several minutes (5 minutes in day time, 15 minutes at night).
HA integration reads values from device local storage. We can read them once a minute, or even once a second - they will not change until the device itself will make a new measurement.
Now in HA we have no information about the time when measurement was really made - only the time values were read. So it is not possible to use “data really updated” event in automation.

How can I explain it? The issue is closed and cannot be commented…

1 Like

Some good points made here. The integration via SMB does induce delay in the reading of measurements so that they are not shown in real time or updated at the actual time that they are read. We would need to access the API directly on the unit to do that, but no one feels like doing the conversions needed to get a nice AQI value out of them.

Generally in my experience, 5 minutes doesn’t make a huge difference unless someone sets a pile of tires on fire in front of my house, but for those kind of cases (people do burn piles of leaves around here), more real time data can be useful.

In my case, I try to use this data to automate climate devices.
I really need to distinguish two events:

  1. Values were read from the device, they are the same because no new measurement was made.
  2. Values were read from the device, they are the same because the new measurement produced the same result.

Hi guy, recently i bought an iqair new outdoor airvisual device( no display) just for outdoor usage. This device seems to havr any SAMBa feature… how to untegrate it in home assistant? Can you give me any ideas? Thx

1 Like

Has anyone been looking into how to connect the Air Visual Outdoor in addition to i\using the Air Visual Pro for Indoors?

1 Like

same question, how do you solve it ?
@bachya do you have any suggestion?

I don’t own an AirVisual outdoor unit, so I can’t know for sure. It may be possible to access the device data via their cloud API.

ok, however, is there a way to get the particulate value instead of the state info (good, moderate and so on) ?

From an outdoor unit? Or something else?

via the cloud API with the airvisual integration

That isn’t currently possible with the integration, as I based it on the (free) Community API. It may be possible that one of the paid-for APIs would provide this.

I just received my Outdoor unit and have it powered up. The device has Samba ports open and does ask me for credentials, but there is obviously no screen to tell me that. Curious if the Samba creds generally have any rhyme or reason to them? I am not beyond trying to brute force this thing. Would really prefer local reporting vs cloud.

Unfortunately, not that I can tell—my indoor unit had a random-looking string.

1 Like