#bluetooth-archived

1 messages · Page 6 of 1

fringe field
#

Crash constantly

#

Ha tries to work around it by restarting the chip but you’ll still probably see gaps where the chip was dead

#

(Some of them are so bad you have to unplug them and plug them back in to recover from their broken state)

#

(If it hasn’t shipped yet, I’d cancel the bt500)

junior holly
#

Ok thank@you very much

mint summit
#

Can I completely rely on esphomes BT proxy’s and have no own bt dongle on the Raspi itself? Will I still be able to use all bt devices as usual?

fringe field
#

The only other thing to watch out for is that the proxies are for BLE, you can’t use the proxies for Bluetooth audio for example.

#

But there isn’t a built in integration for Bluetooth audio. Generally if there is a built in BLE integration for a device built in (like inkbird_ble or Xiaomi_ble) then it should work fine.

true raft
#

Does anyone here know if I can link esphome ble_client to mqtt for controlling the client over mqtt?

fringe field
#

It sounds like you are kinda reinventing the esphome Bluetooth proxy feature but over Mqtt? I don’t think there’s anyone working on that in core. The effort has been making Bluetooth proxies work natively with ha integrations directly, without needing mqtt at all.

#

There has been some work to pull the proxies code out of ha so you can do dev without ha. When that is mature you could probably make your own mqtt adaptor to that.

#

But if you have the python skills to do that it’d be easier to just make a ha integration targeting the proxies directly

#

(Of course the proxies code is so much more than just a wrapper around the ble client - it handles things like picking the nearest esp for connections, keeping tracking of how many connection slots are open (esp devices can only handle a couple of connections at once, so nearest esp might not be the best esp) and can use one or more usb dongles at the same time too)

vital bane
#

I need your help! I was given the xiaomi kettle the smart one but with bluetooth app. Can I integrate it with ha?

fringe field
#

If you have working Bluetooth in HA and the kettle is close enough and supported it would be automatically detected if it was supported.

#

The only Xiaomi kettle I can see in xiaomi_ble is YM-K1501 and it doesn’t control the kettle.

true raft
#

or with HA is fine but I want to be able to drive with code outside HA

spice zephyr
#

Need a little help understanding ESPHome Bluetooth Proxy. I decided to play around with Bluetooth on HA so I made Bluetooth proxy using the ESPHome Ready-Made Projects for ESP32. The proxy is working and quickly discovered a Nutrichef Smart BBQ Grill Thermometer that is supported in the Inkbird Integration. The question I have is how often should I see the data update. It appears to typically take 30 to 40 seconds and I don’t know if this is a function of the Inkbird Integration and/or the ESPHome Bluetooth Proxy? I have moved the Nutrichef and Bluetooth proxy as close as a couple of feet apart and up to 25 feet apart and doesn’t seem to matter. I have also located them in different areas of the house to see if there is any interference. When I use the BBQ app on my iPhone the temperature updates almost instantly. I also noticed when using the BBQ app the Bluetooth proxy doesn’t respond at all so I assume they can’t be connected at the same time. The 30 to 40-second update time is not an issue I am just trying to understand how it is working. I plan to use the Inkbird integration with Home Assistant because the Nutrichef device and the iPhone app have a limited range

fringe field
#

WiFi can mean you miss some updates , as the Bluetooth and WiFi features share the same radio. So it switches between Bluetooth and WiFi as fast as it can.

#

Now last time I looked the inkbird integration used a passive method to get updates. It listened for disconnected broadcasts. These are one of the most power efficient ways to send data.

#

That works great with the inkbirds I have in my freezer (again, updates crazy fast)

#

It’s possible your grill thermo doesn’t update as fast because you are meant to use it with the app open.

#

When the app is open it will establish a 2 way connection and actively subscribe to the temperature and get notified as it changes.

#

(Probably)

#

HA avoids ble notifications where it can, they force connections to be left open (connection slots are a limited resource! A proxy can only handle a couple at once).

#

It’s not uncommon for a device to stop broadcasting when it’s connected to a device with a 2 way connection. The broadcasts are often used for discovery so the device thinks that they are no longer needed.

spice zephyr
#

Thanks- that makes perfect sense.

true raft
#

Time slice the devices

fringe field
#

My inkbirds have been running about a year so far without changing batteries. Changing to polling for them would decrease that life expectancy and decrease the range that data can be collected at. So it wouldn’t make sense to make the entire integration polling. You could write a new polling integration just for your grill sensor.

true raft
#

Probably right on range but depending on the device and the connection parameters used, being in a connected state can be less power than advertising

fringe field
#

Yeah it does. I only have experience with Xiaomi devices (polling those takes months off them) and homekit (which goes to great lengths to avoid connections and notifications - building an encrypted mechanism on top of adverts to send per characteristic updates)

#

The Linux Bluetooth stack is less well optimized than eg the Apple stack. So I know there’s a big difference there. No idea where bluedroid fits in.

#

I think the solution for you is still to write a custom integration to suit your devices characteristics, if you need more frequent updates. Polling integrations and passive advertisement integrations are structured differently so it’s easier to just start from scratch.

vestal pebble
#

Hi all, I've just built my first esp32 BT proxy - do I also need to install the BT integration (tried, it says no adapter found), the guide page seems vague to me 😦

fringe field
#

The Bluetooth integration is for Bluetooth dongles

#

You have one Bluetooth integration per dongle, and none otherwise

vital bane
#

Device is not registered in Tuya cloud

#

When configuring the Cube touch II

vapid pond
#

Hey should a bluetooth speaker appear in my devices automatically if it's in pairing mode? I have a raspberry pi 3b+. I thik the bluetooth is working but I didn't do anything special while setting it up

fringe field
#

Bluetooth integrations in HA are for BLE things using GATT or broadcasting data (sensors). There’s no Bluetooth sound integration.

#

Mostly that means sensors, plus a few bulbs, locks, etc.

vapid pond
fringe field
glacial portal
#

Hi all, I found in the drawer this Yeelight Dimmer switch https://www.manualslib.com/manual/1872030/Yeelight-Ylkg08yl.html#manual
The xiaomi home app does not discover the device, and HA needs the bindkey for decrypting the communication.
I haven't quite figured out how to use the https://atc1441.github.io/TelinkFlasher.html, reason why I'm first trying to extract the bindkey, but the app doesn't find the device.
Can anyone please help?
Same is with yeelight app. It scans for devices but never finds it.

safe laurel
#

I set up a BT proxy using esphome. It is detected under the esphome integration in hass so I configured it, is there anything else to be done to set this up? I also saw an "iBeacon Tracker" integration automatically detected, I added that as well but it doesn't have any device

dim lagoon
safe laurel
#

I enabled the BLE transmitter sensor on my android phone, now what? how can I make use of that in the ibeacon tracker integration? I'm confused. That's all I see https://ibb.co/yP8Fqng

dim lagoon
safe laurel
dim lagoon
dim lagoon
#

You could have not added it (and hit ignore instead)

safe laurel
#

I see

#

but it's required for beacons I assume

dim lagoon
#

Specifically: iBeacons 🙂

#

It is a very specific/special kind of beacon

safe laurel
#

got it

#

can the android phone act as an ibeacon via the companion app?

fringe field
floral parrot
#

Hello everyone, I got a usecase and I'd like to have your opinion on the feasability.
I'd like to use voice assitant to play spotify on a BT speaker. From what I've seen, the pipeline to have spotify played on a speaker is doable, my question is about the speaker itself. Right now I'm using some small esp device (with shitty speaker) to capture voice and playback sounds, but what if I want to play spotify music on a nice BT speaker ? I dont want to have the BT speaker turned on H24, so will it possible that when I say "play some metallica on bedroom speaker" that it turn on the speaker (with some smart plug for exemple), then the BT speaker reconnect to the HA (on a proxmox in my case), then play the music and stay on for a while ? How about delay ? How did you guys handle your BT devices, always on ?
I'm checking before buying a BT dongle (if you have a nice and not expensive reference btw 😄 )
cheers

fringe field
#

There’s no core support in the main Bluetooth integration for audio.

#

I don’t think there is any support in haos for setting up audio devices, but like I said, it’s not my area.

floral parrot
#

hmm too bad, from what I'm reading, people are doing that by adding device to spotify then use spotify API to tell spotify to stream audio to that device, so basically HA is just for sending order to spotify

fringe field
#

So using the Spotify connect addon?

#

I think you’d need to configure bluez (the Linux Bluetooth stack) to map the speaker up like it was a local sound output.

#

I don’t know if there is Ui for that. Might be but I’ve never seen it. But certainly not part of HA Bluetooth integration.

floral parrot
safe laurel
#

I'm using an atom lite as a BT proxy and got a switchbot bot to test it. The bot is 2+ meters far from the atom lite, direct line of sight and the bluetooth signal entity is saying -75 dBm, that's not normal, right?

fringe field
safe laurel
fringe field
#

Have never seen a value that low with either Linux Bluetooth or an ESPHome proxy

#

Usually good for me is -70 to -80

#

That’s with dongles that have external antennae and proxies that do too

safe laurel
#

I see, good to know, I'm no expert in that whatsoever, thanks

#

if I get several atom lites connected, is it possible to know which one is being used by the device/bot ?

fringe field
#

Depends on the integration

#

No idea for switchbot

#

For the ones that expose device tracker you might see an extended attributed on the device tracker entity.

safe laurel
#

I see

#

if the device's signal is -84 dbm, is it good enough without adding another proxy or is it better to put one there?

fringe field
#

For a broadcast based integration where you can tolerate losing some packets (eg you see broadcasts every few seconds and it’s only humidity or temp or similar) then I’d probably not bother until I could see gaps in data in graphs.

fringe valve
#

Question i bought a CSR8510 A10
to connect to my switchbot curtains, but u dont get any device discord, how does this work

#

i added the device in my integrations, it became discoverable on its own

#

so that works, but i dont see any bluetooth devices

#

i use HASSOS

#

on proxmox

fringe field
#

Check your dmesg output - there are fake CSR chips on the market. Linux might detect it as a fake or have random errors for it.

fringe valve
#

where can i find this ?
dmesg output

fringe field
#

The shell command “dmesg” on Linux systems

#

I assume you can ssh into proxmox and it’s just a thin wrapper around Linux? I’ve never really looked at it sorry

#

The other thing that stands out is that USB passthrough of Bluetooth to a vm has also been a problem for some people. To the point that they’ve gotten extra pci-e usb cards to passthrough the whole card, or ditched their vm server entirely.

fringe valve
fringe field
#

Some Bluetooth devices (Xiaomi temperature sensors) can be flashed with custom firmware that enables zigbee

#

But if you want to avoid usb Bluetooth and get full house coverage your best bet are esphome Bluetooth proxies

fringe valve
#

would love to avoid the dongle XD

#

bought it quz i didnt know better

#

and it aint that far, but i know that my headset already has issues with the connection to my pc

#

same distance

#

is there a guide to those proxy's?

#

and what i best can buy

fringe field
#

They are very popular

#

You’ll be able to find guides and videos

fringe valve
#

how does it work?

#

via wifi?

fringe field
#

Yeah or Ethernet if you buy an esp with a socket

#

With Ethernet they are pretty much on par with usb dongles if not better

#

But they needed soldering to flash custom firmware. Easy if you can solder!

#

But they don’t have Ethernet or a dedicated antennae

#

Still fine if close enough to target device

fringe valve
#

i dont know how to solder

fringe field
#

The 2nd link doesn’t need soldering 🙂

fringe valve
#

its micro usb powered?

fringe valve
#

aslo says the atom lite

#

so i guess ill go for that 1

#

i can put it like 2m apart from it

#

so the connection should be good

#

nice they are also sold on amazon

#

does this also have wifi?

fringe field
#

The 2nd 2 I linked to are WiFi only

fringe valve
#

ah ok

#

thats fine

worthy locust
#

My Bluetooth integration is repeatedly failing and reinitialising. How can I start debugging?

Rpi3b with haos

I have mijia bthome thermometers so this is a big issue for me

#
Logger: bluetooth_auto_recovery.recover
Source: components/bluetooth/util.py:78
First occurred: 12:51:34 PM (159 occurrences)
Last logged: 1:42:16 PM

Could not determine the power state of the Bluetooth adapter hci0 [B8:27:EB:6C:58:04] due to timeout after 5 seconds
Could not cycle the Bluetooth adapter hci0 [B8:27:EB:6C:58:04]: [Errno 110] Operation timed out
Bluetooth adapter hci0 [B8:27:EB:6C:58:04] could not be reset:
Closing Bluetooth adapter hci0 [B8:27:EB:6C:58:04] failed: [Errno 9] Bad file descriptor
#
Logger: bluetooth_auto_recovery.recover
Source: runner.py:188
First occurred: 12:51:58 PM (44 occurrences)
Last logged: 1:42:00 PM

Bluetooth management socket connection lost: [Errno 22] Invalid argument
worthy locust
#

Is the Passive Ble Monitor more stable?

fringe field
#

The “auto recovery” code is kicking in because ha knows your Bluetooth chip isn’t working. It’s not the integration that’s failing, it’s the hardware.

#

If you are using the internal Bluetooth on your pi, the auto recovery doesn’t work because the Bluetooth chip is connected by uart not by usb.

#

We’d recommend a usb dongle from the list on the official ha Bluetooth documentation, ideally with an external antenna, and with a usb extension cable to get it some distance from the pi.

#

Or an ESPhome Bluetooth proxy

#

(The range on your pi is another issue is another problem waiting to happen)

#

In the meantime, setting ha to use passive discovery (it’s an option on the Bluetooth integration) and doing a full power off and on may help.

worthy locust
#

I am waiting on a sonoff zigbee gateway anyway. I'll convert the thermometers to zigbee. So problem should be gone then.

worthy locust
fringe field
#

There is no recovery possible for uart

#

The usb recovery works by simulating a usb unplug and replug, uart is old and does not have such mechanisms at all hardware level.

#

If the chip is breaking there is not much HA can do

worthy locust
#

Weird that the RPI doesn't have a ble recovery in their API at all?

fringe field
#

Not really

#

There’s not a thing called ble recovery

#

It’s a workaround ha came up with because Bluetooth under Linux is a bit crap

#

Iot is more demanding than connecting a headset, phone and keyboard and mouse to a pi. We have to process many events a second (in a dense urban environment near a main road, hundreds) and that might explain why some pi users are fine.

#

The range of the thing does come up a lot. We’ve had users complain about there device only working at 1m or less

#

Again we cant change RF characteristics in software

#

Oh and let me say this. Auto recovery is not a good thing. It’s not like if your pi had it you would be happy.

#

It takes ha a while to notice there is a problem. The chip doesn’t announce it’s dead.

#

And some chips crash often

#

I had a Realtek one that died every few minutes

#

Even with auto recovery I missed a lot of data

worthy locust
#

Understood. I hope it works out for zigbee

crimson pine
fringe field
#

The downside of the type of board you have selected is its wireless. The esp32 has one radio and WiFi and Bluetooth have to share it. That means it switches from Bluetooth to WiFi and then back to Bluetooth. It means it can miss some broadcasts. Eg my Xiaomi temp sensors broadcast often enough that I can miss some packets and it not matter.

#

It also has no external antenna which will limit its range.

spare geyser
#

Before I was using only 1, and it was closer to 1 of the 3. So the other 2 were slower to respond. But now all 3 work great since I added another one.

#

I definitely need to get at least 2 more. Using the Hub 2(via Matter) to control the Curtain Bots sucks.

#

It fails to execute the command too often. The ESP32's have never failed me. Even if they took 30 seconds to work, they still worked.

crimson pine
#

eh..i just bought the one linked a little above with the antenna that has an ethernet port so i can not have to fuss with it. gonna return the ones i bought from amazon.

frozen sage
#

I installed the ESP32 bluetooth proxy on my generic ESP32 and I've only got a 16 line YAML code which feels short considering all the configuration that the BLE hub and tracker require. Is the below portion importing all of that for me?

packages:
  esphome.bluetooth-proxy: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main
fringe field
#

Yes, but it’s not a lot even then

#

It’s like 1 line to make sure you are using esp-idf (not arduino), and a couple to turn on the proxy in active scanning mode. Then the rest is the usual stuff to turn on the esphome api, ota updates, wifi, etc.

#

Avoid messing with esp32_ble_tracker “scan parameters” for WiFi only Bluetooth proxies, it can make things far worse

limpid mural
#

has anyone come across a way to connect a keyboard to an esp32 via bluetooth to use as a keyboard remote?

#

I've got a bluetooth macro pad that I'd like to use as a control panel

#

have a few spare pis lying around too I could use if thats a preferable method

#

unfortunately, I'm out of direct bluetooth range, so there needs to be some amount of network relay

fringe field
limpid mural
#

oh interesting thanks, I'll take a closer look at this

fringe valve
#

thx a bunch

earnest vortex
#

I installed ESPresence and have Apple devices. When I go to enroll my iPhone 15 Pro (iOS 17.2), the Bluetooth pairing doesn't ask to pair securely. I just get the normal pairing prompt. Thus, no iPhone comes up as an enrolled device. What am I doing wrong?

late panther
#

Hi, I have an HA yellow. I couldn't figure out whether or not it has bluetooth, or how to enable it, does anyone know?

fringe field
#

I don’t believe it does.

#

If it did, it would be provided by your CM4 module. And then it’s the same as the pi4. And if you search in here you’ll see pi4 users struggling with reliability and range. Much better off with a usb adaptor from the high performance list (on a usb extension cable to get it away from interference from the pi). Or getting an ESPhome based proxy.

brisk fractal
#

is there any way to know which bluetooth proxy a bt device is connected to?

oblique oak
#

It will be in diagnostics, and if you turn on debug logs

brisk fractal
fringe field
#

Private Ble device is one that does

brisk fractal
#

ah I see. Ok. I was just trying to sort out why the rssi for 2 devices is so low. There is a proxy right near them so I suspect it's connecting to one that is much further away

fringe field
#

One thing to watch out for if your integration requires an active connection - the proxies can only handle a handful each.

#

For passive Bluetooth like inkbird that’s irrelevant, but a bit of a pain for eg air things

brisk fractal
#

yeah. It's a switchbot curtain which I think does require an active connection. I currently have 2 proxies + the built in BT of the rpi

fringe field
#

Both proxies esphome and recently updated?

brisk fractal
#

yup, latest esphome

fringe field
#

Shelly’s aren’t full proxies and caught a few people out

#

There was a setting that said whether or not esphome was allowed to make connections. Worth double checking that is turned on on them both. Think it’s the “active: true” under Bluetooth proxy. But I might be mistaken there.

brisk fractal
#

hmm let me check especially since the bt settings are just being pulled from github

#

yup both have active true

fringe field
#

Ah, we were both thinking about diagnostic sensors.

#

But the diagnostic download for the Bluetooth integration will have every device HA can see

#

Categorised by scanner

brisk fractal
#

ohh

#

since te diagnostic info on the bt integration is only for the dongle I assumed it wouldn't have info for proxies

spare geyser
#

My Switchbot Hub 2 has turned into a $70(okay I paid $56) climate sensor 🤡

#

I can deal with delayed commands, but it failed to execute the command too often.

#

So I got another 3 pack of ESP32's. Why are these $5 things way more reliable than the $70 hub from Switchbot?

fringe field
limpid mural
# limpid mural unfortunately, I'm out of direct bluetooth range, so there needs to be some amou...

In case anyone comes back to this looking for an answer about remotely connecting keyboards to control HA, @fringe field's comments were correct that keyboards won't work with the proxies (or the ble remote). The solution I ultimately came up with was to use a Raspberry Pi Zero w to connect to the keyboard over bluetooth, and then use triggerhappy on the Pi to trigger scripts to call the HA API over the network. So far, fairly reliable.

orchid tendon
#

Ok some searching in discord and google did not give me the awnser I need. Does the PI4 support bluetooth tracking like my phone. I want to set up automation to if my phone is close to my pi4 to trigger things. I had seen a youtube video that someone did just this. Was tracking his phone within a few feet from room to room. I know other bluetooth proxies would be need to do this in room to room. But if I am in the same room close to my pi4 shouldnt I be able to do this with the built in bluetooth on the pi4? If so any links or info to get me going?

fringe field
#

If you are using the built in integrations then it’s the same whether you are using the pi Bluetooth, usb Bluetooth or esphome Bluetooth

#

If the thing you watched was esppresence, probably not but you’d have to ask them

#

Anything else, no idea

#

As for your phone - what phone.

#

Most modern phones can’t be tracked by BLE because of privacy features

#

So you are down to iBeacon for android (which is an extra app that caused your phone to advertise itself continuously, though apparently the iBeacon apps break the RFC so HA can’t see them) or the private_ble_device integration for iOS. That needs you to have a macOS device to extract an encryption key to make the “random” MAC addresses trackable.

orchid tendon
fringe field
#

Can’t help with Android; iOS here

sharp osprey
#

I am currently setting up a esp32 bluetooth proxy. Do I have to pair devices individually to specific proxy, or can they freely roam?

oblique oak
#

you should be able to add as many proxies as you like (within reason as each one requires a bit of cpu time on the host -- usually around 0.1-0.25%) and the system will figure out the best path to the device

sharp osprey
oblique oak
#

yes

sharp osprey
#

its magic, thats amazing!

#

and all I add to the esp is:

  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true```
oblique oak
#

leave the interval and window default

sharp osprey
#

ahh, I see

oblique oak
#

1100 will cause you all types of wifi problems unless the device is ethernet

#

and even than 1100 is overkill

sharp osprey
#

I wish everything worked as seamlessly as blutooth proxies :X
as soon as the esp was flashed the nearby problematic device appeared online.

crimson pine
idle gull
#

I have some GoveeLife Smart Mini Double Buttons that use BLE. Is it possible to use these buttons with the Bluetooth integration on HA?

potent bison
#

hi guys, any idea how I can get the BT integration to work, I am trying both the nuc onboard BT and a usb adapter and it keeps failing

#

2024-01-11 13:32:52.233 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not cycle the Bluetooth adapter hci1 [38:CA:73:09:3E:D9]: [Errno 71] Protocol error
2024-01-11 13:32:57.236 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci1 [38:CA:73:09:3E:D9] could not be reset:
2024-01-11 13:32:59.409 ERROR (MainThread) [bluetooth_auto_recovery.recover] Unexpected error while attempting USB reset of hci1: [Errno 19] No such device

fringe field
#

If you are seeing auto recovery logs that means ha thinks your Bluetooth chipset has hung and is trying to reset it. But not every Bluetooth dongle implements usb correctly.

#

What usb adaptor is it?

#

Is it on the supported list?

potent bison
#

oh is there an official list, I doubt it, it was some old one I had laying around

fringe field
#

if yours is using a realtek chipset its not going to be any good for HA

potent bison
#

hmm it seems like I cannot disable the wifi/BT chip from the bios

#

is there a way to disable it from HA?

#

hci0 (38:CA:73:09:3E:D9) this guy

fringe field
frozen mica
#

Hi! I have a Switchbot Bot, and a Switchbot Hub Mini.

I have been using a bluetooth dongle and the switchbot bluetooth integration to control the bot, but it’s unreliable, as the bluetooth dongle sometimes is disconnected from my HA, and requires reconfiguration.

I would like to use the Switchbot API to control this. I have created some python scripts that successfully turn on/off the device GitHub - AndrewBreyen/switchbot-scripts

How can I use these scripts to create a light to turn on/off the bot?

oblique oak
#

If you switch to using an ESPHome proxy that will likely solve the problem

#

As for using the API, thats not a question for this channel. You might open a PR against the library for the switchbot cloud integration.

potent bison
#

hey guys can someone suggest a cheap and compatible BT dongle to buy to use with my HA instance?

fringe field
#

Avoid any that have a Realtek chip inside

potent bison
#

yeah saw the list, was more wondering what the nice people on here are using 🙂

fringe field
#

Most people that talk on here are using something from that list because they came here with something not on that list and it didn’t work very well.

#

Or they are using multiple esphome proxies

#

I am using something.. from that list!

#

The first thing I tried was Realtek and not on that list and… it didn’t work 🎉

#

Actually it worked but it needed restarting every half hour

#

(Though its replacement fell down the back of a cupboard so I’m effectively running just esphome proxies right now)

spare geyser
#

Now I have 4 ESP32's spread all over my house and it controls my SB devices very fast and it always works.

cyan nexus
#

I really don't understand what the fascination is about switchbot. Whats the reason someone would choose that over smart switch/relay that goes inside the switch box. The switchbox seems bulky and looks like it would interfere with using the switch physically. Am I completely missing something about them?

spare geyser
#

You're only talking about the button pusher right? Yeah I feel the same way.

#

I did buy one as a garage opener. But other than that I would never choose that to control my switches over a relay or new smart switches.

cyan nexus
#

Yes, the original switchbot type for only some styles of wall switches. Ive never had the desire to want to try one but, am I right to assume they are probably noisy as well? They do have quite the product lineup now I see. I had no idea they were making such a variety of smart home devices and appliances. It's always nice to have a variety of options out there.

spare geyser
#

I really like some of their products. I have 3 Curtain Bots and 3 Blind Tilts.

#

There are arguably better options for opening curtains, but nothing comes close to their Blind tilt in price and versatility.

frozen sage
#

I've got three ESP32 bluetooth proxies (flashed by the ESPhome website) added to ESPhome. One of them is right next to a Bluetooth Eve Motion that is paried with Home Assistant, how do I make sure this proxy can see the device? It doesn't seem any more responsive than before I installed the proxy.

#

Do I need to turn on the ability to make service calls?

fringe field
#

Can you turn on the signal strength sensor on its device page and tell us what sort of value you are getting?

cyan nexus
fringe field
#

That’s a pretty good signal

frozen sage
#

Oh okay. Good to know

brisk fractal
#

I have a BT proxy that HA is saying is offline. The ESPHome addon also says it's offline and I can't connect to view logs. However my router says it's online, I can ping it from HA (when I'm ssh'ed in), and I can telnet to 6053 from my local machine (don't have telnet installed in HA). Any ideas on things to try?

potent bison
#

how can I find the "hci" number of a bt proxy?

fleet egret
#

Bluetooth Proxies will be automatically discovered by the esphome integration

potent bison
#

I was using the batmon addon, connect to a BMS via bluetooth and it was connected my bt proxy but all of a sudden is looking for an address with hci0

fringe field
#

The add on has “use the new home assistant Bluetooth integration” as a todo

#

It’s also an addon which means it can use the Bluetooth management code that’s inside HA

#

Having proxies connected to multiple things at once also isn’t really supported, so the addon shouldn’t be connecting directly itself

#

So.. im not sure how it ever was using your proxy

#

Do you have a link or something of how you got that working originally?

stiff breach
#

Hi! Bluetooth related question: Is it possible to add a bluetooth device in home assistant (raspberry pi 5) to control capabilities, something custom? I have a chinese audio board that have 2 Bluetooth channels, one for audio purpose like a regular bluetooth speaker and one for controlling the device / eq / input sources, etc . I want to be able to switch via bluetooth from home assistant the input source (BT or Line in)

fringe field
#

Typically with Bluetooth if you write an integration for one bulb, you'll need to write a completely different integration for a bulb from a different vendor. Even though they are both Bluetooth, the stuff that happens "on top of" the Bluetooth is completely different. So when it comes to more obscure devices you run out of luck fast.

stiff breach
#

i thought this, but I also hoped that I can use some kind of templates instruction calls like in esphome (- ble_client.ble_write:
id: xxxxx
service_uuid: 00001623-1212-efde-1623-785feabcd123
characteristic_uuid: 00001624-1212-efde-1623-785feabcd123
value: [0x0a, 0x00, 0x41, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01]
- ble_client.ble_write:
id: xxxxx
service_uuid: 00001623-1212-efde-1623-785feabcd123
characteristic_uuid: 00001624-1212-efde-1623-785feabcd123
value: [0x08, 0x00, 0x81, 0x00, 0x01, 0x51, 0x00, 0x32]

#

in the idea that I could connect to a device by the mac address then send custom instructions

fringe field
#

in HA speak that would probably be a "service call"

#

if you go to /developer-tools/service in your HA you can browse all of those.

vital bane
#

Does anyone know about tuya ble?

#

because I am trying to configure this device: CubeTouch II (product_id 'xhf790if'), but I don't know if it must already be configured with my account from the phone or not

stiff elm
#

I have an issue with Bluetooth adapter running on a windows host machine
the adapter (usb edimax) works when home assistant boots for a few minutes then stops.
restarting the guest machine helps but also solves it only for 5 minutes orso

this only happens on a windows host machine, Running it on a linux or native home assistant oss dont have any issue ,
anyone a idea how to solve it?

Virtualbox 7.0
0pcode 0x2041
No GPIO to reset Realtek Device

fringe field
#

Indeed Realtek hardware is pretty crappy for IoT Bluetooth stuff

#

Home assistant actually tries to reset Realtek adaptors when they crash (typically every few minutes) - but some don’t even have the usb pins wired up to let them do it

#

Even if you have one machine where it works and one where it doesn’t, if it’s a Realtek chip you are going to have a crappy experience

stiff elm
fringe field
#

The ones on the documentation site

#

Or tbh you’ll probably have a better chance with esphome Bluetooth proxies

#

Bluetooth in VMs is always funky

stiff elm
fringe valve
#

to your pc?

#

keyboard?

#

its a bluetooth proxy

zenith bear
vital bane
#

Hi, Is anyone experiencing problems with tuya ble? Because I'm trying to configure this device: CubeTouch II (product_id 'xhf790if'), but with tuya ble integration installed via hacs it doesn't work. it's a supported device.

#

Unable to load configuration flow: {"message":"Invalid handler specified"}

rotund ermine
#

Greetings. I am trying to have my riolink doorbell play a sound through a bluetooth speaker and I am unable to make it work. I've attached a link with the specs and confs of my BT setup. I am able to select the vlc-telnet from the media player and the sound emanates from the HA computer's speaker, not from the BT speaker. Am I approaching this the wrong way, should I instead use a different solution other then a BT speaker?

hazy holly
#

Is there a common solution to "i deleted my BLE device and now I can't re-add it" 😅

fringe field
#

Have you tried restarting ha?

#

Is this a trick question - did you delete it because it was already showing as unavailable 😂

hazy holly
#

yeah tried, heh
but no trick question, was playing around with the BLE sensor for flowers and it stopped working (became unavailable no matter where i placed it in the room (using BT proxies)) so i deleted it and hopped to reset it but cant seem to re-add it

maiden thistle
#

has anyone use batmon for bmses?

#

i set it up and it is connected to the BLE device, but I cant figrue out the mqtt part. it says tyo put in my mqtt credentials but I am nto sure where

frail magnet
#

Has anyone got bluetooth working in Kubernetes / Container? I am using the Airthings BLE integration and it had been working for months, but when I had to upgrade my k8s node it complains now and I'm not making any progress.
2024-01-25 14:20:29.446 DEBUG (MainThread) [homeassistant.components.bluetooth.scanner] hci0 (00:1A:7D:DA:71:13): BleakError while starting bluetooth; attempt: (2/3): [org.freedesktop.DBus.Error.AccessDenied] An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="AddMatch" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)

#

I tried disabling apparmor altogether on the node, but still getting this error

fringe field
#

Mine is working in k8s with containerd, but Debian host so no apparmor.

frail magnet
#

I do have a dbus hostMount in mine

          path: /run/dbus
          type: ""
        name: bt-dbus```
fringe field
#

Do you have the security context set to privileged ?

#

I have /var/run/dbus/system_bus_socket rather than the whole dbus folder

#

There’s also some /run vs /var/run tension - both exist but on some Os /run is a symlink and on others /var/run is. If you did an os version upgrade it could have changed.

frail magnet
#

Thanks for these! Great ideas. I don't seem to have the pod running as privileged, and k8s doesn't like it in my pod manifest. for some reason, where do I set securityContext: privileged: true?

fringe field
#

Some settings apply to all containers in a pod so you can’t put them on the container definition

frail magnet
#

Thank you, the securityContext: privileged: true solved the problem, not sure why it changed.

mint summit
#

How can I disable onboard ble in haos?

vital bane
#

Would anyone be willing to help me connect the xiaomi kettle pro smart to home assistant (Read only). The app I use on my smartphone is "Xiaomi Home".

fringe field
#

Eg it’s quite likely kettle is in your kitchen, not the same room as your HA machine? So knowing about those sorts of things might be important too

#

It looks like Ha might support YM-K1501, which looks a bit like the one you linked to, but confirming that model number would also be good

vital bane
#

Hello, the kettle is in the kitchen. It is not that far from the Raspberry pi where HA runs.

#

Attached to the raspberry pi is the zigbee hub, but it has nothing to do with these functions I think

fringe field
#

Are you using the internal pi Bluetooth?

vital bane
#

yes

fringe field
#

Because that can have a range of about a metre

vital bane
#

very little information can be seen on the app.

#

but also with tuya devices?

#

because I have a Cubetouch (which does not connect now) but it used to work properly. Also in the kitchen

fringe field
#

It’s not very logical

#

Works better for some than others

#

Also cubetouch could just be broadcasting with more power

#

Zigbee can also create interference

vital bane
#

But if I have a Google Home or android tablet in that room, can I use it as a gateway to connect it to Ha?

fringe field
#

The recommended approach is to have a usb Bluetooth dongle on an extension cable (to get rid of sources of interference like usb 3 and other IoT radios)

fringe field
#

You can use Shelly or esphome to create range extenders (we call them Bluetooth proxies)

#

I have 5 proxies to cover the house. Might need a couple more TBH.

vital bane
#

but as a bluetooth dongle any good? Even someone 'cheap' on amazon?

fringe field
#

Read the docs

vital bane
#

I only have shelly's 2.5 connected via wifi. But can z2h also be connected?

fringe field
#

There’s a list of tested ones

#

I don’t have Shelly’s so can’t help you with what’s supported or how to configure it

vital bane
#

sorry tag

#

It automatically recognised a Bluetooth device with the MAc

#

hci1

fringe field
#

So it showed up as a discovery and you added it, and now it’s alongside hci0?

vital bane
spark cairnBOT
#

@vital bane I converted your message into a file since it's above 15 lines :+1:

vital bane
#

Is this the list of supported dogles?

#

Is these good?

winged fox
fringe field
# winged fox I'm curious, what type of devices do you have connected to the proxies?

Mostly sensors. A few radiator thermostats. Had to move a bunch of eve devices back to Bluetooth control because thread was unstable, some eve devices that predate thread, some Xiaomi homekit sensors, so none homekit Xiaomi sensors, some inkbird sensors. And I detect presence of Apple phones with them too (auto arm/disarm alarm, turn on outdoor lights when I get home etc)

crude galleon
#

Hi guys.
I had a power outage today, and when HA booted back on, my bluetooth does not work.

Source: config_entries.py:406
First occurred: 5:26:04 PM (77 occurrences)
Last logged: 5:41:05 PM

Could not determine the power state of the Bluetooth adapter hci0 [00:00:00:00:00:00] due to timeout after 5 seconds
Bluetooth adapter hci0 [00:00:00:00:00:00] could not be reset:
Closing Bluetooth adapter hci0 [00:00:00:00:00:00] failed: [Errno 9] Bad file descriptor

Any idea on whats going on? Im using HA Yellow, with a compute module with BT.

fringe field
#

Unfortunately the pi radio can’t be restarted from software

#

Try shutting down and removing power

crude galleon
#

Restarted twice. But the hard reboot (all appliances and stuff) worked

#

Thanks

fringe field
zenith bear
limpid mural
#

I’ve been meaning to write up a blog post about it. I’ll see if I can work that up and I’ll post it here.

#

Until then, I’m not sure what your degree of comfort with Linux, or the command line is, but there’s basically three or four steps once you have a Pi booting with the “lite” OS

#
  1. Use the bluetoothctl command to pair with the keyboard
#
  1. Install triggerhappy with “sudo apt install triggerhappy”
#
  1. Then configure trigger happy (there are lots of guides online) to run a bash script on a given key press
#
  1. The bash script can be just a single curl command to call a script or service in home assistant (you can find guides online for using the HA API as well)
#

If you have access to ChatGPT 4, it will probably go a long way to helping with the details

limpid mural
#

For what it’s worth, I generally found Bluetooth unreliable on the pi zero w. You might want to try a zero 2.

winged fox
#

Hi all, I am trying to set up bluetooth proxy with a esp32. My configuration is

  name: bt-proxy

But in the log, the hostname is set as bt-proxy-305c48
The log reads,

[C][mdns:115]: mDNS:
[C][mdns:116]:   Hostname: bt-proxy-305c48
#

How do I fix this?

#

I set the name_add_mac_suffix option to true. But in that case all the associated settings should have the update, right?

winged fox
#

It shows up as online and I can see the logs. But clicking on the Visit button says the address not found.

honest hamlet
#

any idea how I can setup Shelly gen 2 bluetooth proxy as only BT device? I dont have adapter connected and it seems I can't find configuration for bluetooth to say that please use this proxy in this IP

fringe field
#

It won’t show up under the Bluetooth integration though.

honest hamlet
#

ok then how can I pair e.g. Yale lock through this proxy?

#

as currently I dont have bluetooth adapter so no bluetooth integration is loaded but from shelly I've enabled active bluetooth proxy

#

when I try to add bluetooth integration it just says no adapters and fail to load

#

maybe also question which version this came in

fringe field
#

Shelly (last I heard) does not support 2 way Bluetooth like eg the esphome proxies do

fringe field
#

If you had a compatible device and a compatible proxy, it would show up under its own integration in the discovery part of the Ui

#

For example, there is a Yale Access Bluetooth integration

honest hamlet
#

yes this I tried

#

so what exactly shely allows me to do if not pair? it has 3 modes disabled, active and passive

#

I've selected the active from the shelly integration on the gen2 device

fringe field
#

Bluetooth devices send beacons or advertisements

#

Sometimes they put sensor data in those beacons

#

Shelly is able to receive those and then we hand them off to integrations like Xiaomi, inkbird, govee and others.

#

Active or passive is the type of beacons

#

Passive we are completely silent and just listen to what’s in the background

#

Active we send our own beacons to ask for nearby devices to send their beacons

#

Inkbird only works with active

#

Others work with just passive

#

Sometimes you want some proxies with active and some with passive as devices are dumb and if they receive 3 active beacons they will send 3 temperature readings.

honest hamlet
#

sound a bit weird how the communication then works? if the original bt is not in range shelly should somehow redirect the commands to bt device

fringe field
#

This is a limitation of the Shelly device

#

The ESPhome implementation works fine

#

Their “os” is more general purpose than esphome, which builds custom code for your precise configuration. So they only handle the types of sensors I mentioned.

#

Esphome instead is more like a remote Bluetooth dongle - you can ask it to connect and control a device on your behalf

honest hamlet
#

ok so I would need some esp devices

#

bummer as the shelly's would have already covered nice area

fringe field
#

If you are only using the Shelly devices as Bluetooth proxies you may be able to flash them to esphome

#

I can’t help you do that but there are guides online

#

Their antenna may not be as good for transmission as they weren’t designed for this.

honest hamlet
#

no those are EM monitors

fringe field
#

Though I needed to solder a header on to flash them with esphome

honest hamlet
#

and also I use those for load balancing of the power network

fringe field
#

They have a proper antennae

#

And Shelly and all WiFi based esp stuff has a limitation that the radio has to switch between WiFi and Bluetooth (because there isn’t the hardware to do both at once)

#

The s10 has LAN so can turn WiFi off and avoid that limit

honest hamlet
#

ok, Thanks for the support

#

now that I'm reading the bluetooth proxies documentation it says active connection not supported

honest hamlet
#

shelly integration is then missleading as active should be supported..

fringe field
#

There is some confusing terminology

#

Active sometimes used as short hand for “active scanning”

#

Sometimes for “active connection”

#

Shelly has support for active scanning

#

Not active connection

honest hamlet
#

it seems someone succeed to do some connection 😄

fringe field
#

Ah maybe that Bluetooth gateway setting is new

honest hamlet
#

maybe I just update everything and do full restart wait a day and see what happens

fringe field
#

That doesn’t have a GATT client implementation

#

Which would be required for your device

honest hamlet
#

is that doable with the new firmware?

fringe field
#

I don’t know

#

But also the ticket you found is misleading

#

Aranet is like Xiaomi and inkbird

#

It doesn’t actually connect at all

#

It processes those broadcasts I told you about

#

In passive mode, not even active mode

#

As it stands you still need some esphome devices and I have seen nothing to make me think Shelly has gained full proxy capabilities

stiff elm
#

Hello again.
so i bought my self the: SABRENT USB Bluetooth 4.0 (BT-UB40), that was recommended on the HAS page.
Sadly i still have problems. no error codes anymore, but Bluetooth stops working again, took a lil more time this time , but still does
What i notice trough that windows reclaimed the device and has Bluetooth again.
it did the same with the old edimax stick,
While i was running linux mint and virtual box with the edimax stick i had 0 issues

So or it is an windows issue, or a virtual box one,
i am running the latest version of HAS/virtual box/Winodws 11 up to date
Is there a way to make windows not reclaim the usb?
That might solve my issue

I also looked into Bluetooth proxy
but buying that device is not an option right now,

i was thinking of going back to Linux.
But i host a game server on the same pc sometimes for friends, and most dedicated servers files work better on windows sadly

fringe field
#

I also know that usb passthrough of Bluetooth is a common problem on here

#

To the point that people go bare metal with haos

#

Or in one case they got a pci-e usb card and did pci-e passthrough instead of usb passthrough

#

You might be better off asking in a place that specialises in virtual box about whether there is a hypervisor level workaround

#

(FWIW Bluetooth was also incredibly flakey with VMware ESX server for me)

stiff elm
brazen swan
#

Is there anything like ibeacon tracking but for regular BLE devices? Would love to trigger automations when my Xiaomi Band is near the PI 4 hosting HASSIO
I know you can do this with ESP32 boards around the house, but i don't have any yet, and thought getting started using only the Pi is a decent idea

fringe field
#

if you are using the bluetooth thats built into the pi i should warn you that we semi frequently get people in here that are struggling with it either crashing (the bluetooth chip crashes, and a full power cycle (with unplug) is needed to fix it) or it just struggles with range

#

with esphome bluetooth proxies, its the same integration on the HA side. so you can mix and match with your bluetooth on your pi and a bunch of esp32's all feeding data into the bluetooth_le_tracker integration

brazen swan
#

Thanks!

spark laurel
#

I just updated to home asisstant core 2014.1.6 and now all my bluetooth thermometers (govee H5075) don't work anymore. is this a known issue with this version?

fringe field
spark laurel
#

i updated from 1.5, i upgraded nothing else, and the adapter is the internal from the raspberry 4

spark laurel
fringe field
#

Sometimes the pi Bluetooth chip just crashes

#

You might need to shut down the entire pi, remove power (unplug it) and then plug it back in

spark laurel
#

i restartet over the interface and did a hard reset, both didn't fix anything

fringe field
#

Did you unplug it?

spark laurel
#

yeah

fringe field
#

Looking at the 1.6 tag on github, it has no Bluetooth or govee changes

#

Do you have a sensirion or airthings?

spark laurel
#

no

fringe field
#

They are the only remotely Bluetooth related integrations to change in that tag, and they won’t be loaded on your system.

#

There’s not been many GitHub issues this year for this integration, the ones that are open dont seem related

spark laurel
#

hm, i loaded my backup of 1.5 and it still can't connect to all my sensors, so it seems to be something else

fringe field
#

In that case try changing its batteries and moving it closer

spark laurel
#

i have 6, and all are unavailable

fringe field
#

Also try looking at a diagnostic download for the Bluetooth integration to see if HA sees anything at all

#

If it sees nothing then the pi Bluetooth is probably completely broken or underpowered

spark laurel
#

i don't think logs are saved. since i loaded the backup all logs are gone

fringe field
#

I’m not interested in logs

#

If you look at the integrations page, under Bluetooth there is a … menu on your Bluetooth dongle that has a “download diagnostics” link

#

It will download what the dongle/chip currently sees

#

Has to be for the Bluetooth integration

#

You’ll have to upload it to a pastebin type service

spark laurel
#

it seems the bluetooth adapter can't be found

fringe field
#

So if you are absolutely positive you haven’t upgraded HAOS and you have definitely unplugged power to the pi, then your pi is either underpowered or faulty.

spark laurel
#

i will look into it more tomorrow, but i purchased a bundle and the power supply was delivered with it. and it also worked for months now. The bluetooth integration shows an error, that the device (bluetooth adapter) can't be configured

#

but i'm pretty sure that error message has been there for a week now, and the govee integration still worked

fringe field
#

Not much else I can say then

#

We’ve ruled out the upgrade

#

If you send the file I asked for I can confirm if your Bluetooth has seen any data at all

#

But what I can tell you is pi Bluetooth seems to be the most frequent problem I see in here

#

Unfortunately the pi doesn’t connect to it over usb

#

When usb Bluetooth crashes Ha has a recovery mechanism that can restart it

#

Which is why I said about disconnecting from power

spark laurel
#

nmcli radio tells me wifi is enabled, but nmcli device wifi rescan throws an error because it can't find a wifi device, so i guess the chip just broke

#

i can't download any diagnostics for the bluetooth integration, the only options are reloading, rename, system options, disable and delete

fringe field
#

Does sound pretty broken!

#

Could you take a backup and try running raspbian on it to see if it’s a driver problem?

spark laurel
#

on monday i will try, the raspi is running at the office

winged fox
#

I have a eso32 configured as a Bluetooth proxy. But my HA didn't recognize that as a Bluetooth proxy and I don't see any integration named Bluetooth proxy. I should have one, right?

fringe field
#

If the esp32 is configured correctly and you have the esphome integration added in HA then that is it

wooden maple
#

Let me say first that yours truly is an idiot and bough a BT adapter based on ATS2851 which isn't supported by the kernel 😄

So, I was looking for recommended adapters and all of them are on pretty ancienct BT 4.0 cypress chipset and hard to actually come by with external antenna. I was thinking about using ESP32 and BT proxy, but afaik it's not a complete solution due to BTLE, which is ~80% of my usage.

What would be the best option for me? Looking for USB adapter on CSR8510A10 or digging more into ESP32 route?

spare geyser
#

I was going to get a USB BT adapter too. But my BT devices are really far apart. I think it would have been a bad idea.

#

ESP32's are really cheap. I bought 4 in total and spread them throughout my home really near my BT devices.

#

And because of that, they respond very quickly and never fail. I think it's the way to go if you have BT devices.

spare geyser
#

Hmm, well then I can only speak for Switchbot devices. All mine work perfectly.

#

I even have local control with their wifi plug now because it also uses BT.

wooden maple
#

I want to integrate multiple of the cheap xiaomi thermometers and a few other BLE sensors hmm

#

I have like a box of ESP32 so I may as well try and see

fringe field
#

There has been a Xiaomi BLE integration in core for over a year now.

#

The ble monitor maintainer just added a bunch more devices for the feb release of HA (devices that need event entities, like remotes)

#

Some more coming in March

#

With the BLE integrations in core, esp32s will just work

#

(If you have Bluetooth proxy mode configured correctly)

wooden maple
#

so, if I was to provide a new device support I should make a native component for HA core, correct?

fringe field
#

Yes, unless it belongs to an existing one like Xiaomi, inkbird, govee, etc

wooden maple
#

(there's a lot of sports equipment from Wahoo that could use HA integration but they're notoriously tight-lipped and push their cloud connection for local BT devices.......... but it's easy to get the data, just the decoding is a bit annoying as they're trying to fit a lot into a single packet with clever bitshifts)

fringe field
#

As for LE, HA Bluetooth is pretty much only LE

#

Paring LE advertisements and doing GATT. Both are supported by HA and by the proxies

wooden maple
#

so passive advertisements work via proxy as long as core integration supports it, and GATT works with the same conditions as well but will eat a connection on the proxy and thus is subject to the limit of ESP, correct?

fringe field
#

Correct

wooden maple
fringe field
#

As for dongles - getting a newer one won’t unlock any benefits, bluez doesn’t expose long range Bluetooth 5 for example. So we are stuck at Bluetooth 4 capabilities until upstream catches up with the world.

#

newer chips might work but no one has tested them - you might keep getting me unsupported devices

#

Bluetooth on Linux is not great

#

Naive implementations were 10x slower than the same naive code on macOS

#

And the firmware/driver combos are so flakey we have to have code to trigger usb resets to recover crashed Bluetooth chips

wooden maple
#

why is BT such a mess on everything but macOS..... I constantly have to fight with BT on my wife's windows PC too

fringe field
#

“Choice” just creates an infinite test matrix whilst letting each party pretend it’s not their responsibility

wooden maple
#

I guess... still better than GPUs 😄

fringe field
#

And unfortunately people buy crap and put up with it

#

If we all bought just the Bluetooth radios that worked Realtek would maybe make better ones 🥲

#

(Realtek Bluetooth crashes for some of our uses every couple of minutes)

wooden maple
spark cairnBOT
#

@nocturne hinge I converted your message into a file since it's above 15 lines :+1:

nocturne hinge
# spark cairn <@411458794292248606> I converted your message into a file since it's above 15 l...

Feb 04 11:21:44 homeassistant systemd[1]: Starting bluetooth.service - Bluetooth service...
Feb 04 11:21:44 homeassistant (uetoothd)[476]: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755 ConfigurationDirectoryMode: 555)
Feb 04 11:21:44 homeassistant bluetoothd[476]: Bluetooth daemon 5.66
Feb 04 11:21:44 homeassistant bluetoothd[476]: Starting SDP server
Feb 04 11:21:44 homeassistant bluetoothd[476]: profiles/audio/vcp.c:vcp_init() D-Bus experimental not enabled
Feb 04 11:21:44 homeassistant bluetoothd[476]: src/plugin.c:plugin_init() Failed to init vcp plugin
Feb 04 11:21:44 homeassistant bluetoothd[476]: profiles/audio/mcp.c:mcp_init() D-Bus experimental not enabled
Feb 04 11:21:44 homeassistant bluetoothd[476]: src/plugin.c:plugin_init() Failed to init mcp plugin
Feb 04 11:21:44 homeassistant bluetoothd[476]: profiles/audio/bap.c:bap_init() D-Bus experimental not enabled
Feb 04 11:21:44 homeassistant bluetoothd[476]: src/plugin.c:plugin_init() Failed to init bap plugin
Feb 04 11:21:44 homeassistant bluetoothd[476]: Bluetooth management interface 1.22 initialized
Feb 04 11:21:45 homeassistant systemd[1]: Started bluetooth.service - Bluetooth service.
Feb 04 11:21:45 homeassistant bluetoothd[476]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed.
Feb 04 11:21:45 homeassistant bluetoothd[476]: sap-server: Operation not permitted (1)

fringe field
#

(The errors in the linked ticket are consistent with a range issue)

#

(Many people in here have struggled to get more than a couple of metres out of their pi at best)

#

An external Bluetooth dongle on a usb cable (to get away from interference) can help, so can ESPhome based Bluetooth proxies (if the custom component uses HAs Bluetooth APIs fully)

nocturne hinge
#

I also have Shellys with can be used as a proxy or a bluetooth extender? but this isnt working. Maybe I will buy one.

And to your question, yes, but there is a wall in between.

Thank you for your reply

fringe field
#

For that integration you’d need an ESPhome bluetooth proxy

nocturne hinge
wooden maple
nocturne hinge
fringe field
#

You can but most of mine for example don’t have esp32s, and we need esp32 for Bluetooth stuff.

#

The ones that are left aren’t exactly stunning in terms of range

#

(They tend to be installed in places that reduce signal strength)

rapid coral
#

hey folks. I never integrated anything bluetooth in home assistant. Has anyone integrated a switchbot/fingerbot with it?

spare geyser
#

I have 8 Switchbot devices, all connected via bluetooth with the Switchbot BT integration using esp32 bluetooth proxies.

#

They all work great, but in my experience proximity does matter. I noticed much slower responses the further away a proxy was.

#

Now I have 4 proxies and every Switchbot device is near one so they all respond pretty quickly most of the time.

idle basin
#

chance of any oral-b bluetooth working?

spark laurel
#

@fringe field with raspberry OS the bluetooth chip still works, i guess it just overheats and shuts down? i recently moved the raspberry into a server rack (just laying in its case at the top of the rack). maybe it cooled down enough while i took it out of the rack to install raspberry OS

fringe field
#

The rack would be terrible for the signal regardless

spark laurel
#

it was running fine before i moved it into the rack, and then it worked fine for like a week

fringe field
#

Run it out of the rack for a bit to rule out any updates causing the problem

#

Then put it back and see if it happens again

sage steeple
#

Hi all. I was wondering if there was a way to use the integrated Bluetooth adapter in my PC running Home Assistant to pair to a device and act as a Bluetooth keyboard.

I would like to run a few automations on my Macbook. Potentially waking it up and unlocking it when i get close to my desk on workdays.

I searched around a bit but couldn't find anything related. Maybe I'm not using the right keywords.

proud comet
#

Does anyone know of a resource I can review to help me understand device support when using BT proxy? I thought it was not working but have since confirmed it is... and perhaps I am dealing with a device support issue in HA.

fringe field
#

It should support every device that HA has a BLE integration for

#

So if you have a inkbird, you’d read the docs for the inkbird_ble integration

#

If it’s a Xiaomi, the xiaomi_ble docs can help

#

And so on

proud comet
#

So I have hard coded a BLE integration for the xiaomi's I have all over before and gotten them to work when specified over ESPHome, but the same devices under BTProxy are not represeted in HA directly... In working with ESPHome, we believe they are being seen and proxied and HA is just not doing anything with them. How can I pick up the troubleshooting from ESPHome to HA for BTProxy?

#

my lil mija's have stopped talking to HA when I started trying to use BTProxy

tawny violet
#

@idle basin both oral b devices that are in the house work with no issues. I have several Bluetooth proxies

flint compass
lilac siren
#

Hey all, I've been messing with ESPresense using ESP32 boards and M5 Stacks. I am currently using my phone as a tracker however I don't carry my phone 24/7. ESPresense lists a few wearables, including a ultahuman ring. I was wondering if anyone has messed around with any other smart rings for bluetooth tracking and presense detection?

cyan nexus
#

I'm a fan of bluecharmbeacons, just throw one in your pocket when you put your phone away. They are very configurable and some have a button to trigger automation or whatever. You can also set them up to only transmit if it's moving. Theres lots of options. I figured out how to pull poll then for battery level so you can track track that too.

cyan nexus
# lilac siren Thanks! I'll check them out

The person who operates bluecharm is another HA user and he/she is in the HA forums if you ever have questions or whatever. It's a good product with good customer service and it supports another HA junkie. I'm happy to advertise and support things like this.

lilac siren
#

👍

spare geyser
#

An update from a few days ago seems to have broken HA's ability to see my switchbot blind tilts current position.

#

They still work just fine, but I'll still get an error message that the service call failed

#

Plus when I check on them, their open and close status is unknown and stuck at around 70% up.

#

Any idea what's going on here?

#

One more thing, only the Blind tilts are affected. All my other Switchbot devices using the integration seem perfectly fine.

reef wasp
#

I downgraded back to 2024.1.6 for now, and things are working correctly

spare geyser
reef wasp
#

Same...but seeing all the blinds show as "Closed" in homekit was frustrating my wife to no end...so i'll have to resist my desires to always to be updated 🙂

faint eagle
#

ble on esphome statically vs ble proxy humidity value differences

grizzled glade
#

Just want a sanity check: a Feasycom BP108 should get picked up by a bluetooth proxy, right?

oblique oak
#

yes

spark ember
#

I have a RPI 4 with Home Assistant 11.5. I want to try and controll my BT spotlight devices in my roof.

They are being controlled by a Vadsbo dimmer (https://www.vadsbo.net/en/product/ld220wcm/). I can controll them with my phone with an app called Casambi.

1: Would I be able to controll it through Home Assistant on my RPI 4?
2: Do i need to buy some hardware or anything to be able to controll BT devices?(as for zigbee i need to buy a usb stick)?

feral wadi
#

i'm getting error on install libraries. when i clone git repo of core then i run setup bash file but there i'm getting issue like below:

no such option: --config-settings

rotund sail
#

What repo? What setup bash file?

#

Installing HA doesn't require any of that

tribal moon
#

hey, so i have a raspberry pi 5 running HA under qemu.

I am having trouble HA discovering any bt devices.

I am using the following flags on qemu:

    -chardev pty,id=charserial0,path=/dev/ttyAMA10 \
    -device virtserialport,chardev=charserial0,name=org.qemu.bluetooth \

any ideas on what I may be doing wrong?

spare geyser
#

Updated to 2024.2.2 and my Switchbot Blind tilts are back to normal again. Yay.

tacit venture
#

I installed a Bluetooth USB adapter today, my Home Assistant instance detected it and an "iBeacon Tracker". What exactly is it? I tried reading the documentation but it's not clear.

  1. Is the iBeacon my Bluetooth adapter, or is it detecting another device?
  2. Is iBeacon similar to AirTag?
fringe field
#

I would say similar to AirTag but not as good - less private, no find my network

#

Android users try to use it for phone presence detection though the apps for doing that in Android aren’t very good

#

For iOS you would use private ble device for similar phone detection

#

You’d usually use multiple esphome proxies for reliable coverage with the trackers tho

tacit venture
#

Interesting. I'll probably get at least one ESPHome device that supports Bluetooth presence. Is that also done through iBeacon?

fringe field
#

Esphome Bluetooth proxy’s work like ip based Bluetooth dongles

#

So any integration you can use now (like iBeacon or private ble device or the basic ble tracker) will continue to work (but with better range) when you have multiple proxies

#

They work 2 way too, so you’d be able to control things like lights or curtains too (if there is a HA integration)

dreamy solar
#

speaking of bluetooth proxies: i've got a bluetooth body scale (the xiaomi one) and it doesnt seem to reliably update in home assistant. so i grabbed another ESP, made it into a bluetooth proxy and put it closer to the scale (like 1m with a thin wall in between). but it still doesnt really reliably update.
are bluetooth devices in some way bound to the proxy they were originally added to HA with?
i'm assuming no?

#

its a bit annoying. its not like its critical for my weight to update in HA, but it would be nice

tacit venture
#

I've got the same scale. I didn't realize it could connect to Home Assistant! It seems to work immediately for me

fringe field
#

If you have a WiFi based proxy and it doesn’t have an external antenna and it works intermittently I’d still be dubious of the wall.

#

We have some combinations (mostly locks tbh) that only work at 30cm with no wall.

dreamy solar
#

i'll have another look then, make sure the proxy works as intended. i just used one of those m5stack atom lite i still had around

#

i'll first ensure that its actually working properly as a proxy, and if thats not the issue i'll throw a different esp there, maybe even one with an external antenna. i have a bunch of different ones around, the atom lite has the benefit that it comes mostly contained, i can just plug it in and throw it in a corner. for the devboards i need to find/print a case 😄

fringe field
#

Yeah my first 2 were m5stacks for same reason

#

Started using the GL-s10 since

dreamy solar
#

if the other ones dont work, i'll give that a go. but at 30eur shipped vs. a few bucks for most esps, thats a bit of a difference 😄

sturdy compass
#

How does Bluetooth work with ha typically?

fringe field
#

So eg I have a Bluetooth dongle. For that I have a single Bluetooth integration configured. The range is poor so I also have a bunch of GL-S10 running esphome. Plus some Atom Us also running esphome. They are all configured as Bluetooth proxies, and are managed under the esphome integration. HA has a Bluetooth manager that can make all these devices seamlessly work together so I have full house coverage.

#

Then I have a bunch of homekit_controller (now homekit device) integrations that control Eve devices over Bluetooth. Using the Bluetooth manager they will connect to the Eve from the best ESPhome or dongle.

#

I also have some inkbird and BTHome devices collecting temperature data.

#

For all of these Ha actually detects them automatically when your dongle or proxy is working.

#

Some do require more manual work. Private BLE device is one - it needs an encryption key. Once it’s set up it lets HA know if I’m home or not without needing apps or anything. I use that to turn on the porch light when I’m home. And to arm/disarm the alarm.

#

I don’t know if that’s typical but that’s roughly what I have @sturdy compass

sturdy compass
fringe field
tacit venture
#

Which firmware?

fringe field
#

pvvx is potentially better (claims to be much more power efficient), though the way it has been handled in z2m is not great. ended up with 2 firmwares with different clusters, so pvvx needs an external converter right now.

#

however i have 4x LYWSD03MMC that were originally BLE running on my zigbee mesh for about a month i guess

tacit venture
#

Neat

sturdy compass
#

Really neat

fringe field
#

its a very recent discovery!

cunning forge
#

I've been trying to add some govee bluetooth devices, and when I click add device, it almost immediately says "No new devices found on network"

#

Like I see a flicker of a menu before it switches to that, as if it never attempted to search for new devices

fringe field
#

It’s always listening, so it’s almost like it’s always searching, so the add step is always instant for that integration.

#

Most likely causes of that are (a) your Bluetooth dongle crashed. If it’s Realtek based, it’s probably that. Internal (intel or pi especially) are also frequent offenders. Powering down your HA box, unplugging for 30, then trying again will help briefly for a subset of these cases (might be minutes, might be hours, might be days).

#

(b) interference. Make sure you are using a usb dongle not internal. Make sure it’s connected by an extension cable to get it away from usb 3 and sata.

#

(C) distance. Try bringing them within half a metre and see if they are detected. There are combinations of devices and dongles that only work at that distance. They are usually locks, but. But there are so many variables best to just try this,

#

Govee is a very simple integration so if youve checked those things it’s probably time to raise an issue. Make sure to include what devices you are adding, what Bluetooth dongle/proxy, the distance betweeen them, that you are using an extension etc.

cunning forge
#

I think it's a supported device issue. Looks like the govee Bluetooth integration only really supports climate or meat sensors.

lone hamlet
#

I've got some questions about the ESP32 BT Proxy and a temp sensor Xiaomi MiThermometer LYWSD03MMC flashed with the pvvx firmware & set to BTHome protocol. I don't think I set up encryption within the firmware settings so my HA instance automatically discovered the thermometer via the BTHome integration, or at least I'm not aware of adding it manually via BT MAC, etc.

  • So I assume it's broadcasting its sensor readings to anyone with a BT protocol viewer?

  • If I were to bring up another nearby HA instance with its own BT Proxy, would it also autodiscover it to? Or is this device sorta "locked" to my HA instance?

  • I'm confused about https://esphome.io/components/sensor/xiaomi_ble.html#lywsd03mmc. Do that sensor yaml go into HA itself or do I tweak the ESP32 BT Proxy yaml and recompile it? The docs aren't very clear about that part. And do I just create my own bindkey and make sure it's the same in both the pvvx firmware settings and in my yaml?

Thanks!!

faint eagle
#

Yes. The advertisements are broadcast. Yes another HA instance with its own bt dongle or esphome ble proxy can also discover and use simultaneously. I think the default ble proxy settings will poll (aka active) for ble devices

#

I don't know the effects on sensor battery of multiple things polling

#

Then link and config you pasted is for explicitly defining the sensor in esphome. That would not use ble proxy

fringe field
#

Some people think active scanning barely uses any more battery, or makes no difference whatsoever. But if you end up with lots of proxies you can set some to be active and some to be passive. some people deploy them in pairs, with one active and one passive.

faint eagle
#

That's a good point. Let one trigger them all. (That see the scan)

timber shell
#

Morning folks 👋 My latest set of LEDs have a BLE UART profile (yes, really!) and you have to send bytes over serial to control it. I have no idea why they have done it this way, but they have. So what I thought would be a few hours of integration work has now got me wondering... does Home Assistant have support for the BLE UART profile, specifically the Nordic spec (which is what Wireshark tells me this is using).

I'm not even sure that it would be possible to proxy this via the ESP Home proxies, but maybe? It doesn't seem to be syncronous. You just fire the bytes off and hope for the best.

So before I spend too much time on this, will it ever work via HA?

fringe field
#

if BL:E UART is built on top of GATT, it could work. pretty sure we have seen devices where 'UART' is done in GATT by having a read and write characteristic, and you use the GATT notification mechanism to get asynchronous data back from the device.

timber shell
fringe field
#

if its actually GATT then it will work, and it will work with the proxies. In theory at least.

timber shell
timber shell
mellow lava
#

Are there any troubleshooting steps to check if an ESP32 bluetooth proxy is working correctly and in active mode?

mellow lava
#

Ive got only one BT device with HA integration (Ember mug) and while its being detected and MAC address discovered, im getting:
2024-02-14 10:29:13.956 WARNING (MainThread) [aioesphomeapi.connection] bt-proxy-masterbedroom @ 10.10.10.185: Connection error occurred: [Errno 104] Connection reset by peer

#

so im not sure if thats a problem of my esp32 bt proxy, integration, device, or something else

fringe field
#

Did you configure / compile the esphome firmware yourself? If so, did you set it to use esp-idf?

mellow lava
#

its GL-S10

mellow lava
fringe field
#

So you know about the packet loss on those, and adjusted the clock pin accordingly for your hw rev?

#

Sorry on phone so can’t fish details out but my gl-s10s had to use a different GPIO config to avoid it

mellow lava
#

No, never heard about it

mellow lava
#

ok one of my GL-S10s is 1.0 but the other one is 2.1

#

Followup question, will the Bluetooth proxy allow my device to connect to any of the bluetooth proxies - for example the closest one - or just the one which was closest at the time of pairing?

#

but also, is there really no place where i could find for example the list of bluetooth proxies in my environment, information which one works, which one is active, etc?

#

for example besides a couple of GL-S10 i have Everything Presence Lite with bluetooth proxy firmware installed in several places of my home

fringe field
#

That might not be the closest - for example it is aware of how many connections a proxy can support (2 for some) and will use another in that case

#

You can move around the house and see the proxy change

fringe field
#

You can see the Bluetooth state for each proxy in its diagnostic json

mellow lava
fringe field
#

I don’t know what you mean

mellow lava
#

when i paired my Ember mug with my HA, it stopped accepting connections from a phone it was paired with before

#

so the mac address of device its paired to must be stored somewhere on the mug

#

so my worry is that the part of my issue might be that it has paired with one proxy and trying to connect to another proxy

fringe field
#

So all of the devices Ha support don’t have that limitation. So indeed that could be a problem

mellow lava
#

(i have disconnected GL-S10 2.1 but still have problems with connectivity to the mug)

fringe field
#

Do you still have that tcp error?

spark ember
#

I am using a Raspberry Pi 4 with Home Assistant 12.0.
I want to use the onboard bluetooth to controll some BT devices. I see that a Bluetooth integration came with the installation of HAOS. But when I try to add a entry I just get a message as of "No unconfigured Bluetooth adapters found. There are 0 ignored adapters.".

What could be wrong?

mellow lava
#

so kinda a different issue on the top of the previous

silver tapir
#

Hi all,

I'm trying to integrate a Procaster PRE-01 sound system with Home Assistant running on a Raspberry Pi 3, aiming to control it (on/off) via Bluetooth.

Issue: The device isn't recognized by Home Assistant's Bluetooth tracker, so I cannot see the Procaster PRE-01 in Home Assistant besides that they are next to each other.
Goal: Automate turning the Procaster PRE-01 on/off through Bluetooth.
There are no integrations for the Procaster in Home Assistant and I do not have a clue about what could be done

Thanks for any insights!

lone hamlet
#

https://esphome.io/components/ble_client.html "A maximum of three devices is supported due to limitations in the ESP32 BLE stack. If you wish to connect more devices, use additional ESP32 boards." Does "BLE stack" mean the Espressif IDF BLE libraries? Does anyone know if this limitation only exists in the stack or at the hardware level? And are there other microcontrollers out there (not Espressif) that can connect to many devices? Please 'reply' so I get notified. Thanks!

fringe field
#

But actually these connection limits are pretty common. USB Bluetooth dongles have similar ones. I think there’s one chipset that can handle like 5 or maybe 7 connections, and it does so at the expense of speed.

#

Not aware of any device that can handle more than 7 at once

#

Which isn’t what I’d call many

#

Important to note that this is active GATT connections - a lot of devices don’t need that.

#

There no limit on devices that put sensor data in the advertising beacon (like inkbird or Xiaomi sensors)

#

And eg homekit will connect once to establish a secure session key. Then only connect again for 20-30 seconds when you control a device (eg turn it on)

#

Where you truly do need long lived gatt connections (I think one of the mmwave presence sensors do) then the only work around is to use esphome bluetooth proxies and have lots of proxies.

#

HA can load balance across them in a way that you can’t do directly on esphome with a single bleclient.

lone hamlet
stark root
#

Is it possible to use a phones bluetooth as second bluetooth device?

stark root
#

Hm. A need a portable bt scanner 😅

fringe field
stark root
#

But i meed to stay in range from the raspberri?

#

Or?

fringe field
stark root
#

hm thats an issue. I net an protable scanner for external network

fringe field
#

That’s connected to home assistant?

stark root
#

Yea

fringe field
#

What are you doing

stark root
#

Bluetti EB3A. I need that stats from it

#

When i go camping i need that stats on my dashboard

fringe field
#

You want data from your camping gear to get transmitted back to your house, so that you can access it remotely on your phone?

stark root
#

Yes

fringe field
#

Would a pi running a 2nd home assistant just for your tent “home” (Tent Assistant) be any good? Both iOS and Android support multiple homes.

#

Otherwise you can probably make some kind of Frankenstein vpn setup for the esp32. Have it connect to a hotspot on your phone, and have a vpn to your house etc.

#

Though tent assistant would work even if you don’t have cell service

stark root
#

I would do that but we are not allowed to connect such devices to ghe Camping hotspot

ancient haven
#

but you'd still need to hotspot the esp32 onto something

faint eagle
#

wireguard is nice!

stark root
#

Uhm guys. I need help. I plugt in a bluetooth dongle and deaktivated the internal bluetooth chip from my raspberrypi. Now nothing with bluetooths works. the dongle works perfekt on windows. Why does this happens?

delicate obsidian
#

I would like to check if and when our phones are in a specific room: would it be best to use NFC tags - and does this get picked up automatically, or is there a better way of handling this?

#

Wow, my english is good today

stark root
#

Do have to configure something to scan for devices with the second bt device or whats going on. I tryed multible times rebooting but nothing helps

fringe field
#

What Bluetooth dongle did you get, is it one from the list on the HA documentation?

stark root
#

a realtek

fringe field
#

Buy one from the list on the HA documentation that had been tested. Broadcom or CSR.

stark root
#

just a second i check complett name

fringe field
#

Realtek are known to be crap

stark root
#

strange thing. the dongle works perfect on windows or normal linux

fringe field
#

They lock up all the time

#

HA is probably a bit better at triggering the bugs but they are there on normal Linux

stark root
#

hm. the dongle works but it dont scans.. idk whats that sh**

#

its an bluetooth 5.0 dongle. that should not be a problem or?

#

its from "UGREEN"

#

treiber whos loading are realtek

next surge
#

Anyone actually succeed at integrating a Level lock? I see a thread on the forums but have a question or two - namely, did you have to move your HA instance right next to the lock (as some have reported)?

fringe field
#

I don’t know whether it’s a power conservation thing or a security thing, but it’s the TX on the lock, so outside our control.

#

I think one of the affected locks you can increase the range in the vendor app in some settings menu.

#

You don’t have to have your HA instance right next to the lock if you have an esphome Bluetooth proxy.

fringe field
#

Zero scan output is one of the most common ways in which Realtek Bluetooth devices fail under Linux

#

Even when Realtek “works” with HA it’s only because HA simulates usb unplug / plug cycles every few minutes to try and fix their crashes.

#

It’s not because it’s Bluetooth 5

next surge
fringe field
next surge
#

Sorry, maybe dongle was the wrong term to use? I just mean, I presume that I can only add BT devices if they're within range (whatever that may be for the device) of my HA BT ... controller (is that the term? the thing that lets my HA hardware use BT), and not just if they're within the range of my BT proxy, is that correct?

fringe field
#

A BT proxy (at least an esphome one) is for all intents and purposes a dongle that’s connected over WiFi or Ethernet

#

At least for BLE GATT

next surge
#

Ahh, okay, that's what I was wrong about / misunderstanding. Thank you!

fringe field
#

The Shelly proxies can only proxy incoming broadcast data

#

But the esphome ones are full GATT clients and in some cases actually better than having a dongle.

next surge
#

Sweet, that makes me doubt less my decision to get one and implement it for fun (even though even if it was totally unhelpful, it was still only $15 and some time spent having fun).

devout hearth
#

There were reports by some that the Level Bolts wouldn't do initial connections through ESPHome proxies, but they connect via HomeKit as opposed to their own integration. Is this particular level lock also connecting via HomeKit?

#

*I don't know if the reports are accurate, but I mention the homekit bit in case it adds relevant information to the conversation. FWIW, my level bolts all connected from within their doors, and some were pretty far from the bluetooth stick in my yellow (none were incredibly close), so it may be feasible that they connected via a proxy (or I may have disconnectced the proxy to get them to connect and forgotten, it's been some time).

fringe field
#

Homekit in general works very well with proxies

#

In fact, the ESPhome bluetooth stack (bluedroid) is often better than BlueZ

#

We have some HomeKit devices that are basically not compatible with BlueZ - e.g. older Eve devices that are slow and have lots of GATT characteristics. BlueZ can't enumerate them before hitting one of its hardcoded internal timeouts.

#

And they work with Bluedroid

#

HomeKit doesn't pin pairings to a particular device. And in the general case you can absolutely pair over a proxy. The encryption stuff is identical, because its implemented in software. You just read and write TLV packets to a GATT characteristic. And it does something very similar when connecting in future.

#

if someone can repeatably prove that this is a problem only when pairing then i'd be interested in a bug report.

#

maybe we are reading a characteristic the lock doesn't want us to, though i don't know why bluez isn't affected if thats the case

#

and if its a connection failure, it shouldn't be limited to pairing time

lone hamlet
#

Are there such a thing as bluetooth "modules" that are connectable up to an ESP such as via serial/SPI/i2c (maybe not even via ESPHome) that would allow many of them to be connected, therefore allowing lots of BT devices to be connected? Please 'reply' so I get notified.

fringe field
#

You can also connect lots of esphome devices to home assistant to do that

#

Even a mix of both

#

HA will pick the best one, even as a device moves around your home

#

If it had to be within an esp without HA you’d have more luck on the esphome discord

normal fog
#

everything i’ve been able to find says discovered devices should just appear as new integrations waiting to be configured, and there is no “scanning” to do. I’ve got an esphome bt proxy and the linux host’s hci0 configured, and both appear to be seeing other devices based on their debug data, but no new integrations appear. any ideas? it feels like i’m missing something obvious.

lone hamlet
# fringe field You can connect lots of usb dongles to home assistant to do that

My HA server isn't in a good location to put USB BT dongles. 😭 But on a positive note, my home is small enough that I can centrally place an ESP BT proxy to access my sensors. If I can avoid multiple ESP's each with its own space, power supply needs, etc, I'm interested in other ways to get lots of "connected-type" BT sensors on one though. Of course I realize that if there's no practical way to do it because of extra BT chip/module costs or whatever, then that's ok. This is kind of a exercise in "can I" versus "should I". That's half the fun of this hobby, right? 😆

fringe field
fringe field
#

The simplest option would be to get a non-GATT tag.

#

That would support an unbounded number of devices with a single module

#

BTHome and and Xiaomi ble probably have some button devices you could check out

lone hamlet
#

BTW, I have a single Xiaomi temp/humidity sensor that I've flashed with the pvvx firmware and using the BTHome v1 format . I haven't had time yet to flash a newer version that supports BTHome v2 though. This particular sensor's board has support for a "binary sensor" in the form of solder pads to wire in a "reed switch"--which I've added. However, it doesn't seem that HA is able to reliably detect when the switch is on/off or is sometimes slow at responding--even when the ESP BT proxy is right next to it. I'm guessing that's just the device BT firmware being slow about sending those beacon/advertising packets, or maybe I have a lot of 2.4GHz interference in my area. 🤷‍♂️
https://github.com/pvvx/ATC_MiThermometer?tab=readme-ov-file#temperature-or-humidity-trigger-gpio-pa5-lywsd03mmc-label-on-the-reset-pin

lone hamlet
# fringe field The simplest option would be to get a non-GATT tag.

I already have 3 itag clickers connected to my BT proxy and have a lot more itags I'd like to make use of. I also figured out the yaml to get double- and triple-clicks going, so that helped expand their flexibility a bit. I've been on the lookout for super-cheap tiny battery-operated button 'itags' clickers. If you spot any that are as you describe, let me know. 😉 I assume by non-GATT you mean they don't 'connect' but just do those beacon advertisements? That would be great to find cheap buttons that do that, or find a way to hack some to be able to do that... similar to how there's alternative firmware for Xiaomi temp sensors to add BTHome support.

wise stream
#

before I switch my esp32 over to esp-idf ~does the Govee h5074 have support? i did a lgiht search but only found problem threads

thorn flax
#

Cross posting from the integration channel, Does anyone know if its possible to have a shelly device connected to HA via a BLE proxy?

#

Gist is that I have a shelly plug that can act as a passive or active proxy. Then I have a shelly H&T3 that has bluetooth. So Ideally Id like to connect the H&T to the plug via bluetooth to save on battery and avoid using wifi to connect to HA

fringe field
#

I can’t answer the question directly but I can say that the Shelly proxy is only a partial proxy. It does active or passive scanning and hands the results to HA. It does not support GATT (which is needed for controlling stuff)

#

For temp and humidity there’s a reasonable chance that would be enough.

#

I don’t know what integration you’d use on the other side of the proxy though. Maybe they use BTHome?

#

I don’t think the Shelly integration would work tho

thorn flax
#

When I click to add a bthome device it says none detected. Not sure if there is something specific I need to do or if it would be auto detected

fringe field
#

Yeah it would be normally be auto detected if it was going to work

thorn flax
#

Im going to try to bring the devices really close together

elfin pike
#

having some trouble with a new homekit BLE device not being discovered in HA. it initially showed up once, setup failed, now it's gone and i cannot get it to appear again

found this in the logs: 2024-03-11 13:24:28.560 ERROR (MainThread) [dbus_fast.message_bus] "org.bluez.AdvertisementMonitor1.DeviceFound" with signature "o" could not be found could it be related?

fringe field
#

tell me about your home assistant install

#

are you using HAOS?

#

I'm guessing not, and somehow passive scanning got turned on for your dongle

#

passive scanning on linux is experimental and requires BlueZ to be super up to date and configured to turn experimental mode on

elfin pike
#

@fringe field i'm using HAOS, passive scanning is disabled

#
Bluetooth Radio (0bda:8771)
by Realtek
Firmware: homeassistant
Hardware: usb:v1D6Bp0246d0548```
fringe field
#

well at least we know its a cursed radio

#

if passive scanning is disabled it shouldn't be using that API

#

so the message is weird but i'd still expect it to work

elfin pike
#

i may have briefly put it into passive mode and then back

#

just been trying everything

fringe field
#

that could explain it

#

the realtek radio - in the worse case those things crash every few minutes

#

i forget an important thing before though

#

HA tries to recover them from that state but it takes a couple mins to notice

#

so for something like a temp sensor or an ibeacon, it kinda looks like its working

#

(and it kind of is working enough, barely)

#

some don't have functional USB reset, and then you have to unplug them. but the others kind of limp along working about 10% of the time, capturing just enough BLE broadcasts to look like they aren't a hot mess

#

(we prefer CSR and broadcom in the docs, or ESPhome proxies)

elfin pike
#

maybe I should try a different dongle then?

a store nearby has Asus USB-BT400 in stock, but can't find what kind of radio that is

#

thank you so so much for your support btw

fringe field
#

NP

#

thats a BCM20702A0

#

(Broadcom)

#

the docs have a warning about those and HAOS

#

might work, might need updated firmware

#

i think im currently using an LM Technologies LM1010 (as well as esphome proxies)

#

which has the same chip

#

i think i did end up upgrading the firmware (but im not running HAOS in production)

elfin pike
#

ok so i have the iphone here now

#

when trying to pair it says "device already connected to another home"

#

so that would explain it

#

clearly the blinds aren't reset right

dull vault
#

interesting question: i have 1 bluetooth adapter in my HA, then 2 ESP32 to extend the network. is it possible to determine which bluetooth adapter a bluetooth beacon is near? for example. if my cat has a beacon on and goes into the living room near that ESP32, could i somehow see that? other than the distance being 0-10 feet in HA. trying to track when XYZ beacon goes near a specific ESP32 device.

fringe field
#

yes and no

#

the information is in HA, as thats how HA works outh which proxy to use when connecting to a bluetooth device. but its not generally user facing.

#

private_ble_device does expose it as an entity or attribute or something

#

but i think the main generic ble tracker needs some love to bring up to current best practices, then it could probably be added to that

dull vault
fringe field
#

An integration

dull vault
#

ah ok

#

darn i was hoping it would be easier to see

fringe field
#

It’s for devices like iPhone that use an encrypted rotating MAC address to protect your privacy from trackers in public places

dull vault
#

gotcha

fringe field
#

It will tell you an estimated distance d and the MAC address of the nearest proxy

#

Though I use estimate lightly

dull vault
#

and that would that work with my little bluetooth beacons?

fringe field
#

Do they have random MAC addresses?

dull vault
#

nope

fringe field
#

You probably want the main ble tracker. But that doesn’t have the extra entities unfortunately (it’s basically unmaintained)

#

If you know python and want to maintain a part of home assistant it is doable

dull vault
#

unfortunately not to any level i would brag about lol

fringe field
#

Then right now you are out of luck unless you look into custom components or addons and custom firmware.

#

Espresence is another esp firmware that has a main role of indoor positioning. It does not work as a proxy.

dull vault
#

np. thanks for answering.

frozen sage
lunar mulch
#

i need someone to explain the esphome bluetooth proxy. i bought some esp32's but i dont know exactly what im trying to do with it

#

basically i just wanted something continuously running scans and maybe sending a notification when something new shows up

#

i went to the esphome bt proxy page and used the webpage to flash the esp32.. then i added that in HA integrations but it has nothing except a "safe mode button". i was confused but then i installed esphome addon and "adopted" one of those chips, which seems to have installed a buttload of code on it. not sure what is next

fringe field
#

It is scanning in the background right now and if it sees a compatible device it will pop up a discovery for the relevant integration. If you had switchbot devices it would prompt you to setup the switchbot integration. If you had xiaomi devices it would offer the Xiaomi BLE integration

#

Nothing else is happening because it can’t see a device that has a compatible integration

#

Though it’s one of the less maintained integrations.

lunar mulch
#

ah ok thanks. I did see it add a new device

#

it's pretty transparent

#

what I don't understand is what happens when I adopt this in esphome

#

seems like maybe it becomes a more modular device and I can upload a config telling it what I want it to do

fringe field
#

It can work independently of ha

#

So you could have automations running on the chip even if HA is down

#

Or even if you got rid of HA

#

It turns a yaml config file into C++ code and builds it and manages updating it

#

There is some crossover but because one is c++ and one is python is not exactly the same

#

The point of a Bluetooth proxy is just to be like a virtual Bluetooth adapter for HA that’s in a different location to your HA machine. It uses the code in HA to talk to your devices, not esphome code.

#

If you use esphome directly then it could talk to your device instead and run automations directly on itself.

#

But HA can aggregate multiple proxies and handle load balancing over them or failover if one proxy is down. It has integrations that need less config. It has integrations ESPhome doesn’t.

#

The main purpose for the ESPHome addon for proxy users is just firmware updates

#

The image you initially flashed was a pre compiled esphome image. Adopting it hasn’t changed anything, it was esphome and it still is esphome. But now you can wire up your own electronics to it as well if you want, and configure those through the addon.

#

I have proxies in my ESPHome addon that are dedicated to proxying. I have others that are full blown home made devices .id generally say not to mix both on the same chip.

spare geyser
#

Do any of you guys own the Switchbot Lock?

#

I'm thinking of getting the Lock Pro and was planning on using it with Matter. But also thinking about using it with a ESP32 proxy.

#

Just wondering how fast it works with a proxy. The other SB devices I have vary in speed.

#

At times they work really fast and slow. I wonder if the Lock is more consistent or it also varies?

merry gull
#

Hi. I am running Home Assistant through VS Code. I do it by opening Docker Desktop, then navigating to HA folder on VS Code. Then a pop up shows up in VS Code asking if I want to run in a devcontainer. I press "yes". How can I make USB-BT400 Bluetooth adapter visible in my HA in such a situation?

fringe field
#

You need the docker for desktop VM to be running BlueZ (I don’t think it does) and for the VM to support USB passthrough.

#

Generally even if you were to go to a proper virtualisation setup but still relied on USB passthrough, you’d probably still have problems. USB passthrough being rubbish is the 2nd most common complaint on here after Bluetooth adaptors being rubbish.

merry gull
#

maybe you know some tutorials to do it on Windows? Did a quick search, but I was not able to identify useful information. Of course I will spend some more time Googling it

fringe field
#

No

#

We see people using a proper dedicated virtualisation by running HAOS in virtualbox. But they usually end up in here with Bluetooth reliability problems.

#

For people doing development we usually say to use esphome Bluetooth proxies instead of usb dongles

merry gull
#

thanks

#

this is for development, so will check BT proxies

merry gull
#

but is it possible to use USB dongle for development, just very hard to implement?

fringe field
#

It works on Linux and Mac

merry gull
#

got it

hidden oasis
#

Hi, I'm still rather new to HA and just got my green set up and running. I now want/need to add Bluetooth functionality. Anyhow, all USB dongles listed here: https://www.home-assistant.io/integrations/bluetooth/ are currently not / hardly available (I'm located in Europe) and quite frankly father old (BT version seems to be 4.x for all listed devices).

Which BT 5.4 (or at least 5.x) dongle can I use if I don't want to resolve to using ESP32 to add BT functionality to my HA green?

next surge
#

Hi, my Bluetooth integration shows two devices, one of which has been stuck on "needs attention" / "failed setup" for days. Here are some screenshots: https://imgur.com/a/9wIMGiS. Some more info: I have a HA Yellow with a CM4 with BT. In case it's related, I also have an ESPHome with the BT proxy firmware on it. Thoughts on how to address this "needs attention" "device"? Thanks.

fringe field
#

If you must have a newer dongle then the main advice is to get one that explicitly supports Linux, and that support needs to be upstream. If it’s not upstream you should avoid it. If you are running HAOs, the firmware needs to ship with kernel. There’s no way to side load it.

#

If you look at the docs you’ll get a sense of where the vendors are: Realtek is great if you want a new hobby unplugging and plugging in usb devices, one is best for speed, one is best for number of devices at once.

#

Aim for one with an antennae and try and use a sub extension to get it away from interference your computer generates

#

I should add that Bluetooth on Linux is a little bit stagnant. Even passive scanning, which has existed since before the new Bluetooth features in HA, is still hidden behind feature flags in BlueZ. I think it will be a long time (if it happens at all) before things like long range trickle down from Bluez into bleak and then in Ha.

fringe field
#

AA:AA:… is weird - did you edit that? If you didn’t then I’d guess something weird happened when you added a dongle. Like it was momentarily visible to Bluez with the wrong MAC address. Maybe a bug in its firmware loading?

#

Unless you expect to have 2 functional dongles you just need to delete the one that’s broken.

#

It might get rediscovered as a new dongle. In that case mark it as ignored.

next surge
#

I don’t expect to have two functioning dongles, I thought I had only one BT controller (on board the CM module), and I didn’t edit that name, so I can safely try to delete it, you think?

maiden thistle
#

Is there a way to manually search for devices. Most of my BT temp sensors were found by HA automagically. But I have these 2 small ones that work with Tuya Smart Life but Home Assistant is not showing them

#

i guess i need to know how to figure our more about the devices too. Do I have to crack them open or is there a way to figure out what they are from the tuya app

#

the tuya app isnt staying connected to them so they are useless for history right now

fringe field
#

Sometimes if you cancel a discovery by accident it won’t come back by itself without either restating ha or going on to “add integration”. But that won’t do a new search either.

maiden thistle
#

Alternatively, is there a way to change teh BT device. I bought a BT dongle and cant figure otu how to make sure HA is using it instead of the built in BT

#

I want to ensure its not just a range/power issue

fringe field
#

You can download the diagnostics json from the Bluetooth integration

#

That will have all the MAC addresses it can see

maiden thistle
#

i googled the hell out of it but everything I found about switching BT didn't seem to work

devout hearth
#

I had to unplug my BT dongle because it was causing performance issues, presumably by drowning out my proxies, so I can't verify this, but I think you can see the BT MAC address in the BT integration. In that case, if your BT dongle has a MAC address documented, you could check the integration to see if it matches.

odd birch
#

Hi everyone! I'm trying to integrate my SwitchBot Hygrometer with Home Assistant using a Bluetooth dongle. While I was able to connect it, I'm having trouble getting the absolute humidity and VPD data to pull through. Could you please advise if it's possible to do so and how I might go about it?

lunar mulch
#

sounds like a strange issue. in the integration are those properties "enabbled"? i know sometimes certain things are disabled yby default

real blaze
maiden thistle
#

I can't find a good answer. Can home assistant track tiles? I just want the ability for it to tell me when a tile is in range.

#

I'm hoping the stronger By of my HA can detect it better than my phone. I'd be happy if there were an integration that just scans and reports whenever a particular device is in range

thorny ingot
#

I just started working on that myself. I have four tiles and setup two M5 Stamp C5 Mate boards with ESPresence - one in bedroom and one in living room. It's sort of working but the tiles keep alternating between bedroom and living room. I've not had time yet to figure out why...

fringe field
hollow torrent
#

@oblique oak thanks for the approval of the motionblinds Bluetooth integration 🙏🏻

#

Great to see it in the next release.

analog scarab
#

I do have two bluetooth proxies setup in HA and they appear in esphome under devices - any way to check/test if they are working well?

spare geyser
#

I have 4 and I'm honestly unsure too although I think I have an idea.

#

Two of them always change between unavailable and unknown. I think when it says unknown it's working.

#

But the other 2 I have never shows any activity. I press the safe boot mode but it still doesn't say unknown or anything else.

#

So I feel like they're not working properly. But I've never taken the time to learn for sure.

oblique oak
#

Check diagnostics, if it can see bluetooth devices, its working

granite isle
#

Hello! Sorry if this has been asked a billion times before but: My understanding is that directly connecting custom (i.e. esp32/pi) bluetooth sensors to HA is a pain because reasons, and it's suggested to use a ble proxy on an esp32 or similar. This will then allow HA to see bluetooth devices connected to that proxy, but would still only work for known integrations not any custom ble service i might write. In that case i should also tag on an ble<->mqtt gateway so i can subscribe to sensor thingos. Is this about correct? If i want an mqtt gateway do i still need a proxy or i can bypass that altogether and run the gateway on esp32? Thanks!

#

Oh also would this work in the case i want to control a device via ble as well or not really?

fringe field
#

However keep in mind that there are lots of smarts in HA, like handling multiple proxies (de-duplication of incoming packets from multiple proxies and working out the best one to use for GATT) and to minimize CPU usage in general.

#

HA will not only pick the best proxy for a device automatically, but it will fail other to another one if there’s a problem with the first. For example, esp can handle like 2 or 3 GATT connections at once. So HA tracks that and doesn’t over fill the ESP.

#

I have no idea what MQTT solution you are thinking of but it likely won’t do everything HA is doing.

granite isle
# fringe field I have no idea what MQTT solution you are thinking of but it likely won’t do eve...

Thanks for the reply and info! I guess i was going down the mqtt route because i couldn't find a lot of info on developing + connecting custom BLE services to talk to HA. For simple passive broadcast stuff it seems there are things but for bidirectional control (i.e. a sensor + a button to control stuff) i hadn't found much info, would be great if you could point me in the right direction if that exists

#

Is BTHome a reasonable starting point?

fringe field
#

BTHome is a good place to start for designing your own Bluetooth device

#

If you follow that protocol you won’t need a custom integration

#

(But it’s for passive sensors)

#

But if you want to do GATT then I’d start with something like led_ble maybe.

#

Or prove it works outside HA by directly targeting bleak

granite isle
#

Ah right so just to clarify, where should i look for nonpassive devices, i.e. ones i want to control from inputs in HA (like a switch kinda thing)? I'm certainlly gonna do baby steps of setting it up over wifi first, then getting it to work over a couple of ble devices talking to each other, but just so i know what i'm aiming for for the final version...

fringe field
shy narwhal
#

i'm looking for a cheap tag i can put in my daughter's school bag so when she comes home from school, the door is automatically unlocked

#

(yes, this is not a very safe option, but i live in a rural area, so the locking of doors is just a general indication of the human presence within)

fringe field
#

It’s hard to even know what integration something like that would work with. Some rotate their MAC address so you’d need something like the private ble device integration to see them. Or maybe they’d be ibeacons.

#

I know some people here have ibeacons strapped to their bins. But can’t remember which ones off hand.

keen iris
#

heyho, i got a ThermalPro TP358 - which keeps a time/date. Sadly it drifts a lot and the official integration does not have a way to set the time. I would like to add this to HA, there is piror art in https://github.com/koenvervloesem/bluetooth-clocks - but I can't use this as I don't have a bluetooth adapter in an opportune place - I have several BLE proxies for HA through. What are my options?
A custom integration? Has someone already done this before? Essentially i just need to generate a bytestring and chug it at a specific endpoint of the device.

shy narwhal
faint eagle
sharp ember
#

Asking the same question. Bought maybe by mistake M5 atom s3 lite and struggling to install BT proxy on it. Any help on this is appreciated

simple meteor
sharp ember
simple meteor
#

You just need to add that to your existing yaml and whatever else you want to run on the board

low shoal
#

Is there a concept of a Bluetooth mesh network?

fringe field
#

Yes

#

There are a couple of mesh protocols iirc

#

The one that ships with bluez conflicts with bluez though so you end up needing 2 dongles

#

However HA can get full house coverage for normal non mesh BLE devices by using ESPhome Bluetooth proxies.

#

(Which is just like having loads of dongles all over your house, which are then merged into a single virtual API by HA that the integrations can use)

pulsar wyvern
#

Hello, I'm a HA noob and I'm wondering how I can control multiple LED lights? I have 2 Bluetooth LEDs but the phone can only connect to 1 Bluetooth connection at 1 time, and connecting Bluetooth on and off and to devices and then using the device's app for control is a hassle. I'm hoping HA can manage all the Bluetooth connections? I have a LIFX LED light and unsure how to find specs for the other Bluetooth LED light?

maiden thistle
#

I had wanted a way to have HA notify me whenever a tile tracker comes into range in lieu of paying Tile for that service.

shy narwhal
fringe field
#

There are other options from e.g olimex that are well liked on here

#

It’s best to go LAN if you can. A lan based Bluetooth proxy can embarrass Linux Bluetooth. WiFi ones are still good but the WiFi and Bluetooth stacks have to share one radio

low shoal
#

@fringe field so it seems my HA OS install is using the onboard intel bluetooth - can i use ESPHome to extend my bluetooth?