#ESPHome, bluetooth proxy, and airthings-ble with Airthings Corentium 2?

1 messages ยท Page 1 of 1 (latest)

frozen laurel
#

Anybody here doing ESPHome with Bluetooth proxy mode?

I got an Airthings Corentium 2 sensor, which is (allegedly) supported by the airthings-ble integration.

I set up an esp device in bluetooth proxy mode, and deployed the firmware to the esp32. However if I try to add the airthings-ble integration I get the old "No devices found on the network" error.

I see people usually use the airthings wave plus and successfully use it either via bluetooth proxy, or by having the esp32 use the native airthings client. I'm curious if anybody has a working config either using the proxy or via native esp driver (and if using the native esp package, what settings did you use for the corentium 2? the project only supports a few of their devices and the corentium 2 is not on the list...)

drifting sun
frozen laurel
#

the device is showing under the bluetooth integratio, but I'm not sure how I make sure that it is registered (or whatever the term is) as a proxy.

frozen laurel
#

yeah, it does show a lot of bluetooth advertisements

drifting sun
#

the visualisation tab is cool btw ๐Ÿ˜›

#

but in any case, the proxy is seeing stuff

frozen laurel
#

and yes i do see the airthings device under the advertisement list (its mac adress shows up)

#

yet, if I try to add the airthings-ble integration, I still see the "no devices found on the network" message

drifting sun
#

the documentation supported device list does seem to be limited and not include the "Corentium 2"

#

did you see somewhere that the model is specifically supported/working?

frozen laurel
#

the airthings official supported device list is:


This library supports the following Airthings devices:

    Corentium Home 2
    Wave Enhance
    Wave Gen 1
    Wave Mini
    Wave Plus
    Wave Radon

I should probably dig through the home assistant code to see if ha actually uses this version of the integration though....

drifting sun
#

do you have latest HA version installed?

frozen laurel
#

ah I am two months out of date I guess, 2025.8.2. will upgrade.

#

kinda wish there was a way for me to see which version of the package my ha version was trying to snag. if it's the 1.1.1 version then I don't think this will help?

#

but worth a try ๐Ÿ˜‰

drifting sun
#

couldn't hurt to update. however to be fair I think the 1.1.1 update might not be in latest

frozen laurel
#

kinda funny. i've had the sensor for a few months now and tinkered with it on and off since then. i hadn't paid attention to the ha side of the integration, just looked at the airthings project before.

drifting sun
#

yeah latest is still using 0.9.2

frozen laurel
#

after the upgrade still no dice. even after rebooting the ha machine.

#

oh interesting

drifting sun
#

looks like there's a bunch of other PR'S to the integration recently. looks like there were some other cchanges that went along with the bump

#

my general recomendation would be that you sit tight until 2025.11 if thats an option?

frozen laurel
#

sure why not ;-). if there's a handy way of installing an out of band version of the package I'd be willing to give it a go, but I can wait too.

drifting sun
#

you could edit the manigest and requirements file to bump it but given theres a few other things happening in and around it. it looks like you might break stuff without everything together

#

you could manually bump the entire compnent but its not "simple"

frozen laurel
#

what fun. well, it's running on top of a vmserver so I can always snapshot it and try to tinker, if I'm feeling like hating myself ;-).

drifting sun
#

you "COULD" run nightly if you were adventurous...

frozen laurel
#

kind of annoying, the terminal/ssh server seems to not work on my server any longer. sigh.

#

ohwell, this has been educational, thanks!

drifting sun
#

no worries, if it were me and its non-critical then I would leave it

frozen laurel
#

yeah HA for me is more of a goofy tinkering and data logging thing. radon in my basement isn't at levels that will kill me. yet. ;-).

drifting sun
#

at least we figured out that your proxy works ๐Ÿ˜›

frozen laurel
#

yeah. the ux is a little weird for looking at the observed devices.

drifting sun
#

yeah its hidden a bit

frozen laurel
#

seems to be: click on bluetooth, then click on the esp32 adapter's mac address.

drifting sun
#

have to hit the cog on a BT device to get to the menu which is a bit strange

#

BT proxies are fun though

frozen laurel
#

an yeah that works too. i found it via this:

drifting sun
#

if you get a bunch of them you can track where a device is by its signal strength

#

here gets you to menu for BT stuff

frozen laurel
#

heh yep. i saw a honda infotainment system pop up as a car drove by. hah.

I was messing around a bit ago with a rtl_433 temperature sensor (no ha access to that data yet either, that'll be another project). but watching the vehicle tpms go by is kind of amusing.

drifting sun
#

I see 1000+ devices daily with my net of proxies

frozen laurel
#

what fun. yeah i just have the one bluetooth proxy (in the basement, so it doesn't see quite as much of my neighbor's stuff)

drifting sun
#

i can tell which room a smartphone/smartwatch is based on it so can see which room a person is likely in

frozen laurel
#

spiffy

#

makes sense, given the short range of a lot of this ble stuff

drifting sun
#

most shelly devices having built in proxies is super nice too

frozen laurel
#

what's a shelly device?

drifting sun
#

they make power monitoring/switching stuff

frozen laurel
#

ah

drifting sun
#
Shelly Europe

Shelly provides advanced smart home automation solutions for seamless control of lighting, temperature, and energy. Make your home smarter today.

frozen laurel
#

future project is energy monitoring yeah.

i used to use a little clamp on ct on my mains, along with an industrial revenue meter to watch current flow

drifting sun
#

highly recommend if your in the market for that sort of thing. they activly work with the project for support

frozen laurel
#

haven't done anything to monitor power in the new house though

drifting sun
frozen laurel
#

might do. i'm guessing homeassistant doesn't have dnp3 protocol support (hah)

drifting sun
#

it has modbus, but no idea if anyone has made dnp3 work

frozen laurel
#

modbus is spiffy enough

#

this shelly company looks neat though, and some of these relay+power monitors with wired ethernet is a plus.

drifting sun
#

they have so many options for stuff. i have a bunch of things

#

the gen4 stuff can support zigbee. and they also have z-wave versions of some of the stuff too

frozen laurel
#

i have never poked around ha internals much before. scapy? hehe, this is fun.

#

now i need to know what integrations rely on that ;-).

drifting sun
#

ha, welcome to the dark side! you are here forever now ๐Ÿ™‚

frozen laurel
#

i am kind of curious about playing with this new airthings integration, but I'm a little lost at these instructions: https://github.com/Airthings/airthings-ble/wiki/Testing-with-Home-Assistant .

what exactly is 'core'? I assume that this is some kind of developer package which must be installed inside of the homeassistant docker container somehow?

GitHub

Library to control Airthings devices through BLE, primarily meant to be used in Home Assistant. - Airthings/airthings-ble

drifting sun
frozen laurel
#

bummer ;-). Yeah I was trying to see what it meant by directory layout and didn't see anything like it on either the main hosty os or inside of the homeassistant docker container. ohwell.

#
/usr/local/lib/python3.13/site-packages/mashumaro/core
/usr/local/lib/python3.13/site-packages/numpy/core
/usr/local/lib/python3.13/site-packages/poetry/core
/usr/local/lib/python3.13/site-packages/imageio/core
/usr/local/lib/python3.13/site-packages/crownstone_uart/core
/usr/local/lib/python3.13/site-packages/crownstone_core/core
/usr/local/lib/python3.13/site-packages/xknx/core
/usr/local/lib/python3.13/site-packages/pubsub/core
/usr/local/lib/python3.13/site-packages/pandas/core
/usr/local/lib/python3.13/site-packages/psnawp_api/core
/usr/local/lib/python3.13/site-packages/oauthlib/openid/connect/core
/usr/local/lib/python3.13/site-packages/authlib/oidc/core
/usr/local/lib/python3.13/site-packages/pyatv/core
/usr/local/lib/python3.13/site-packages/netaddr/tests/core
/usr/local/lib/python3.13/site-packages/azure/core
/usr/local/lib/python3.13/site-packages/fritzconnection/core
/usr/local/lib/python3.13/site-packages/synology_dsm/api/core
/usr/local/lib/python3.13/site-packages/hamcrest/core
/usr/local/lib/python3.13/site-packages/hamcrest/core/core
/usr/local/lib/python3.13/site-packages/elevenlabs/core```

negative I guess ๐Ÿ˜‰
drifting sun
drifting sun
#

or go balls to the wall and just run dev directly from the nightly builds

#

can always switch back to normal stream when 2025.11 hits. or even switch to beta stream when beta hits in a few days.

frozen laurel
#

ooh, might give it a try when im back home.

frozen laurel
#

๐ŸŽ‰

#

thanks for the tips. took me a little tinkering to switch to the dev branch. i'm still not sure why, but the 8123 port forwarding didn't start even after I rebooted the main/host os (I don't really know the term for that, but the main host os being the one that runs all the docker containers). i was hunting around the docker config files to answer why, everything looked fine, so i rebooted again and the port forwarding magically started working? (I didn't change anything!). hurumph.

#

next stop: getting the rtl_433 doohickey integrated into ha. i think this will be a bit easier on the ha side, but means i get to write my own mqtt client doohickey.

frozen laurel
#

I suspect there is a conversion area and that it is showing becquerels per cubic meter and not pci/liter as it states.

#

also pretty silly, the thing only stays connected to bluetooth for a few minutes, then disappears. have to press the little bluetooth sync button on the sensor each time. i should read only how ble actually works...i assumed homeassistant would send some kind of 'subscribe' message to the sensor, then the sensor would send data packets every once in a while. it seems like ha connects to the device, issues a few commands, then goes idle...then the sensor, not seeing any commands for a while, decides nobody is using bluetooth so shuts the interface off.

frozen laurel
#

okay, solved the problem. I think.

the airthings device shuts off its ble interface after 10 minutes.

i installed the ios app (grrr, having to sign up for an account). I did this thinking that maybe there was a firmware update available for the corentium. there isn't. but I am pretty sure that the ios app must send a command to the corentium which says "keep your ble interface on always". because now the ble interface on the corentium does not shut off after ten minutes, even after I turned the bluetooth interface off on my mobile device.

my guess is the airthings-ble homeassistant integration needs to send this same command (whatever it is) to direct the silly thing to keep its ble interface on.

#

yeah it's been running for an hour now, pretty sure this is the answer. opened a ticket on their github page describing how to reproduce and probably how to solve the problem.

drifting sun
#

I recommend switching back to stable branch when you no longer need dev (you can do this in the UI) as it will help ensure a stable enviroment. but its up to you

#

it seems that fine times are being had all the same though ๐Ÿ™‚

frozen laurel
#

yeah, I'll switch off dev once the patches are in.

i showed the airthings folks where they had a conversion error too. they forgot to apply the becquerels per cubic meter => picocuries per liter conversion factor for the method that gets data off my device. it's kind of funny since homeassistant says 93pci/l. this would signify that I had a bit of processed uranium ore in my basement (i don't). they apply the "is this dangerous" method to the number before conversion, so my sensor says this level is still low/normal/fine by US limits.

#

anyway they agree with both my findings and already have a patch for the unit conversion. they're not sure how to make the device keep its ble interface on full-time, they seem to think that would be a homeassistant-core responsibility? which seems odd to me, but I don't know much at all about BLE. perhaps there is a generic command that you tell a ble device to keep the transmitter enabled. if so I'll figure that out before too long.

#

and yeah lots of fun.

drifting sun
frozen laurel
#

ah i misunderstood what they even said. i think i read a reply to a different ticket. i think for them it is more of an issue of whether they want to put the necessary command to turn on ble full-time in their open source integration. i suspect it's a GATT command that they have to send, and they might not want to make the command publicly known...

open jetty
#

Thanks @frozen laurel and @drifting sun for your exchange... made me realize I'm not crazy and once I had my proxy visible & rebooted twice I could run the AirthingsBLE integration and it popped up.
Now to replicate the fancy graph...

frozen laurel
#

i need to see if i can move my HA back to the not-beta version. the airthings people made some patches based on my feedback, i'm not sure if those changes have made their way into the standard HA releases yet.