>>> Join Us in the Fight Against Air Pollution

AirGradient Forum

New AirGradient Arduino Library Version 3

Just want to let you know that we have just released a complete rewrite of the Arduino library.

Version 3,0 is available here:
GitHub - airgradienthq/arduino

Please note that it will take a few hours until the Arduino library manager has the update.

Currently this new library supports the following models:

  • DIY BASIC
  • ONE I-9PSL
  • Open Air O-1PST

New features in this release:

  • Supports CO2 baseline calibration triggered from AirGradient dashboard
  • Picks up other configuration from dashboard, e.g. if country is US, it will automatically display temperature in F
  • Better feedback during WiFi connection
  • Overall this new library has a much more modular structure and supports both, the ESP8266 and ESP32C3 architectures

Some of the features we plan to implement in the next releases:

  • Support for older models
  • Set CO2 baseline period
  • MQTT support
2 Likes

Just updated my AirGradient ONE to the newest firmware released today. I noticed it doesn’t give the messages at boot anymore on its display about display options (what values, leds on or off etc.). Pressing the button doesn’t seem to do anything anymore during boot. Has this option for now been removed in the new version? Makes me unable to turn off the leds now, so would have to turn it off at night in my bedroom as also the dashboard option for this of course doesn’t work (yet).

These configurations have been moved to the server. Under location administration you can switch off the LEDs.
You mention this does not work for you. Please PM your location ID and I will have a look.

I will update the instructions with this tomorrow.

1 Like

Sorry, that was not clear, when doing it through the Dashboard, Hardware Administration, Actions, Edit Location and then setting to “LEDS off” indeed worked. Sorry, was not really clear from the changelog of the V3 firmware. Nice that it is now properly supported through the dashboard :slight_smile: And yeah, good idea to update the documentation soon :slight_smile: You’ve delivered a nice product btw :slight_smile:

Edit: likely because of the LED changes taking a while to actually transmit to the AirGradient ONE, I previously thought it didn’t work and just reset it every time to the default.

I just updated the section about configuration in the built instructions.

1 Like

Yeah, looks good.

Have to be honest that for first-time users of the pre-assembled version, “the button” is very unclear if you keep the case closed as the button description on the board is not visible and the larger hole next to the USB port is mistakenly the very first place people would look and fail to find a button haha. Took me a few minutes to realize it was that pinpoint button I should use to put the board in flash mode or to change display modes (old firmware of course). Maybe you could supply an image (with the case on) pointing to the button and call it like “the tiny button” to put more emphasis on it?

Besides the documentation-feedback; now we have to flash the firmware using our PCs to update the device. We also have to look at either the forum or some documentation changes to know new firmware is available. Would be nice if it would ever be possible to properly check for updates through the Dashboard (if they are available, for now the firmware indicator on the dashboard is broken). Would be even nicer if we could run the subsequent update OTA. Additionally, I re-installed the latest firmware (at that time) multiple times a few days back because of the wrong reporting in the dashboard. As the firmware-reporting there is broken (constantly reporting 1.0.0 and reporting 1.0.6 is available), wouldn’t it be wise to disable the firmware reporting on the dashboard till that is fixed. Just to avoid the confusion for your userbase who hasn’t looked extensively through everything on the forum? :slight_smile:

AirGradient with ESPHome (Home Assistant) should also be updated to reflect only MallocArray supporting the ONE V9 version. That is much clearer for users than “Features currently only supported by MallocArray: SGP40 for TVOC/NOx Index”. Also “OLED Display” and “Parallel connection to the AirGradient dashboard” (you mean to dashboard and HA at the same time) descriptions of supported features are very vague. Maybe good to go into a tiny more detail (maybe in general) regarding the ups and downs compared to official firmware?

1 Like

Yes I agree it is a bit confusing right now.

One of the reasons is that actually we currently run two firmwares in parallel. One based on our old closed-source version and then the new open-source one. For the old one we actually have OTA functionality.

We currently work on getting both versions feature compatible and will then decide if and how to best merge them and then ideally we will have OTA functionality for the open-source firmware as well.

For the ones who are new to AirGradient. Until end of last year we had both closed and open-source versions of our monitors running in parallel but decided to have all our monitors open-source hardware.

So last year we merged the hardware of the two different versions which is now completed. So now we need to merge the firmware side which is happening. Not easy as we have quite a few generations of legacy versions.

Actually @MallocArray supports also the other models as far as I know.

And good idea with the photo for the tiny button in the instructions.

1 Like

Ok, so the closed-source firmware is quite outdated nowadays if I understand correctly? This is not really clear now as you don’t have a page with the changelogs collected over time. I would propose to make a firmware changelog page to inform users that you keep on an active development/support cycle post-release of your products and to inform users simply when a firmware update is available. Your solution now is to either look at the Github releases page (changelog there is scarce on details) or sift through the forum.

With this changelog page, it would be nice to also have a table/archive available of all past firmware releases (both closed and open-source, with a ZIP/RAR file of the source code of that specific release if available.) This would be purely for history sake and for people to roll back to older versions in case of issues, removed features in newer releases or just out of curiosity.

Quite a nice approach to move to open-source and aim to support your older products with that approach too :slight_smile:

“And good idea with the photo for the tiny button in the instructions.” Thanks. And understand you not thinking of it as being the creator of the products makes things totally obvious to you. This makes it harder over time to see what is and isn’t obvious to the actual consumer, which is only natural. Ok if I make a topic with more documentation suggestions if I have more? Don’t wanna pollute a firmware-topic with too many documentation suggestions haha.

I think no problem to post it here. All feedback is very welcome.

1 Like

I would propose to put the “Direct Flashing Through The Browser” (together with " BOOT Error During Flashing") and “Manual Flashing With The Arduino Software” (which should be merged with " Flashing Of The AirGradient Firmware") under one big section called “Updating firmware”. I would also add a OTA-section that explains why there is no OTA option available anymore since the switch to open-source, that people should use the other two ways for now and that you are looking to likely add this feature back in the future.

This “Updating firmware” section would then be split into in this order:

  • Over The Air (OTA)
  • Direct Flashing Through The Browser
    – With “BOOT Error During Flashing” nested into it.
  • Manual Flashing With The Arduino Software
  • Changelog
  • Planned features

Putting this all together makes it much easier for people to read the documentation. I would put this all right below the “Assembly”-section.

Edit: I’m doing these suggestions because I suspect that many know the product is good, but maybe deciding not to buy the device because of partially unclear documentation. That was honestly the reason I was doubting purchasing it for a few weeks before I eventually did. Only because I knew you had a good forum that I decided to take the chance.

@Achim_AirGradient
I just updated to lates version of Library version 3, it looks great!
If I would like to downgrade it to last version by Web Flash is it possible?
Is all the configuration is setup on Dashboard? It cannot configure by the unit setup as the last version?

About configuration: The AirGradient ONE Air Quality Sensor (Presoldered-Version, PCB Version 9)

Password for WiFi manager is “cleanair”. I will make that clearer in the instructions.

Have you ever thought about putting an ozone sensor in one of these? Ozone measurement would be a lot more useful to me where I live (Texas, USA) than PM2.5. I’d love it if this was on the roadmap so i can get it from you.

I’m sure there are other options, but the first sensor I found is $50 which makes it more expensive than any other current sensor in an AirGradient.
Gravity: I2C Ozone Sensor (0-10ppm) — Arduino Online Shop

What would you do if you detected that Ozone was high concentrations? I wouldn’t even know what an action item would be, compared to high CO2 meaning open window to exchange fresh air, or high PM2.5 which means to close up shop so filtration can try to clean the particles out.

There are a couple of sensors that could be added. Not only ozone but also formaldehyde, pressure, radon, carbon monoxide etc.
Some of these are hard to get, some quite expensive and difficult to calibrate.
With our standard sensors we aim to address a common need of sensors. Additional ones can be easily integrated because the monitors are open source hardware.

1 Like

Being daft here, but I haven’t tweaked the source since I installed my AG One. Using ESPHome with Home Assistant, but can’t 100% recall which implementation I used. It starts with

# AirGradient ONE - Board v9
# https://www.airgradient.com/open-airgradient/instructions/overview/

What’s the best way to update? Can I do it OTA or do I need to connect to my computer again?

Thanks for your patience :slight_smile:

@sreston It all depends on how you imported it to ESPHome/HomeAssistant

If you downloaded a .yaml file and added it to your ESPHome, then you should be able to do an Over The Air (OTA) update without plugging it in. It would depend on which file you based it on, but if you based it on my config, you would update a few lines here so it looks mostly like this file, but you would have your own wifi information and encryption keys present, and you can change the name to what you like:
airgradient_esphome/airgradient-one.yaml at main · MallocArray/airgradient_esphome (github.com)

Assuming I don’t do any other major changes, as I update the different packages, you would just tell ESPhome to install again and if I push any changes to the same file names, you would automatically get the latest changes.

If you based it on another config, you may need to check with their version to see if they made any changes.

@Achim_AirGradient
I have updated Airgradient ONE v9 to version 3.0, what is the Left LED mean in Purple occasionally?
As I understand that only the Right 2 LED is setup for Co2 or PM2.5 indication.

Would I suggested to show PM2.5 and Co2 status on the LED Bar such as on Left and Right on the LED Bar?

Also is there any information on the Status of LED color definition for easy understanding?

1 Like