AirGradient Forum

Operation of One / Open Air devices Using Only Bluetooth

Does anyone, but especially MallocArray, have any experience getting either of the mentioned AirGradient devices to operate as a Bluetooth discoverable device (and having the initial setup and all of the ongoing communication with the device done via BT instead of WiFi)?

If not, is it something that seems not just theoretically possible, but realistically possible, using esphome and yaml files? Would it require extensive development of and flashing of a totally new bin file, or is there any existing esphome yaml code for the esp32-c3 controller, itself, that could be added to my devices that are already running the MA esphome firmware to enable that BT functionality?

I understand that running a Bluetooth service on these devices might strain the limited resources of the controller, but also have read that other things that are not being used might be able to be disabled (like the captive portal for WiFi), thereby freeing up more resources for the BT.

I get that this may seem like a pointless thought exercise to many AG device users who are happy (or need) to use the device via WiFi, but it seems to me that this alternate use case could appeal to some users and I would appreciate it if any voices of experience can speak to the real world feasibility of operating the devices this way.

Extra background info for my use case:

I have been operating one AG One and one OpenAir device for the past 9 months. During that time I have been successfully running both devices using MallocArray’s airgradient_esphome firmware from GitHub, connecting via WiFi to a Home Assistant OS server running on an old Raspberry Pi 3.

Before I originally purchased the devices, I read that the esp32-c3 controller in these devices supported Bluetooth and 2.4GHz WiFi, and I was planning to use only BT as I live in a small apartment where BT covers the entire area. As I have also been running several Switchbot temp / humidity sensors that connect to HA only using BT, I have been happy with that mode of operation and not needing to go through the trouble of configuring the devices to work with WiFi when HA easily detects local Bluetooth discoverable devices.

I use the full_config yaml files from MallocArray, and don’t have any desire to have any kind of automatic updates that would require WiFi. I do not connect my devices to the AG Dashboard, upload my data to OpenAQ (as I prefer to keep my data local) or access my sensors from anywhere other than the local network.

Even though I went through the extra configuration necessary to get my two AG devices working with my WiFi, and they have been working well, I still would be interested in running them as Bluetooth only devices if that were realistically possible.

I searched through the AG forums and only found one previous post that references this idea of BT only use (Outside unit bluetooth), but what looked like an official AG response indicated that they never used the devices that way, even though it would be theoretically possible.

I did a brief search and I don’t see any mention of using Bluetooth to connect an ESPHome device to HomeAssistant.
What I do see is plenty of references of using Bluetooth on the ESP device to act as a proxy, so if you didn’t have bluetooth coverage in your entire house, you could put an ESPHome based devices in the uncovered area where Wifi still works and use it’s bluetooth radio to talk to nearby devices and pass it back to HomeAssistant.
This isn’t quite what you are looking to do, but an interesting use case.

Bluetooth Proxy — ESPHome
How to turn an ESP32 board into a Bluetooth proxy for Home Assistant | ESPHome Bluetooth Proxies - Kiril Peyanski’s Blog
Guide: Bluetooth Proxy to Home Assistant using ESPHome – Creating Smart Home

1 Like

Yes, when I did my own online search, I also found the bluetooth proxy info, which is cool, but sadly not applicable to my intended use case.

At this point, I am still toying with the idea of taking this on as a pet project, but I have no idea how to go about it. As someone who has built and maintained a custom esphome firmware for these devices, do you even think that it would be possible to achieve my goals using esphome and Home Assistant?

If so, could you give me a general idea of the process / bullet point steps that I would need to research to even try?

In some of my earlier research, I found several reference articles that I tried to link in this reply, but keep getting an error, “Sorry you cannot post a link to that host.” The links included esphome and the HA forum, but it didn’t allow them. Any ideas why not?

I think new accounts on the forum may not be able to post links for a certain amount of time to prevent spam.

From what I’ve seen I don’t think ESPHome supports what you are wanting to do. If anything, I would suggest posting on the Home assistant forum or the ESPHome Discord since this is fundamentally and ESPHome question. If it supports it, then adding it to AirGradient hardware should be possible as long as that chip is supported.

But Bluetooth is an entirely different stack, so unless I’m missing something, it would be a big project and getting it integrated with the ESPHome project itself is a big deal

Thanks for the info. If I choose to pursue it further, I will try one of the more applicable forums / methods that you mentioned.

There were a few online resources I found that specifically related to the ESP32 series of chips and their use with BT and BLE, with info about setting the ESP32 up as a BT server to be accessed from a client like the one in HA. I may review those before giving up on the project.

Thanks again!

I am sure that the ESP32-C3 chip itself would support communicating to other devices over Bluetooth, and I think I’ve seen some devices that can integrate with HomeAssistant over bluetooth directly.

I just don’t see any current evidence of ESPHome supporting doing it.