#bluetooth-archived

1 messages · Page 7 of 1

low shoal
fringe field
#

Yes.

leaden egret
#

hi all, one question regarding bluetooth_tracker

#

I am failing installing since bluez is not available

#

it seems a confirmed issue

#

any advice for it?

fringe field
#

It’s hard to answer without knowing more

#

Bluez is basically part of the Linux Bluetooth drivers

leaden egret
#

ack

fringe field
#

If you are running HAOS then it’s that your dongle or Bluetooth isn’t compatible

#

Or it has severely crashed

leaden egret
#

I am trying to use it since bluetooth_le_tracker is not detecting my phone

fringe field
#

Ah

leaden egret
#

I am running HA over rpi4

fringe field
#

On the built in Bluetooth ?

leaden egret
#

yep

#

bluetooth_le is working

#

but it does not detect the phone

fringe field
#

No

#

Modern phones can’t be tracked by le tracker for privacy reasons

leaden egret
#

ack

#

we need the legacy tracker

fringe field
#

For iOS there is private_ble_device

#

The legacy tracker is not maintained by anyone

leaden egret
#

yep

#

it seems so

fringe field
#

Doesn’t work with proxies either so terrible really

leaden egret
#

ack

#

so, what do you think is the best way to track the phone via bt?

fringe field
#

I mentioned what I use. Works great.

#

I know android users try to use iBeacon

#

However they turn up here with problems a fair bit

leaden egret
#

do I need to install an app on the phone?

fringe field
#

For Android yes. For iOS no.

leaden egret
#

ack

#

thx

#

what do you suggest?

#

or maybe I can just get some simple ibeacon device

fringe field
#

I use private ble device and an esphome proxy at the front of the house. Turns on our alarm when we are all out. Turns it off when we get back. Turns the outdoor lights on if I arrive in dark. Works great.

#

Would be a complete non starter with legacy tracker because it would have a range of less tag one room

leaden egret
#

ok

#

what do you mean with 'private ble device'?

fringe field
#

It’s an integration.

leaden egret
#

oh ok

fringe field
#

Modern BLE devices sometimes have encrypted random addresses

#

If you know the encryption key, you can detect them despite the randomness.

#

That’s how we can do device trackers for iOS devices (they don’t work with the ble tracker)

#

Unfortunately we only have a way to get the encryption key on macOS right now.

#

You might find some help at the Bermuda project

leaden egret
#

ack, thx

fringe field
leaden egret
#

ack, thx

#

I will look into it

regal mango
#

I have a fireplace which can be controlled with an Bluetooth App this app is awful and I would like it to control with home assistant is it possible to the commands or some sort of a way to intercept these commands?

fringe field
#

It’s not impossible, but there is always doubt that the underlying Bluetooth characteristics are any better than the app you want to replace. You would need know enough python to write your own HA integration. If that sounds like you, there is a #devs_bluetooth-archived

low shoal
fringe field
#

There’s not much to share. State trigger for when the device tracker switches to the home or away states. Turn a light on.

low shoal
#

ok i guess i couldn't figure out what to use. i see an estimated distance sensor and i see a "diagnostic" as Home in Private BLE Device

#

so wasn't sure if you are doing if estimated distance is above 30 feet, run automation etc

fringe field
#

No, annoyingly device trackers default to diagnostic

#

I have no idea why

low shoal
#

so basically, when not "home" it goes to "away" state?

fringe field
#

Something like that

#

It might be “not_home” or something

#

You have to keep in mind that “home” means in range of one of your proxies or dongles, so even with 4 proxies there is still a dead zone in one corner of my house

#

And there is a timeout that is fixed which is how long it takes HA to notice a device has gone away.

low shoal
#

yea i guess in my setup it says "900s"

fringe field
#

It takes about as long as apples “find my” alerts when you forget your headphones somewhere

low shoal
#

i guess it might vary as lets say you in like 500s since last interval when you leave home, it will "activate" in 300s right?

fringe field
#

Yes

#

Though all my devices have an interval of like 0.5s

low shoal
#

is that dependent on the device or the bluebooth adapter?

fringe field
#

Device. There is a secondary timeout in HA so it’s never that quick at arming my alarm, but the disarm and turning the porch light on is basically as I reach the bottom of the drive

low shoal
#

what devices do you use? i have iphone 15 pro and apple watch ultra and they are both 900s

fringe field
#

Ah then something is wrong with your setup

#

14 pro and non ultra Apple Watch

#

Wife has a less pro phone and it’s similar

#

If you are seeing 900 I’d guess Ha hasn’t seen enough packets to lock on to an interval

low shoal
#

yea i only set it up today

#

and haven't left home yet (WFH)

fringe field
#

Even so it should lock on within a couple of seconds for an iPhone given the amount of crap they broadcast

#

What Bluetooth dongles/proxies you have again?

low shoal
#

generic bluetooth i think

fringe field
#

Intel. Hmm.

#

Vm or bare metal?

low shoal
#

bare metal

#

still trying to decide how to do the BLE proxies (on the cheap)

fringe field
#

I’d be interested in seeing a signal strength graph. We have had trouble with intel drivers in the past. Though nothing as bad as realtek.

low shoal
#

both watch and iphone (HA laptop) is in my office

#

so signal is -78 dBm

fringe field
#

Are there gaps in the graph?

#

My watch is -58 in a different room to any proxy. Though phone is -74 in same place 😂

low shoal
#

i'm like literally 5 feet from the device

fringe field
#

Im interested in if the driver is dropping packets

#

But you know people tell me they are 1’ away all the time and don’t tell me about all the usb3 stuff or whatever so I generally ignore half of what people tell me 😅

#

One person had not got the antennae correctly attached to their internal Bluetooth card

#

So you know discord is pain

low shoal
#

so its a laptop so no antenna

#

and using a usb 3.0 donble for ethernet

fringe field
#

USB 3 is bad for ruining the signal. If there were gaps in your signal strength gap it’d be worth ruling out. But if it’s fairly steady in the 70s 💪

low shoal
fringe field
#

I’m more suspicious of the device itself or its driver. Think I’ve heard similar for Intel in the past. Beoadcom and CSR here (+ proxies)

fringe field
#

That loooks.. yeah. Not great.

low shoal
#

hmmm

#

can i use different drivers?

fringe field
#

No. Only by getting a different dongle.

low shoal
#

hmmm well i guess back to the drawing board.

#

just curious, why not simply use the built in location feature in HA?

fringe field
#

Not entirely sure which location feature you mean. But device_tracker is the best we have for this.

low shoal
#

i think there is a feature for tracking the location of your phone right? i think it might be "device_tracker"

fringe field
#

That’s what private_ble_device provides

#

A device tracker is an entity with 2 states - home and not home 😂

low shoal
#

i think its via the "mobile app integration"

#

it literally has my "address"

#

so i figure it i say, not at "current address" run automation?

fringe field
#

Think I misunderstood your question

#

So I want local first

#

I’m not going to have the mobile app send my location over the internet back to HA

#

Even if it only sends it to my instance, some app tracking my location with 1m precision is creepy (to me)

#

That’s why I use the Bluetooth device tracker

#

So that’s why i do it this way and not through the app integration.

#

Plus arrival automations works even if my phone doesn’t have internet. Theoretically your phone can still broadcast some beacons in an off state or super low power state.

low shoal
#

makes sense. appreciate the insight

#

so i guess you dont use the app and just login via the browser when remote?

fringe field
#

I do, but I’ve blocked some of the tracking features.

#

I don’t not trust the app, but it’s about data minimisation (one of the eu data protection principles)

#

There can’t be a whoopsie with my data if I don’t let it be collected

crystal flame
#

Is there a way to allow HA to take a bit longer to connect to bluetooth proxies? I'm frequently getting errors like this:-
2024-04-04 01:42:54.931 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547179842240] Error ESP_GATT_CONN_FAIL_ESTABLISH while connecting: Connection failed to establish - it looks like its not the BT side that's failing but the connecting to the ESP32 ?

spark cairnBOT
#

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

steep valley
spark cairnBOT
#

Please use imgur or other image sharing web sites, and share the link here.

Image posting is blocked in most channels to discourage people from sharing text as images. Sharing text as images assumes that everybody sees the world as you do, which isn't the case. Some people are colour blind, or have visual impairment that means they can't make sense of an image of text.

fringe field
#

Have you followed the instructions for the Bluetooth integration?

#

Read them again and look for the step about the dbus socket.

#

Also the step about dbus-broker

#

HAOS Bluetooth will probably work better than stock Linux because things like the dbus-broker change are baked in. The bluez version is often newer. Etc

steep valley
fringe field
#

Every integration in home assistant has its own page on the home assistant website

#

Just go to the integrations section of the home assistant website and search for the one called Bluetooth

steep valley
#

I found the fault:
volumes: - /run/dbus:/run/dbus:ro # Bluetooth - ./volumes/homeassistant/config:/config # - /home/pi/media:/media
Here in the row with the #bluetooth-archived i removed the # ans then it was running

Original:
volumes: # - /run/dbus:/run/dbus:ro # Bluetooth - ./volumes/homeassistant/config:/config # - /home/pi/media:/media

brisk fractal
#

pretty sure I know the answer is no but want to check - I have 4 switchbot curtains that require active connections. I want them to open at the same time. 3 open simultaneously, one opens after. Guessing it's due to only allowing 3 active connections per proxy? But, I have 2 proxies + the actual bt of my device all within 10 ft of the 4 curtains. So it seems like they're all trying to connect to the same proxy vs 3 using the actives on one, and 1 on another. Any thoughts on how to investigate or troubleshoot?

oblique oak
#

It will show you which one it’s selecting

#

It should not select one, if all the slots are in use

brisk fractal
#

thanks

oblique oak
#

I wouldn’t be surprised if there’s a race there, if you try to do them all at once, it might not know that the slots are going to be used so it might be too late for it to be marked as used before it tries all of the same one since it’ll have the best signal

#

If that turns out to be the case, we could try to make it race safe, but it may be difficult to do since it’s the remote, ESP that marks the slot unavailable, not Home Assistant

brisk fractal
#

I'll play around and see if I can get some useful logs but that scenario makes sense

#

worst case I can redesign the automation to add delays between individual devices vs. just using a group like I am now. It might turn out that the short delay is faster than simultaneous due to the race condition

oblique oak
#

You might want to enable logging for bleak_retry_connector as well

#

It’s possible that it starts to back off because it runs out of slots, and it doesn’t know that if it tried again right away, there is another device that you could connect via

brisk fractal
#

ok added both to my config file

brisk fractal
oblique oak
#

If you send them over, I’ll take a look

brisk fractal
#

pastebin work? Not sure if there is anything sensitive in the bt logs

oblique oak
#

pm is fine

light loom
#

I am a bit lost regarding BLE. I am getting raw BLE messages (bytes) from a passive Bluetooth device exposed over MQTT. How do I feed these to let's say xiaomi_ble or Home Assistant in general? The messages still need to be decoded and parsed somehow, but I don't know where to start. Could somebody point me into the right direction?

fringe field
#

So no wonder you are lost 🙂

#

Home Assistant has support for esphome Bluetooth proxies connected via the native esphome protocol, usb Bluetooth dongles, Shelly devices connected by its native protocol, and I think there’s another commercial vendor too.

#

It can in theory handle usb dongles that are physically remote using usb over ip (Linux driver) or usb over Ethernet hardware

#

It is very tightly optimised to deal with many proxies at once, and can do GATT as well (roaming within your house so that you always connect with the best proxy).

light loom
#

In my case it's a Shelly device. As far as I understand it pushes the BLE information either through a websocket or MQTT. It is however the very same information. So there is still nothing I can do with this in Home Assistant?

fringe field
#

If you use the native shelly integration it will just work

#

Though it won’t support GATT and I dont know if its as heavily optimised as esphome

light loom
#

The thing is that native Shelly also does not work with MQTT.

fringe field
#

No

#

If you decide you want your devices to work though, that is how, that’s all I’m saying.

#

Someone could probably make an integration that fed Mqtt advertisements in there like it was a vitual Bluetooth proxy

#

Though it would be more annoying to write than normal (stream of data containing data from multiple physical sources would need splitting back out into N virtual proxies so that the logic that Ha has for things like proximity detection and callback avoidance / event deduplication work)

oblique oak
brisk fractal
oblique oak
#

leave the others in because matching the messages to the times will be helpful

brisk fractal
#

alright, updating the config and I'll pull another log in a few mins

oblique oak
#

so its working just as designed based on the log

#

here is the root of the problem

#

the ESP can only actually only establish one connection at a time

#

so probably 2 establish quickly since 3 get assigned to the one with 3 slots free

#

an one gets assigned to the other one with slightly worse signal

#

and the other 2 get in line behind the one with the 3 slots with the best signal

brisk fractal
#

Any suggestions on what I might be able to do to reduce the slowness? Like would adding slight delays perhaps help?

low shoal
#

it shows up in my integrations page as an ESP32 device but when i go into the ESP32 add on an option shows up to "Adopt" it. Do I need to adopt the esp32 ble proxy via the esp32 add on?

fringe field
#

The addon is for managing the configuration of the device and updating the firmware of the device

#

I ran proxies without the addon and instead updated the firmware myself with the ESPHome command line, only recently switched to the addon

#

It’s definitely worth learning how to update the firmware though

low shoal
#

Another silly question - can espresence be also used for ble expansion? Or will it only do presence detection?

fringe field
#

Bermuda might be an alternative

low shoal
#

hmmm interesting. got 5 esp32's so lots of trial and error over the next few weeks 😄

#

sad i'm paying more for the cable/charger than the esp's 😆

rare spire
#

Low level user here. Please ELI5 😂
I have a FAN, that connects via bluetooth to its remote.
I'm trying to use HASS to connect/control the FAN entity via bluetooth

#

the FAN is in pairing mode, but it doesnt seem to be appearing in HASS

#

other bluetooth devices such as switchbots are working perfectly fine and discoverable

devout hearth
rare spire
#

Able to throw me some links on how to do it?

devout hearth
# rare spire Able to throw me some links on how to do it?

Any scenario where things need paired would be documented by the relevant integration. For instance, if you were using bluetooth HomeKit devices with the HomeKit Device integration, you would pair them using its method, but that isn't going to work for other devices.

rare spire
#

Yup understand

#

Where i'm coming from is, how do i integrate them myself (for devices without any known published integrations)

devout hearth
fringe field
jagged dirge
#

I have an ledvance bluetooth lamp. Is there any way to cannect it with Homeassistent

fringe field
#

See above

#

What matters is whether there is an integration

#

If your device works with homekit you are in luck (some ledvance stuff does)

rare spire
#

Welcome to bluetooth hell

low shoal
#

does esp32 bluebooth have an option to show "network map?

regal mango
#

Is it possible to snif a Bluetooth remote and to use this to send to the device trough home assistant?

crystal flame
#

Is there a protocol document for bluetooth proxies? - I want to add that functionality to a device that also does other things but if I have a protocol I could happiliy implement it.

fringe field
#

ESPhome Bluetooth proxies run over the ESPhome web socket, so I think there will be a proto file for that maybe? But you probably don’t want to implement the ESPhome protocol if you are not ESPhome.

#

One of the integrations has to poll a http endpoint on a gateway device to capture recent advertisements iirc

oblique oak
#

at some point when I finish out the coverage for bleak-esphome I'll add some docs but right now you'd have to look at all the current usage to figure out how to do it

crystal flame
crystal flame
# oblique oak If your application is in python, you can use <https://github.com/esphome/aioesp...

oooh, I might be able to get an understanding of how those integrate with HA, and just inject my own transport mechanism in, maybe 🙂 - are any of those actually HA integrations though? First glance makes me think they're clients for ESPHome devices, and that's what I'm changing, I need to create an integration that provides a bluetooth adapter to HA, but talks to my devices, probably with a simpler protocol - I just need to find devices and send gatt messages

fringe field
crystal flame
#

Thanks for the pointers, I think that's a decent amount to go on 🙂

raw narwhal
#

Hello everyone! I am looking for a solution with HA to the following use case:
I live in an apartment at 7th floor of a building. When i arrive at floor level entrance from outside, i can manage to open the main building door from HA via ring intercom.
But to do that, i need to take at least my mobile, unlock it and push something on HA.
I was thinking to use a small BLE beacon, one of those with a small button, that you can use also as tracker, connected to my mobile. So that i don't have to take my mobile but just push the button of the beacon which is on my keyring.
I couldn't find any solution to get the button trigger signal to the mobile, so that it could open the HA switch. If i am inside the home, any ble reader (esp32 or so on) can get the signal and it works... but what about when i am down and not in the range of my aparment?

sharp plover
#

I've got three MiFlora devices that work with the Xiaomi BLE integration. Two of them have successfully connected but the third refuses to show up in HA.

I'm able to connect to the device from my phone and read the values and it even shows up in bluetoothctl from HA as well. Anyone have any pointers as to why it might not be showing up in the Xiaomi BLE integration?

faint eagle
#

I don't know but things like firmware version would be good to compare between working and non working

sharp plover
#

All on the same (latest) version

faint eagle
#

Using a USB dongle or proxy?

sharp plover
#

Using a dongle, not sure which one tbh but it's been working fine for forever

faint eagle
#

Do they passively emitdata or require an active connection

sharp plover
#

They passively broadcast

#

And should get picked up by the Xiaomi BLE integration

faint eagle
#

Yeah. Especially if it works in the app

#

Try taking one of the working ones offline and see if this third one starts working?

sharp plover
#

Doesn't seem to be so far

faint eagle
#

I'm Assuming you've moved the sensor around. Is the dongle on a USB extension cable?

sharp plover
#

It's attached directly to my server in the front usb port

#

And yup moved it all over

#

put the battery in and out to force it to broadcast as well

#
2024-04-22 00:32:42.712 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci0 (00:1A:7D:DA:71:15) [connectable]: C4:7C:8D:6C:15:11 AdvertisementData(local_name='Flower care', service_data={'0000fe95-0000-1000-8000-00805f9b34fb': b'q \x98\x00$\x11\x15l\x8d|\xc4\r\t\x10\x02\x00\x00'}, service_uuids=['0000fe95-0000-1000-8000-00805f9b34fb'], rssi=-75) match: set()
#

Put the bluetooth integration in debug mode and it's definitely seeing the device

#

Xiaomi BLE integration on debug mode says absolutely nothing

#

I just found out my scale connects to the Xiaomi BLE integration as well

#

Just paired it and it worked right away

#

But still no sign of the mi flora

faint eagle
#

Sounds like you've done everything that I can think of. Maybe someone else will come along with more ideas.

alpine herald
#

So, I have a question related to a bluetooth ESPHome device I added to my HA setup:
Is there an easy way to confirm the bluetooth signal and capabilities of a device that was flashed using this guide: https://esphome.io/projects/index.html ?
I used a simple ESP32 WROOM board https://a.co/d/j0mzxMI
Followed the directions and flashed the software on to the device. I plugged it into a wall socket that is relatively centrall located. But I am not smart enough to know how to check the logs/determine if it's actually operating as a bluetooth proxy and helping me to extend my bluetooth range in my house...

#

How can one test signal? Can I find a way to unplug the proxy, scan for bluetooth somewhere, and then plug the proxy back in and see a noticable "different" strength? I apologize if that's a silly question ad not how Bluetooth works, but I'm just trying to understand if my plugged in proxy is actually doing anything and how best to test. Thanks ahead of time!

sharp plover
#

I can see all four Flower Care devices in Bluetoothctl but only two of them were picked up by Xiaomi BLE

#

bluetoothctl remove [mac] removes the devices so it no longer shows up under bluetoothctl devices

#

Then reinserting the battery makes it show up again

#

So the bluetooth dongle is definitely seeing the device, it's just not being communicated to the Xiaomi BLE integration

sharp plover
#

https://github.com/home-assistant/core/issues/91237

It seems like I'm not the only one with issues here, but people are saying it's related to the Linux kernel. I'm however running Home Assistant OS in a vm so I can't really downgrade the kernel or anything afaik. Fully rebooting the vm also doesn't seem to do anything

fringe field
#

It usually is range, interference, bad Bluetooth chipset, wrong fw version, wrong kernel

#

Which is what you will find in Google

#

And I don’t think it’s the case for you

#

Quick question, have you tried restarting Ha?

#

Sometimes they don’t show on the discovery page but do show if you go onto the “add integration” button and choose the Xiaomi ble integration. Not a bug but a side effect free of some performance trade offs that had to be made, iirc.

#

The other surprisingly common gotcha is that they accidentally ignored a Bluetooth device.

#

Make sure “show ignored integrations” is ticked in the discovery filter.

#

Some of the problems we have with Bluetooth on Linux is with bluez not completing “discovery”. Not much we can do about that, esphome is usually much better for devices that are hitting those sorts of problems.

#

Or you could try setting the Bluetooth integration to passive mode (should be fine for Xiaomi devices).

sharp plover
#

And theres definitely no ignored or disabled integrations in your setup?

#

Welp that was the problem

#

Apparently all other MiFlora devices were ignored for some reason

sharp plover
#

I've been searching through the source code and everything to find what could possibly cause all of this but apparently it was just ignored 🙃

#

It's discovering them now 💛

fringe field
#

Great stuff!

sharp plover
#

Thank you so much past / current you haha

faint eagle
#

That's great!

alpine herald
#

So, I have a question related to a bluetooth ESPHome device I added to my HA setup:
Is there an easy way to confirm the bluetooth signal and capabilities of a device that was flashed using this guide: https://esphome.io/projects/index.html ?
I used a simple ESP32 WROOM board https://a.co/d/j0mzxMI
Followed the directions and flashed the software on to the device. I plugged it into a wall socket that is relatively centrall located. But I am not smart enough to know how to check the logs/determine if it's actually operating as a bluetooth proxy and helping me to extend my bluetooth range in my house...
How can one test signal? Can I find a way to unplug the proxy, scan for bluetooth somewhere, and then plug the proxy back in and see a noticable "different" strength? I apologize if that's a silly question ad not how Bluetooth works, but I'm just trying to understand if my plugged in proxy is actually doing anything and how best to test. Thanks ahead of time!

Alternately, is there a way people generally check logs to see if a bluetooth proxy can see devices?
i'm tempted to just retry the flashing of the ESP32 and trying again...

devout hearth
#

tbf, I don't remember, but this sounds similar to when I wasn't sure mine was working.

alpine herald
#

Oh man! Thanks! That looks definitely similar to what I'm after, Ill go take a look! Thanks @devout hearth !

foggy violet
#

Hello. I'm trying to setup Xiaomi BT temperature sensors (LYWSD03MMC). I could connect from android app, and see temp, but not from HA. I added devices in HA, but they show only signal str.

fringe field
#

That device is a little bit annoying because it only broadcasts sensor data every 15-20 minutes.

#

And if you do it wrong, you have to wait that whole time to try again.

#

The app uses a different method that uses more battery, which is why it works there

#

First of all, what does the signal strength look like?

#

Have you entered an encryption key yet, and was it accepted?

#

And what Bluetooth dongle do you have?

foggy violet
#

You mentioned key, do i need to reflash it with the pvvx tool?

fringe field
#

No

#

You can use the pvvx tool to generate a key

#

Or there are other methods to leak them from cloud services

foggy violet
#

dongle: edup bt 5.1 B3536(814)

fringe field
#

It looks like that’s a Realtek 8761B

#

Realtek can be quite painful to use for Linux IoT (some models crash every few minutes)

#

Ha does a good job of restarting them when the chip crashes, but it means you might see gaps in your data. And if you have a sensor that doesn’t broadcast often like the one you have, it magnifies the issue

#

I used the pvvx tool to change the firmware on mine, and set the beacon type to BTHome

#

Oh, you won’t get beacons from the device at all while it’s connected to the pvvx tool. So if you used it to get a key and then left the tab open it won’t be broadcasting any data until you close the tab.

#

TL;DR - you won’t see any data until you enter an encryption key. HA will create a repair task if it sees any encrypted packets and doesn’t have a valid key. You’ll be able to enter the key there. If you don’t see that, then HA isn’t seeing broadcasts with data from that device. Make sure your dongle isn’t crap, make sure your signal strength is good - -70 is good, -80 might not cut it for this sensor (but would be fine for BTHome probably) and -90 probably not good enough.

#

Oh and it won’t broadcast data if no key is set at all, so you’ll likely need to make one with pvvx first.

foggy violet
foggy violet
#

I'll try to get new BT adapter. Which chipset/model would you recommend? 2 floor house.

#

and is there difference which bt version? 4/5/5.2?

fringe field
#

Someone has tested a big bunch and written it up

#

CSR and Broadcom chipsets are best

#

You probably aren’t going to get full house coverage

#

But you can get esphome devices to extend the range

#

5 and 5.2 dongles are pointless

#

The Linux drivers don’t really have a userspace interface for any of the new stuff

#

And none of our integrations need 5 specific functionality

foggy violet
#

Ok, thx

spare geyser
#

Is there a reason why some bluetooth locks are instant and others aren't?

#

I just got a Switchbot Lock Pro to replace my Ultraloq U-Bolt Pro. Both only have built in bluetooth, no wifi or anything else.

#

My U-Bolt has always been instant the moment I use the app, fingerprint, or code. The gears turn immediately.

#

The Switchbot Lock Pro always has some delay. Mostly around 2 seconds although it can be near instant or have worse delays sometimes.

fringe field
#

Depends on lots of factors and is not surprising.

#

When we first did naive Linux Bluetooth based HomeKit it took near a minute to establish a connection, but was more like 5 on macOS.

#

It will depend on how many GATT characteristics the device has, how many GATT calls are needed to unlock from a cold start (for homekit it’s 3 or 4 for example), how often the device sends out beacons and when we last saw one (bluez won’t let you connect without a recent beacon). The antennae design can have an impact. Some only work well within half a metre of the vendor app because the power levels are small for security.

#

It’ll typically be much faster if there is an existing gatt connection that is reused, but those tend to time out fast.

#

Using HomeKit as an example again, the connection involves a fair bit of crypto so can be slower if the lock has a weedy chip

spare geyser
#

The more technical stuff you said is over my head, but overall it gives me an idea about why it is this way so thanks.

#

Not sure if this part matters, but it does take longer for the U-Bolt to make that BT connection than the Switchbot.

#

But when it is connected, controls are instant. Even when controlled remotely.

fringe field
#

That fits with all the stuff I said. BLE is pretty quick when you have a GATT connection setup.

#

But they expire in less than a minute for many devices and on top of that only the best dongles can manage even 5 active GATT connections.

#

I think esphome (especially wired) can be faster than Linux here, though I might be misremembering.

#

Wired esphome proxies can certainly outperform Linux

#

And connect times vary enough between dongles that we call it out in docs - one vendor is best for connect times and one is best for simultaneous active connections.

spare geyser
#

I'm already have 4 BT proxies spread around my house. I'd definitely add another one just to have it right beside the lock.

#

Unfortunately the Lock Pro isn't supported yet in the Switchbot BT integration yet. Hopefully it doesn't take too much longer.

low shoal
#

is this were i would ask questions around espresense?

fringe field
#

Not really

formal meteor
#

Hi all, after update to 2024.4, some of my BTHome devices stopped working. They do not report any data to HA (via btproxy). However, some other devices (the exact same model and firmware) keep working flawlessly. I tried a reboot, integration reload, and rebooting the bt proxy but nothing helped. Did anyone alse have the same problem?

desert marsh
#

the switchbot lock pro still not work on home assistant with bluetooth connection?

spare geyser
#

I have the Lock Pro and it's still not supported yet.

desert marsh
#

does it work with the hub mini or just the hub mini 2?

spare geyser
#

If you want it in HA via Matter then you need the Hub 2 or the Hub Mini Matter.

#

I'm using the Hub 2. It works but response can be really bad since my Hub 2 is far away.

desert marsh
#

i will wait for the bluetooth integration on HA

spare geyser
#

Response is pretty good if you have the Switchbot Hub nearby.

#

But yeah it's much more expensive than a esp32.

desert marsh
#

ok, i have the first switchbot hub mini

#

i can use it before the integration on ha

#

the hub mini, the first one

desert marsh
#

nuki 3.0 is better than the switchbot pro?

spare geyser
#

I'm American so we don't have that over here.

#

I'm guessing both work fine though so it's about aesthetics and options.

desert marsh
#

the lock pro is fast opening and closing the door?

spare geyser
#

No, there is a bit of delay. When I unlock with a fingerprint or fob, it normally takes about 2 seconds before the gears start moving.

#

I think it's caused by the wall though since the keypad is detached.

#

I see near instant results when using my phone or the Hub 2 a few feet away inside the house.

desert marsh
#

ok, inside the home when pressing the button to open the door is fast to open the door?

spare geyser
#

It's consistently the fastest way to lock and unlock because it's the only method that's local to the Lock.

#

Every other method uses BT and varies a bit from like 1 to 2.5 seconds.

#

But mostly around 2 seconds when using the keypad from my experience.

#

I like the Lock Pro, but admittedly this is kind of annoying for me since I'm coming from a smart lock that was near instant all the time.

desert marsh
#

2 seconds is fast, i saw a video and i think is fast

spare geyser
#

2 seconds is perfectly fine, it's just that I spent 3 years with a lock that was basically instant.

#

Maybe .5 seconds at most before the gears start turning.

desert marsh
#

compared with nuki, for example, is much more cheaper

#

i will just wait the Bluetooth integration on HA to buy it

spare geyser
#

If you get it, I think you'll like it.

desert marsh
#

thank you for your help

spare geyser
#

No problem 👍

magic oar
#

hi, just wondering what I need to connect Adaprox switchbot/fingerbot directly to HA, I guess through BLE.

spare geyser
#

They make a zigbee version of that fingerbot and it works in HA. It should work better since it's Zigbee, so just get that one instead.

magic oar
#

yeah I'm aware. Just that I have a bunch of these lying around for quite some times (brand new too 😭 ) and I wanna do something to make it worth it

spare geyser
#

It doesn't seem like you can connect them through bluetooth. Sounds like you'll have to buy a gateway, and then it works through the cloud.

#

I hope they release a bluetooth bridge for Tuya devices at some point. They already have a bunch for zigbee devices.

#

I'd buy one since I have a bluetooth doorknob that I'd like to get into HA locally.

magic oar
#

why don't you think it can be connected through bluetooth? I mean gateway is just another bluetooth receiver device, right?

spare geyser
#

I did a quick google search and didn't find any results saying that it can be done.

bitter moat
#

Does anyone know if the hass_nuki_bt integration works with the Nuki smart lock 4.0?

bitter moat
fringe field
#

When it’s not a Realtek dongle the next most common problem is the hypervisor bungling the passthrough. We’ve had people getting a dedicated pci-e usb card to do pci-e passthrough before, because usb passthrough was so unstable. We’ve also had people go bare metal because of it.

#

Also you need to think about range. Can’t say for yours but I know some locks that have an effective range of about 1m for security reasons (and battery reasons).

manic beacon
#

I've been using Shelly Blus as bluetooth proxies for some xiomi sensors which have been working great. However, I recently added an Airthings Wave + and for some reason I can only get HA to pick it up using a bluetooth dongle and not with the Shellys. I'd prefer to use a proxy so I can place the Wave further away from my server. Any ideas?

fringe field
#

Shelly’s are one way

manic beacon
#

How so? Why would airthings need something other than read?

fringe field
# manic beacon How so? Why would airthings need something other than read?

Xiaomi uses Bluetooth advertisements to broadcast sensor data to anything in range. Airthings uses Bluetooth GATT. It is only reading from GATT, but it has to send a command to air things to read a value. Or to subscribe to a value. So it’s not “writing” any values, but it does need to ask the air things questions if that makes sense.

manic beacon
fringe field
#

Or there is a gl.inet board that is better in a few ways but unfortunately you’d need to do some soldering the first time you set it up

#

Other than that I think there are some 3d printer templates for the olimex POE boards 💪

#

Or you might be able to migrate a Shelly to esphome

#

All of my Shelly’s run esphome but I don’t have any esp32 ones so I don’t know what your options are there.

faint agate
#

I've been getting a lot of The proxy/adapter is out of connection slots or the device is no longer reachable errors for my desk light lately but I'm not sure why. I only have one BT device connected to HA (Yellow hardware, external BT adapter). Was working fine for the last 3-4 months since I've installed things. Could it just be new interference or something ?

fringe field
cunning chasm
#

Hey everyone. I have some bluetooth devices (temp sensors) connected to my home assistant but i'm having troubles with them always being not available, no matter how close or far away they are positioned. all of them are unavailable from time to time. Any ideas to help me debugging this?

fringe field
#

e.g. realtek based dongles (and that covers a lot of them) crash every few minutes when doing iot stuff under linux

cunning chasm
#

It's an onboard bluetooth chip (m2)

fringe field
#

HA recovers crashed dongles so it sort of works, but you see gaps in data like you do

cunning chasm
#

Can i increase the recovery speed?

fringe field
#

no

#

theres not a "crashed" event from the dongle

#

its still semi responsive, theres just missing data

#

(my first dongle would still be able to see my TV, in another room, but nothing else, even stuff right next to it)

#

we've had problems with some intel internal cards (linux driver regressions) - i think those should be fixed in HAOS, but if you aren't running HAOS you could hit them still i guess

cunning chasm
#

I'm trying to find out which chip it is right now...

fringe field
#

another common cause of trouble - trying to pass bluetooth from a hypervisor to a vm

#

don't know why but a lot of hypervisors suck at it

cunning chasm
#

intel/ibt-1040-0041.sfi

fringe field
#

passing through the entire pci-e device rather than the usb endpoint is meant to be better, but lots of people go bare metal to fix it.

cunning chasm
fringe field
#

and then my favourite - either the bluetooth antennae is internal or its not actually connected up

#

if its still not fixed after going bare metal and getting a broadcom/csr usb bluetoothh dongle on a long extension cable, then its usually the batteries (a lot of these cheap bluetooth sensors may as well replace their battery sensor with a random number generator)

cunning chasm
#

i don't really want to go bare metal - i could maybe try to forward the pci device instead of usb device? not sure of my hypervisor is capable of that

fringe field
#

well, the people that have done it got a dedicated card

cunning chasm
#

I don't need the card on the host at all

fringe field
#

because you don't want to passthrough the usb that your kb/mouse plugs into etc

cunning chasm
#

it's only for HA

fringe field
#

depending on your board, internal stuff might be plumbed into the same bus

cunning chasm
#

Oh i can't post images in here. it's just a m.2 key-e module on a normal m.2 key-e slot

proven yarrow
#

I've got a generic Nrf52810 BLE tag which I can see in the iBeacon android app. I've installed the iBeacon Tracker integration and added the UUID as allowed. Bluetooth is enabled but yet the BLE tag doesn't show up as a device regardless of what I do. I have restarted HA several times and the tag is right next to it. Any other ideas?

fringe field
proven yarrow
spare geyser
#

So for my Switchbot Lock Pro, I moved the Hub to be within 3 feet of the lock. The weird thing is that I have the most inconsistent lock times when using a NFC tag from HA vs any other method.

#

It's fast most of the time and often nearly instant. But I've also been stuck at the door(and tested it) for 4-5 seconds waiting for it to unlock.

#

I got fed up with it and put a Switchbot NFC tag out there instead. In my testing, that and the keypad is not as fast at their peak speeds, but at least they're consistent(always 1.5-2.5 seconds)

#

Honestly I'm mainly ranting as I don't think there is an answer to this. But if there is, is this more likely a BT issue or Matter? I put it here because I thought it probably had more to do with BT.

fringe field
#

If ha Bluetooth, why proxies or dongle are you using

spare geyser
#

It's the new Lock Pro, no support from the integration yet. So I'm using the Hub Mini Matter to get it into Home Assistant.

fringe field
#

So matter in home assistant to bridge to lock vs what? Native Bluetooth in their app? iOS? Android?

spare geyser
#

The detached BT keypad and my android phone when using the native app.

fringe field
#

Ok, I don’t know enough about those to say anything useful other than to agree that it’s just tough.

#

We know for sure the iOS Bluetooth stack is leagues ahead of Linux for example, and we know that esps port of bluedroid is better than Linux too.

#

There’s so many factors at play here. If it’s running matter on Linux then there’s a fair chance it’s running bluez and because there aren’t many examples of doing Bluetooth on Linux well I’d wager it’s slow naive bluez with the slow dbus broker. I think I’ve said before it took a lot of work to bring our homekit code down from 60s to a few seconds in bluez. And that’s only with replacing system components like the dbus broker. Involves a lot of trickery to get to that speed. Where as the same code on macOS was just fast out of the box.

#

If they are running something embedded like an esp32 for example, it’s common to share the radio between Bluetooth and WiFi. Which is why we encourage proxy users to go Ethernet - it can drop you below Linux speeds otherwise.

spare geyser
#

Okay, thanks for taking the time to explain again. I'm mainly just bummed because I finally have a local control lock inside HA. But using HA to control it is the most inconsistent method.

cunning chasm
#

Hey everyone, are there some basic debugging steps i can take if HAOS does not detect my bluetooth? its a wifi/bt combo, the wifi works perfectly. it's an Intel(R) Wi-Fi 6E AX211 160MHz

fringe field
#

It’s probably a driver/firmware issue. The “dmesg” command will probably give a clue.

cunning chasm
#

I think i might have found the issue.. I passed through the pci device but it seems that the bluetooth part is another device i would need to pass through? could that be correct?

fringe field
#

Yeah

#

It’s quite common for pci-e Bluetooth to actually be usb

#

Btw we get a lot of people reporting issues with usb Bluetooth passthrough on a hypervisor

#

Some people get a dedicated usb pci-e card and pass the entire card through which seems to work better than usb passthrough

cunning chasm
#

Bluetooth: Core ver 2.22
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: BNEP socket layer initialized
Bluetooth: hci0: Reading Intel version command failed (-110)
Bluetooth: hci0: command 0xfc05 tx timeout
hmm

#

I might have a solution but i do not know how to execute root commands with haos :D

rotund sail
#

Please don't share images of text, share text as text

spark cairnBOT
#

Please use a code share site to share code or logs, for example:

Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.

compact eagle
#

Any idea why the Sena UD100-G03 (which is in the supported list for Home Assistant Bluetooth adapters) won't configure properly on Home Assistant OS? OS 12.3, Core 2024.4.3, Supervisor 2024.05.1.

It sits at Initialization for a very long time, and then eventually fails. This same dongle works fine on my HA Core install (within Arch Linux).

Might try upgrading to Core 2024.5.4 (since it's now available) and seeing if it persists.

grizzled wagon
#

Hello ! I would like more information on how I could setup ESPPresence. I currently have an old laptop running promox and virtualized home assistant. This laptop does have a Bluetooth 3.0 I think on it. Sadly I never managed to make it work (I can replace the module inside the laptop). Is a Bluetooth dongle required to make ESPPresence work ? I was thinking the Apollo Air 1 can listen to Bluetooth advert and say "hey I've detected this UUID" at xx m away trough the wifi connection already working.

fringe field
#

Espresence isn’t part of HA and doesn’t directly utilise the Bluetooth APIs in HA so this might not be the best place to get help with it.

#

You also can’t use our own Bluetooth integrations at the same time - an esp can’t be one of their presence nodes and one of our proxy nodes,

#

You don’t need a Bluetooth dongle for that, Shelly’s or some ESPhome devices running as Bluetooth proxies is enough

grizzled wagon
#

Okay this is great information! I'm going to read to see if it match my needs ! Thank you very much !

fringe field
#

If your needs are simple then a built in integration might be enough. For example, iOS devices are compatible with private_ble_device and that will tell you which proxy they are nearest. I use them to arm the alarm when I leave, turn the tv off, etc.

grizzled wagon
#

Yeah thats almost the same thing i want to do 😄

compact eagle
modest ginkgo
#

Is ESpresense still the way to go? I finally have it setup with 3 cheap 32's and I have some m5stamps on the way... But before I go through setting up Companion and the like, is the a better path to take? ESpresense just feels like it's been missing some love and attention for the last year

fringe field
#

If your needs are super simple you might not even needed that. I track iOS devices with private_ble_device (built in to HA) and it tells me which ESPHome proxy I’m nearest to

blissful ether
#

I was trying to do this with ble_rssi sensors in ESPHome but it doesn't currently support irk. It was merged into the dev branch 2 weeks ago but it's unclear how things get put in a release

fringe field
#

If you need irk now can’t you use esphome Bluetooth proxy and then private_ble_device integration that’s built into HA? That’s supported irk for months and months.

#

Then Bermuda supports data from that integration if you need more than what is built in

#

As for esphome, I think it might have moved to a monthly release so I wouldn’t expect something new until June

#

(Other than bug fixes)

blissful ether
small bolt
#

Are there any simple/small/nice looking/can just plug in to an outlet (US) devices that I can make bluetooth proxies without having to pry them open and do more to them?

fringe field
#

It’s like having a mesh vs having lots of standalone hubs

frigid mural
#

Hello!
I bought a Byintek K45 Smart Projector. It works absolutely fine except the fact I don’t know how to connect it to my HA. It has bluetooth remote, so I have two options:

  • Try to sniffing bluetooth package from remote and try to reproduce it
  • Try to disassemble remote and connect button to esp32.
    I don’t really like both of this options, and would like to know if some other solution exists.
faint eagle
#

does it not have IR?

#

or ethernet/wireless?

ionic remnant
#

I am thinking about tracking 6 ble ibeacon tags to monitor the home/away state of 3 cars and 3 garbage bins in my driveway area. Could a single ESP 32 track all 6 tags? What models of iBeacon would you guys recommend?

frigid mural
# faint eagle does it not have IR?

I already bought one additional IR remote, and for some reason it controls only volume up.
It has Wifi onboard, but it works only when device is turned on.

faint eagle
frigid mural
faint eagle
#

Got yA

grizzled shale
#

Hi. I have several Xiaomi devices, including 4 thermometers and 2 cameras. I installed the Xiaomi Miot Auto and HA was able to identify all of the devices. However the thermometer shows "unknown" on the temperature. Has anyone a similar issue?

fringe field
#

I’d doesn’t use the HA Bluetooth infrastructure so I don’t think you’ll find help in this channel

#

This is more for help with integrations like Xiaomi-ble which use your local Bluetooth dongle (or ESPhome Bluetooth proxies)

wicked trout
#

Hi!! I have a question... I´ve installed Home Assistant on a Raspberry Pi 3B+ and I have a temperature sensor from tuya (smart life)... in my mobile app I can see history and temperature/humidity but in HA I can´t see, say "No available"... does Raspberry bluetooth works as tuya gateway?

fringe field
#

I don’t think anyone has made a tuya integration for HA Bluetooth.

#

Also the range on the pi Bluetooth is pretty low even if they did

wicked trout
#

thanks for your reply, then... how people add tuya or smart life devices to HA?

#

you mean Raspberry bluetooth, right?

fringe field
#

Raspberry pi, yes

#

I don’t know about tuyA

#

I know that the regulars here think it’s trash, so I never looked into it

#

I think my heating might be based on rebranded tuya actually but it’s zigbee so that’s no help to you

wicked trout
#

As I read in forums... I need a zigbee USB dongle connected to raspberry to connect tuya and smart life to raspberry... I think raspberry bluetooth is not compatible with tuya

wicked trout
fringe field
wicked trout
#

I´m not sure... I have a wifi switch and a temperature and humidity sensor... I connect them with smart life app in my phone... maybe it´s bluetooth, could be?

fringe field
wicked trout
#

in iot app of tuya... discover my devices but show it´s offline.... but in my mobile app show me temperature and humidity... I´m confused

fringe field
#

I don’t think we can help you in here, unless there is a specific integration you are trying and that integration uses the Ha Bluetooth code directly.

wicked trout
#

I bought it in aliexpress... say bluetooth communication... as I understand, bluetooth and zigbee are different systems, right?

fringe field
#

Very different

wicked trout
#

as I know, first difference is frequency work

#

different frequency

fringe field
wicked trout
#

yes, of course, I don´t post on both, I try as you say, in integrations

#

maybe my device is bluetooth because I linked it to my app phone through bluetooth

#

I can see history and actual reads on my phone

fringe field
#

I generally don’t recommend new Ha users touch custom components, it can be a disappointing experience as they often aren’t kept up to date or do things that make your system slow and unstable. It can be tricky to debug them.

#

Indeed looking at the issue list that one has been broken for a while..

wicked trout
#

yes, you´re right... I was trying to setup some days before , searching in google... with no luck...

#

maybe my devices (aliexpress devices) could be tuya clones... I´m not sure.. but you clear me some doubts... I´m sure that my devices are bluetooth, not zigbee

fringe field
#

Tuya make Bluetooth and zigbee devices so I can’t.

#

If you don’t have a hub or gateway device and your phone can control them, they are Bluetooth and/or WiFi.

wicked trout
#

yes, it´s bluetooth... I search in aliexpress order and say need tuya bluetooth gateway

warm surge
#

Hi, does anyone have it installed or can I help you like Tuya ble, I'm trying to install a fingerbot and it's giving me the error 500 Internal Server Error

shell knoll
#

maybe I should be asking here, are bluetooth proxies able to forward bluetooth commands from HA for an active connection? Working on an integration and have one person (whos working on it with me) able to use a proxy on its own to connect to a device. I however have a yellow and my proxy connects and immediately disconnects after getting the service info which isn't ideal at all

#

I'm using an esp32 vroom as the proxy,

oblique oak
#

The ESPhome Bluetooth proxies support active connections. On a lot of my production systems I don’t have a local Bluetooth adapter and exclusively use the proxies the os level Bluetooth stack is better maintained on the ESP systems

shell knoll
#

The issue I have is my Yellow works fine and can send the required messages using self.client.write_gatt_char(UUID_WRITE_CHARACTERISTIC, data, True) but the proxy does not send through these gatt messages and just disconnects after getting the service info. I can't figure out why

#

if I activate my proxy I can no longer get data from the device. I'm trying to workout if its just a bad esp32 or something I've overlooked in my integration or.... who knows what. Information on how the active connctions work for esphome is very limited.

fringe field
#

Are you testing with the logs for the proxy open? Does it just disconnect? Or does the proxy reboot?

shell knoll
#

yeah I had the logs open, it doesn't reboot.

#

let me go reconnect it again

#

now have it plugged directly into my laptop and have serial port monitor open, so if it does reboot I'll see it

#

it gets to here
ESP_GATTC_NOTIFY_EVT
][esp32_ble_client:084]: [0] [90:38:0C:6E:EE:9E] Disconnecting.
BT_HCI: hci cmd send: disconnect: hdl 0x0, rsn:0x13
BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x16
BT_APPL: gattc_conn_cb: if=4 st=0 id=4 rsn=0x16
BT_APPL: gattc_conn_cb: if=5 st=0 id=5 rsn=0x16
ESP_GATTC_CLOSE_EVT
[0m BT_HCI: hcif disc complete: hdl 0x0, rsn 0x16

shell knoll
#

what controls when it disconnects? perhaps there is a timeout I've set too short?

shell knoll
#

So tested with another esp32 and it also connects but disconnects too early, which leaves the device in HA in an Unknown state

warm surge
#

Hello friends, can anyone help me with tuya ble

shell knoll
#

What's the specific issue?

oblique oak
proud spear
#

have anyone ever used GL-S10 Bluetooth IoT Gateway ?

fringe field
proud spear
wary eagle
#

I have a BT proxy running in my garage and I had to unplug it to move it and now it is showing all the BT entities as unavailable. Any thoughts on my next move?

amber nexus
#

When I open my logbook I have this literally non stop logging of this alert

ble mac 12EF29EAA98E5BFAAC2B7EC87F63F258 changed to AC:4D:16:08:BE:EE
12:02:24 PM - 3 seconds ago

repeat several thousand times, still ongoing, different addresses

Quite literally thousands of these, and it won't stop, 3-5 happen every second. What's going on? I have no idea when this started I just opened my logbook and saw this happening and it's making it difficult to see just about anything in the logs.

I was fiddling around with the bluetooth settings, as I'm trying to pair a new bluetooth sensor, but I have never encountered this.

#

this stays the same ble mac 12EF29EAA98E5BFAAC2B7EC87F63F258

but the portion after "changed to" keeps changing to random addresses

fringe field
#

(and can you "ping" it from another device on your network)

wary eagle
#

No xiaomi. Proxy is showing as "away" not sure about ping ill have to check

fringe field
#

proxy shouldn't show as away, that sounds like a device tracker, i think we must mean different things. can you post a screenshot?

wary eagle
#

Ugh my phone is not letting me share a screenshot. I'll upload one when I get home.

fringe field
wary eagle
#

👍

wary eagle
wary eagle
#

I just gave up on troubleshooting and reconfiged it

shell knoll
amber nexus
copper kelp
#

Anyone have any tips for connecting to ESpresnse from a Pixel phone? I have BLE transmitting in the app, and I can't see it on the Fingerprints tab

shell knoll
#

If its esphome based it connects to ha via websockets/http

shell knoll
copper kelp
feral portal
timber vapor
#

Can anyone tell me what is the correct way to increase the update interval for a sensor, when using esphome bluetooth proxy? It currently seems to update once a minute. I'd like to have it update every 30 seconds or maybe even less. I searched online and the recommendation was to use an automation to update the entity. That didn't work for me. I looked into the interval settings but that doesn't seem like it should be changed, since the defaults are 1100 seconds. I tried searching the discord but didn't have any luck. I am sure its just something simple I am overlooking.

fringe field
#

Update interval is more for things that scan or poll

timber vapor
#

okay thanks, also I am using iBeacon but I am wondering if its not maintained, should I switch to bermuda or bluetooth le trackers?

fringe field
#

Most of the Bluetooth sensors are passive listeners and so see every radio packet

#

Some of my inkbirds update even more frequently than that

timber vapor
#

so that 1 minute interval is likely from the sensor broadcast? and not the bluetooth proxy reporting?

fringe field
#

Yes

#

Ibeacon is maintained by one of the most prolific maintainers in ha. It is definitely maintained more than the ble tracker integration

timber vapor
#

okay so I can stick with ibeacon, good to know

primal frost
#

Any way to get that into home assistant? Are these moddable to esp with a chip?

#

They're tuya Bluetooth

faint eagle
#

Maybe tuya cloud cutter supports it

regal mango
#

I have sniffed a few Bluetooth commands and extracted the parts that I need what is the easiest way to send this trough home assistant

fringe field
#

You need to write an integration that uses the bleak python library

mossy silo
#

After upgrading to 2024.6.0 I get this error in my custom component: TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2 Never had issue before. repo: https://github.com/jdeath/renpho

fringe field
#

You’ll need to report that to the custom component

small surge
#

Was there a way to hook ultraloq Bluetooth version to HA (or with the wifi bridge)?

mossy silo
#

Figured it out. Line PassiveBluetoothDataProcessor[Optional[Union[float, int]]] needs to change to PassiveBluetoothDataProcessor[str | int | None, SensorUpdate] . Not sure why there was not a note in the "Backward-incompatible changes" section that a function defination changed. Working correctly now and integration reads the BLE data. Found it in the oral-b integration, which I based mine on years ago.

spare geyser
#

Still requires the cloud obviously. Unless you have the Z Wave version, I think that's the best you can do.

stoic stag
#

So.. have kind of a bluetooth/homekit/homebridge question

#

I got an Aqara U100 lock, and so far i really like it. No interest in their hub but I am interested in the homekit homekey stuff. I have AppleTV and i also have my HA setup with home bridge. The bluetooth proxy of HA discovered the U100 and I set it up there as a homekit device...

I've seen people say it can't be added to homekit directly... But I have through the homekit integration... My Apple Home is all from Home Assistant...

That being said, I never see the lock appear in the HomeKit side of the house, but it's in HA and works and responds just fine...

stoic stag
fringe field
# stoic stag I got an Aqara U100 lock, and so far i really like it. No interest in their hub ...

HA supports some homekit locks directly. Which ones is hard to say, as some like to layer additional key material on top of the homekit protocol. They can be supported over Bluetooth and Thread, and I guess over WiFi but we’ve never seen that afaik. The key material is only needed for unlocking (you can still see the lock in Ha and trigger automations with it if you don’t have the key material). The keys come from vendor apps and the process is undocumented - the locks that don’t work now will probably never work.

#

We don’t support homekey at all, and I think that’s also unlikely to change.

stoic stag
#

It's a damn shame. It worked great direct to HA. Super fast, super responsive... Just no homekey. :/

#

But hey, can't have it all. 🙂

fringe field
#

The homekit protocol only supports one device at a time, so we’d have to mitm a key exchange process to support it, and it involves 2 different integrations being tightly integrated in ways that would violate HAs coding standards

#

Hopefully there will be an equivalent feature over matter eventually

stoic stag
#

Now I'm just trying to figure out how to get the lock to show up in HA from HomeKit... It's the same house in homekit, i just addded it from the phone instead of from HA.

#

The market is in dire need of a good smart lock, i don't know why it's so hard.

#

the homekey stuff though, oh it's so good.

#

at least, it is so far with this lock.

fringe field
#

Have you got both homekit integrations configured?

stoic stag
#

Yeah. HomeKit and Home Bridge, right?

fringe field
#

No

stoic stag
#

oh, maybe not then

fringe field
#

Homebridge is a third party thing

stoic stag
#

i dont, just homebridge it seems. oh, so my house is running on homebridge.

fringe field
#

Homekit device and homekit (it is sometimes called homekit bridge)

stoic stag
#

sorry, homekit bridge

#

is what i have

fringe field
#

The 2nd one makes ha export your ha entities iOS

stoic stag
#

yeah homekit bridge is poppijng all my HA stuff into homekit. this lock is the first thing that I've added from the iOS side. still same homekit home.

#

HomeKit device is where the lock first appeared, and I set it up there but it was never visible on the Apple side and HomeKey didn't work. But I could do everything from HA.

#

the only thing i see in homekit device is a bunch of cameras I have, but already have setup through a different route, and my lutron which is also setup through HA natively.

#

feels funny that the main hub...which should be HA...can't see it

#

I have an apple tv and an ipad that could be "taking over" hoekit is kind of a mystery to me.

#

none of it may be working the way i thnk it is

fringe field
#

If you connect your lock over Bluetooth to Ha via HomeKit then no, your Apple TV and iPad are not involved

stoic stag
#

right, which i could definitely tell i did that the first time

fringe field
#

It’s probably just that your homekit bridge integration has filters

#

Mine only exports bulbs for example

stoic stag
#

i threw a bluetooth proxy in the garage half hoping it would just "figure it out" 🙂

#

yeah I did check to make sure lock was there for exporting, but i don't have anything else I've added from the Apple side to know if it's a "two-way street"

fringe field
#

If you click on configure you should be able to see which entity types are included and excluded and which entities are included and excluded. The stack is weird though. So I have thought I’d enabled stuff in the past but I hadn’t

#

You shouldn’t need to, but it’d be worth restarting HA after checking that

#

Oh and locks might need a dedicated bridge I guess

stoic stag
#

yeah. everything that's currently in homekit is provided by HA with the exception of my Ring Alarm and now the U100 Lock.

fringe field
#

Some device types can’t be on a bridge

#

I forget which. I know tvs are on that list

#

So you make a 2nd instance of the HomeKit bridge integration and put it in accessory mode

stoic stag
#

Ah ok. well, it's working in the best place for it now. would be nice to see it in HA but I'll get by... i just want it all! 🙂

sharp fern
fringe field
#

On some systems it’s under /run and some it’s under /var/run, and theres always a symlink from the wrong one to the right one

#

It looks like I use /var/run/dbus:/var/run/dbus

#

If you search /var/run/dbus in this channel you’ll see it comes up every few months. Sometimes it’s more than just that, but it’s usually not.

#

Looks like you are using docker run directly? (You mentioned -v). Don’t. Use a compose file.

#

Make sure you’ve also replaced the dbus broker like in the docs and that your bluez is as new as possible (using an old version of Debian on an odd sbc is a surprisingly common problem in here)

#

And the other common problem - make sure your Bluetooth dongle isn’t using a Realtek chip.

#

(Won’t cause your current error, I’m preempting the next error)

agile kernel
#

hi, I'm trying to use the BLE proxy to connected a BLE-YVC01 device. problem the ble proxy seems to be not as stable as I want. I'm using this :
packages: esphome.bluetooth-proxy: github://esphome/firmware/bluetooth-proxy/esp32-generic.yaml@main
Is there other way to create the BLE proxy with more stable connection to device ?

sharp fern
# fringe field Make sure you’ve also replaced the dbus broker like in the docs and that your bl...

Hi Jc2k, thx for advice. I'm new to all this. which docs are you referring to? also in the pi gui i used the BT icon to connect my mouse since my mouse is bt .so is that relevant? I did confirm that your path to dbus is where mine is too. the command that I used to run is: docker run -d --name homeassistant --privileged --restart=unless-stopped -e TZ=Canada/Eastern -v /home/pi/hass:/config --network=host ghcr.io/home-assistant/home-assistant:stable ....should I update the yaml.configuration file and if so how? thx again

fringe field
#

But as a rule you shouldn’t be using docker run to run important things

#

You might be better off with HAOS as a lot of the hard stuff is taken care of for you

#

The built in raspberry pi Bluetooth is a bit problematic. IoT can be more demanding than a mouse.

#

We see a lot of users in here crashing their Bluetooth chip

#

And because it’s not connected by usb you have to cut the power to bring it back online

sharp fern
fringe field
sharp fern
#

are you running in HAOS or docker container?

fringe field
#

(In terms of future proofing it’s the same with matter and thread btw - that stuff requires kernel patches and meddling with your sysctl settings. So again, strongly recommend haos there)

#

Neither

#

And I spend a lot of time compiling kernels and debugging weird shit because of it

#

I have the same excuse as you (don’t want to dedicate a machine) but I really wish I could just run haos 🤪

#

I actually don’t run a bluez based Bluetooth dongle anymore though

#

I have 4 or 5 esphome Bluetooth gateways scattered round the house

crimson vessel
#

Has anyone had issues in locating the Bluetooth ID for a Samsung device before? I'm trying to setup the bluetooth-based presence dashboard control with the ESP32-WROOM devices but I keep getting a random collection of Mac's all labelled Samsung and none match the MAC in the phone information!

#

I looked for Mac Address randomization as well but could not find anything on it for Bluetooth!

fringe field
#

Too easy to track you wherever you go otherwise

#

If you are using built in homeassistant and esphome features like Bluetooth proxies you probably want the iBeacon app integration

#

Private_ble_device would be better, but we don’t have a way to get the IRK for Android yet.

molten thorn
#

Hello Everyone
I'm trying to set up Bluetooth on a docker installation without any luck.
I added dbus to the container volumes but I get an error in the Bluetooth integration. Can anyone help me with this?

volumes:
- type: bind
source: /run/dbus
target: /run/dbus:ro

I get this error in HomeAssistant:
hci1 (DC:A6:32:7D:98:43): hci1 (DC:A6:32:7D:98:43): DBus service not found; docker config may be missing -v /run/dbus:/run/dbus:ro: {ex}

raw birch
#

Hello, I am trying to set up a bluetooth speaker on my home assistant, and I am using guides online. bluetoothctl wont discover my speaker, but my PC and phone can. What could be causing that? Thank you!
using HAOS

bronze citrus
#

I had a dozen or so of the Xiaomi hygrometers and flashed them all to allow BLE. I installed the passive BLE monitor from HACS and it all seemed to work. I placed them around my house but realized that HA couldn't read the more remote ones and eventually were "kicked off" for being inactive too long. I then set up a Bluetooth Proxy with ESPHome and all of a sudden these flashed devices are showing up in my Xiaomi BLE integration.

#

So now of the 12 devices (all flashed at the same time with the same custom firmware), 9 of them show up in the Passive BLE Monitor and 3 of them (in range of the proxy) show up in the Xiaomi BLE integration. I have no idea why they are behaving differently and also not really sure which of the two is better

fringe field
#

its maintainer actually maintains the Xiaomi BLE integration too.

#

because it bypasses BlueZ, passive ble monitor can be better if you have a really crap bluetooth dongle. but in every other way, the integration that is baked in to HA is seen as the future

#

your problems could indicate that the 2 integrations are fighting over your main bluetooth (in which case removing the custom integration and maybe restarting the entire machine to be sure) should fix it.

#

or your dongle is incompatible with bluez or unstable under bluez (realtek are especially prone to sucking at IoT on linux)

#

removing the custom integration and then getting more esphomes is probably the best outcome

bronze citrus
#

Thanks for the background information, that's very interesting

#

I think I'm actually using a native bluetooth radio and no dongle in this setup. So maybe I don't need the passive BLE integration at all anymore...

fossil viper
#

I keep getting spammed with this in my terminal even though I disabled bluetooth both in the VMware, and in windows:

#

Any suggestions? (Feel free to @ me)

fringe field
fringe field
# fossil viper Any suggestions? (Feel free to @ me)

The linux kernel will only have an hci0 to be spammy about if its found a bluetooth radio connected to your system. So my hunch would be VMWare is to blame here, and its passing bluetooth through even though you've tried to turn it off. there isn't really anything we can do on the HA side if thats the case.

#

Assuming you rebooted the VM after turning bluetooth off, and vmware hasn't turned it back on, then you are probably going to have to ask somewhere more vmware-y

azure crag
#

Hello ! can someone help me setup my docker so I can access my RPI3B bluetooth please ? It seems I have a DBus error and even with the services working, I can't get it to work

#

please ?

faint dawn
#

Hey, I can't seem to get my Bluetooth to initialize.
Anyone seem to know the issue?

fringe field
#

We’d need to see a screenshot of the error or logs to be able to help, plus more information on your setup. Haos? What Bluetooth dongle? Any proxies?

#

But if it’s HAOS, it probably means your Bluetooth doesn’t work under Linux (either at all or not very well). But without more information that’s a guess.

faint dawn
fringe field
#

And you’ve followed the instructions about giving the container access to bluez/dbus on the host system?

#

And replaced the dbus broker?

faint dawn
faint dawn
fringe field
#

Did you bind mount /run/dbus or /var/run/dbus

faint dawn
#

Ok right as I logged in, I get thrown a
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

faint dawn
fringe field
#

Make sure you read the help for the Bluetooth integration

crimson vessel
#

Any trick to getting Home Assitant to update a sensor status based on the BLE location using ESPresense? I've confirmed that the ESPresence sees the device but it's not updating the sensor. Automation to do so isn't even firing :/

fringe field
#

Sorry can only help you with the Bluetooth that’s built into HA

#

Bonus, those esp32s are normal ha Bluetooth proxies with that setup so you can pick up sensors with them

crimson vessel
#

so the sensors are in place and when i walk around with my phone and tablet, i see each one picking my phone up as I enter the room. Confident in their calibration/configuration there.

#

But the actual device tracker bit - it's not picking it up. So it's more of an automation issue i'd think then a bluetooth/espresence issue. Perhaps I'm wrong but i've been knocking my head against this problem for so long lol

fringe field
#

Unfortunately espresence doesn’t use the Bluetooth subsystem in HA so not much we can do

#

I think the data comes in via #mqtt?

#

Dunno what the best channel for that is

crimson vessel
#

ya it does come in via mqtt

faint dawn
fringe field
#

Why do you want to do that?

faint dawn
fringe field
#

And I still haven’t seen the actual error you have

faint dawn
#

Ok, after grabbing the tooltip from the Failed Setup, I see
hci0 (MAC): hci0 (MAC): Failed to start Bluetooth: passive scanning on Linux requires BlueZ >= 5.55 with --experimental enabled and Linux kernel >= 5.10; Try power cycling the Bluetooth hardware.

fringe field
#

And you’ve turned off passive scanning now? (It’s a setting on the Bluetooth integration, think there’s a dialog box pops up when you click configure?)

faint dawn
#

I don't have the ability to configure it.

fringe field
#

It defaults to active so if there’s no option you can configure it shouldn’t be passive related.

#

Right back to my initial list of questions.

#

What Bluetooth dongle?

faint dawn
#

2017 HP Stream

fringe field
#

What chipset is that?

#

Intel?

faint dawn
#

MediaTek is what I saw.

fringe field
#

Oh geez

#

Well they aren’t on our list of tested devices and I know that they are horrific at working with upstream for their socs so I’m not hopeful for you

faint dawn
#

So I should buy a USB one?

fringe field
#

Or get some esp32s

faint dawn
#

Maybe add a Bluetooth node inside the keypad design.

fringe field
#

If you want something with a good antennae, a case, and POE the gl.inet one is a good option. Needs a header soldering to flash it with ESPHome but sounds like that would be no bother for you.

faint dawn
#

I'm yet to train on that.

fringe field
#

(Using Ethernet means more airtime for Bluetooth - the esp uses one radio for both wifi and Bluetooth, so Ethernet means it doesn’t have to share with WiFi)

faint dawn
#

Helps a little that I'm also adding in PoE cameras.

azure crag
fringe field
#

And you know that the internal radios on the pi have poor range and if the chips crash there is nothing HA can do - you need to do a power cycle

fringe field
#

(If you tick all the above, then we need the exact error to be able to help)

azure crag
manic turret
#

Hello, I would like your help to know how I can get the info of this product: https://amzn.eu/d/9SxZv7x, It’s ble and I don’t have thread and I don’t know if I ll start a thread mesh (I already got a full zigbee home).

fringe field
#

hi! that definitely works with HA via the HomeKit Device integration (prviously known as homekit_controller)

#

you need a bluetooth usb dongle or if its more than a few metres away you'll need a esphome bluetooth proxy

manic turret
#

my NAS is located at 5m from the device and a door between.
I got a esp32 not too far but I m not sure if the bluetooth proxy firmware is installed. I don’t know how to find it without manipulating it, it’s a handmade produt I bought.

fringe field
#

its unlikely it does then, its something that you have to explicitly enable in your esphome config

manic turret
#

Do you know a bluetooth antenna with a big range ?

old stone
#

im having an issue discovering devices using bluetooth proxy

#

the ikea desk is in bluetooth mode, and i setup a fresh esp32 as a bluettoth proxy

#

but i cant seem to connect / see it

#

any help would be really appreciated

fringe field
old stone
fringe field
#

So if you get a diagnostic download for the proxy in Ha it should contain a list of all the MAC addresses the proxy can see

#

We need to check if your desk is in there, if it’s not then there’s a problem with either the proxy, the desk, or they are too far apart.

#

If it is there, then it’s more likely a problem with the integration. Maybe your specific desk has different firmware or something.

old stone
#

The desk mac I'd does show up in the bluetooth proxy list

#

But won't pop up in HA as a device to add in

#

I've tried everything I could think of (restarting HA, adding a new esphome proxy, turning off and on the desk), but to no avail

old stone
#

Is there anyway I can furthwr disagnose this issue at my end ?

#

I'm not sure where to start on this

#

Any guidance would be highly appreciated

woven carbon
#

Hey folks, I have small problem. I have a Victron Smart Solar Controller which is smack bang in the middle of Australia, It looks after solar/battery etc for a Starlink connection. Problem is, when the installer was there, he put the wrong settings into the charge controller.. Now I have an ESP32 WROOM sitting beside it listening to the BLE broadcast and reporting back to HA ... But I'm trying to find a way to connect to the Victron bluetooth with the app on my phone where I am, about 1500km away... Is there a way I can use a couple of ESP32s I think the one there is an S3, as a bridge?

late quartz
#

i have been looking for ages now can can't find anything simple that lets me use my Raspberry pis built in bt to detect if my watch or an airtag is in the same room as it. i tried the ibeacon plugin but that never worked

fringe field
#

there isn't anything simple

#

the airtag is using the find my network, which uses random BLE addresses and public key encryption so that only your apple devices can see where it has been

#

your watch, if you are using airtag's i guess its an apple watch. again, random BLE addresses. one half is entirely random, the other half is what you get if you encrypt the first half with a private key. it's a pain to get that key most of the time. if you have a macbook you might be able to dump the key for it. if you can, https://www.home-assistant.io/integrations/private_ble_device will work

late quartz
#

Moving away from apple so airtags are pretty useless and thought i could get some use out of them with ha

fringe field
#

IBeacon is probably the right direction but you need an additional app on the target device to be constantly running in the background so not something that’s very nice..

late quartz
#

Ah oof that will probably drain the battery I guess I may as well just buy one of those cheap ones of aliexpress

#

Thank you for your help

loud sapphire
#

Does anyone know where I can override the default aioshelly BLE script 2.0 HA installs on shelly plugs with a custom one?

analog torrent
#

Hello :) i seam to have missed something when creating a bluetooth proxy using esphome and a esp32.
The device listed in the esphome integration, but not in the blutooth one, and since i disabled the hardware bluetooth of the ha box, i nolonger get any update.

Is there something i missed ?

#

device information does show bluetooth-proxy by esphome, but only have a firmware and safe boot entity

fringe field
#

The Bluetooth “integration” just provides support for usb/internal Bluetooth radios. Under the hood it plugs into the same shared code as esphome. I wouldn’t expect to see anything under the Bluetooth integration.

#

If you have something that is well supported like a Xiaomi or inkbird sensor for example, it would pop up as a discovery under its own integration.

#

With its own branding (logo)

#

There are some integrations (like for tracking phones) that require a bit more setup, it depends what you are trying to do.

#

But generally each type of device has its own integration, in addition to any esphome or Bluetooth integrations

analog torrent
#

sadly i already have all my integration and device set up, nothing new.
What is the event i should listen to in order to see if the device pic up anything ?

#

maybe i have a bad bluetooth thingy on the device 🤔

fringe field
#

Depends on the integrations you have set up, my inkbirds send a lot of data so it would be obvious if things weren’t working

#

Same for my plant sensors

analog torrent
#

i mostly have xiaomy temp sensor, so they should have updated

fringe field
#

Right so that integration doesn’t persist over a restart

#

So restart ha and see if you get data still

#

Or if they stay unavailable

analog torrent
#

i've turned back on the on device bluetooth right now to bring back the data, but yea i can do this :)

fringe field
#

You can also look at MAC addresses in the ESPHome diagnostic data to see what it can see

analog torrent
fringe field
#

No diagnostic data is something devs use to understand bugs, there’s no docs on what it means for the users because it’s so advanced and also so variable between releases

#

But you can see MAC addresses if it’s working

#

Some of the default Xiaomi broadcasts are fairly slow. I think the temp sensors I have only update every 20 minutes

#

So sometimes you just need to wait

#

I can’t wait so I flashed mine with alternative firmware 😅

analog torrent
#

sorry, my work laptop jus failed on me

analog torrent
rigid isle
#

Do I have to do anything for ESP32 BT Proxy to act like a mesh, or do I just enable proxy on the devices I want, and it will handle which one to pick it up?

fringe field
vocal vessel
#

I hope this is the right section to ask, but is there a way to add and control mohuanled Bluetooth rgb led lights to home assistant?

lean crag
#

Can anyone give me a hint why HA would fail to pick up my switchbot door sensors? Is there some undocumented trick to get them to show up? I've got all the temperature sensors showing up but not the door contacts.

keen wigeon
#

Hey folks!

I've been going down the rabbit hole of Bluetooth sniffing and learning a bit about it. I've successfully managed to take some cheap devices I had and make them do things by pushing data with an app. How cool!

The big challenge though is the LCI OneControl system I have in my RV. It would be the Holy Grail for my HA install there. That controls lights, water pump, water heater, monitors tanks, you name it. It works via Bluetooth and uses a crummy unreliable app with 1 star. There IS some work done by others to integrate LCI OneControl using Node Red via the optional "connect anywhere" package, which connects the CANBUS system to a network, but my RV is not equipped with that and the hardware is several hundred dollars. (I'd just as soon rip it all out and switch to an ESP32 powered relay board if that were the case.)

I'm able to see, using the various apps, that there is BLE traffic coming from the LCI OneControl system. However, I'm unable to 'connect' or send any data. There's also a connect/pairing button on the control panel itself.

Can someone point me in the direct direction? Is this a security feature that is going to make spoofing the commands in Home Assistant not possible? Could it be possibly using Bluetooth Classic as well as BLE and; if so, wouldn't that mean I'm just out of luck? (I understand that it's not practical to do the same sort of sniffing and spoofing that's possible with BLE, using inexpensive commodity hardware, correct?)

Thanks in advance!

#

As an add to the above; Home Assistants "BLE Monitor" integration detects the LCI OneControl unit and appends a BLE prefix to the MAC address, which I believe indicates it agrees that it is sending at least some BLE traffic. I'm showing my ignorance here in not knowing what the 'connect' button does (other than how it interacts with the app; being necessary to pair the unit once in the app) or how that affects or hinders my efforts to have OneControl control that system.

keen burrow
# keen wigeon Hey folks! I've been going down the rabbit hole of Bluetooth sniffing and learn...

Hi John - if you haven't already, step number one would be to get set up with a nrf ble sniffer (https://www.nordicsemi.com/Products/Development-hardware/nRF52840-Dongle), and get that working with wireshark. Then you can do a trace of the app talking to the system.
There are a few different ways that a vendor might choose to secure the connection between the app and the system (if at all), and sniffing the conversation should reveal what the next steps are.
I did exactly this to integrate my pool system controller into HA.

keen burrow
#

Hi #bluetooth-archived - I'm looking for a steer in the right direction.
I'm trying to work out how best to structure a new BLE custom integration (https://community.home-assistant.io/t/custom-component-nissan-leaf-via-lelink-2-elm327-ble/561961).
In particular, I am grappling with how to properly manage sparse availability of the remote BLE device.

The scenario:

  • The remote BLE device is a car that is only occasionally available (when powered on, and in the driveway).
  • There is no data in the GATT advertisements - it is necessary to connect and request stuff.
  • When the BLE device is in range, I want the component to poll for updates.
  • When the BLE device is out of range, I want the component to chill out and wait for the next chance to connect.

Given that there is no data in the advertisements, does that mean I should use a DataUpdateCoordinator, and manage all the connection logic and polling in there?
Does anyone know of an existing integration that more-or-less solves the same problem that I can leverage?

keen wigeon
proud spear
#

I'm curious on what Bluetooth devices do you add to HA? I am also curious if you still have to use app to connect to devices or can it be done with HA itself?

keen wigeon
# proud spear I'm curious on what Bluetooth devices do you add to HA? I am also curious if you...

Anything that uses Bluetooth and has a compatible integration in home assistant will work. I have some Bluetooth temp sensors in my install, for example. The machine running home assistant needs to support Bluetooth Low Energy. If it doesn’t, using a dongle or an ESP32 works.

No; you don’t need to use the app anymore. In fact that’s the whole reason I setup HA in my RV. I had 9 different apps for various systems / monitoring / etc. Other than a couple of stragglers I’m still trying to integrate; everything is in HA now instead of having to find their specific app.

proud spear
#

Perfect! I think im beginning to understand.

spare geyser
#

About ESP32 BT Proxies. I have 4 of them and two of them switch between the unavailable and unknown several times per day.

#

The other two show no activity at all. Does that mean two are working properly and the other two aren't?

lean crag
#

Hey all, is there some way to run a scaled-down version of ha on a device to extend bluetooth range?

#

As far as I can tell, there is no such thing as a standalone bluetooth range extender.

azure escarp
#

Your best bet is going to be an amazing esphome Bluetooth proxy

lean crag
#

Does that only work with other esphome devices or with any device using bluetooth?

azure escarp
#

Should work with any bt device if I remember correctly

lean crag
#

Well, I was going to look into ESPhome anyways. One more reason to do it now.

#

Thanks for the hint.

fringe field
#

It’s not an extender or repeater as such, so you don’t need a Bluetooth dongle for HA.

#

And some people get caught out by this: ESPhome can directly talk to some Bluetooth devices by itself. You don’t need that. If there is an integration in HA for a device, do not try to configure it directly in your ESPhome config.

lean crag
#

so it has to be placed where ethernet is, which is at the edges of the house.

fringe field
#

Yeah, esphome can help with that. It’s just important to know that it’s not extending the range of your existing Bluetooth. It’s like having an entirely different Bluetooth dongle that’s connected over WiFi, not usb etc.

#

Some people miss the distinction and then worry that their normal Bluetooth dongle is unstable, when you don’t need one to begin with

lean crag
#

Good point well made. So long as it gets status updates from my outlying sensors into ha, I won't dabble in how it does it.

#

(frankly, bluetooth waws once intended for printers and headphones and stuff. What we do with it today is pure adulteration. It was never intended as a network replacement)

fringe field
#

Obviously technically the dire warnings apply to anything on WiFi. WiFi Bluetooth proxies are less good than Ethernet ones. So the community would ideally have you run Ethernet round your house and replaster.

#

Esp only had one radio so we switch between wifi and Bluetooth quickly

#

Works fine in general for me it’s just theoretically not as good as it could be

lean crag
fringe field
#

Same

lean crag
#

How do you feel about remote home assistant from hacs?

fringe field
#

I try to avoid custom components, they are less reviewed and make monthly upgrades less safe.

#

If I had a remote home assistant I’d connect to it over HomeKit because it’s built in

#

(Bridge on one side, controller on the other)

lean crag
fringe field
#

But it is the reason that Ethernet proxies are better

#

Like I saying practice it’s fine

keen wigeon
# spare geyser The other two show no activity at all. Does that mean two are working properly a...

Possibly. But are they far from your WiFi router? ESP32’s aren’t great at WiFi range, especially when they’re simultaneously using Bluetooth.

If your WiFi router supports mesh networking, consider adding a mesh device between the router and where your ESP32’s are.

It’s POSSIBLE they aren’t working. Check the logs. It’s also very possible they’re just dropping off the network.

If running Ethernet is an option, you can consider an Ethernet ESP32 device instead of WiFi.

dry bridge
#

Anyone know of a Bluetooth Hub that is also a speaker that can control locks and other devices that work with bluetooth, and can connect to HA and be used as a speaker for HA?

I know there is some that also has zigbee, but I want one that has a HA compatible speaker. 🤔

fringe field
#

I don’t think such a thing exists. At least not unless you restrict “locks and other devices” to a single company

#

The problem is there isn’t really a shared standard for Bluetooth IoT. So any such hub would be limited to a vendors own products or something like HomeKit. And the only Bluetooth range extender I know for f for HomeKit is eve extend which is obsolete and doesn’t have a speaker.

#

Matter nearly fixed this but i don’t think they are going ahead with matter over Bluetooth now

#

If you restrict it to a single company the Xiaomi or tuya or someone might have had a hub but I’ve not seen one with a speaker

#

But it isn’t the native Bluetooth that works with HA

spare geyser
#

As for checking the logs. I'm a non technical user and have no idea what I'm looking at. I did do it anyways and yep, I don't know what any of that means lol.

#

At the very least I know some of them are working because all my Switchbot Bluetooth devices are being controlled with short wait times.

#

I was just curious if something was wrong with some of them since I'm seeing different things in the logbook.

fringe field
#

if you are using your own own yaml, and not one of the "ready made projects", its critical you use esp-idf and not arduino mode. arduino mode can be crashy for bluetooth because of the memory resources it uses on the ESP chip.

#

its also important not to mess with the scan interval and window parameters

#

also some particular ESP's are just bad at wifi

#

i have some that no longer work with Unifi hotspots at all

spare geyser
#

All 4 of mine are "ready made projects". And though 2 of them often go unavailable, they change to unknown immediately afterwards.

fringe field
#

are all 4 the exact same board?

#

and have you tried swapping them? does a "bad" one become a "good" one if swapped with a "good" one and vice versa?

spare geyser
#

Yeah I bought it from the same place on Amazon. But no I haven't tried swapping them. But I'll test that later.

fringe field
#

A Bluetooth and zigbee hub that only works with one vendors (tuya) products and doesn’t have a speaker.

spark cairnBOT
#

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

wooden vigil
#

I have above message error when trying to integrate my led ble

#

Device name is MELK-OA10 99 (4499) - a ledbar from China

lean crag
#

Hey all, I've got some trouble getting esphome bluetooth proxy to work.

#

Here's my config:

spark cairnBOT
#

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

lean crag
#

It does show up as esphome device, but it doesn't show up as bluetooth proxy.

#

The only way I ever managed to get one to show up as bluetooth proxy was to flash it directly via the esphome website

#

What am I doing wrong here?

fringe field
#

What are you looking for to know it’s a Bluetooth proxy?

lean crag
#

@fringe field I did get it working in the end, but I still find it very strange. Given that I have managed (don't ask me how) to get two of them working and adopted, their respective yaml in esphome looks EXTREMELY different

#

Here's the other one:

spark cairnBOT
#

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

karmic panther
#

What is the recommended ESP32 board for use as a Bluetooth HomeKit proxy?

#

Just needs to sit behind a shelf next to a Level Bolt

#

Would be cool if there was some really slim smart plug or something that could be repurposed easily, so that it doesn't have to be hanging of a USB brick

#

but having a hard time finding ones that are esp32 as opposed to 8266

cyan ember
#

Hi! I have a ble temp & humidity sensor, it's tuya. I have bought a bluetooth usb adapter for the HA host pc. Tried to add it manually, but got an unkown error. Is it even possible?

fringe field
cyan ember
#

by "it" i mean the sensor

cyan ember
#

new issue, it found some things, but after trying to set them up i get "Device is not registered in Tuya cloud"

dry bridge
lean crag
#

Hey all, I'm using esphome bluetooth proxies to connect some xiaomi ble sensors. These sensors periodically seem to go offline. The bt proxies show online in the web ui, but when I power cycle them, the sensors come back. The logs of the bt proxies look normal to my layman eyes, no warnings, no errors. Is there anything I can do to debug this issue?

#

btw, I've got one in the situation right now, so if there's anything I can do...

compact prairie
fringe field
compact prairie
fringe field
#

They weren’t sure it was even possible when we first talked about what we could do with esphome, it wasn’t there in the initial Bluetooth release and the docs say

#

Shelly generation 2 and 3 devices not battery-powered can act as a Bluetooth proxy for advertisements. Active or passive listening can be enabled in the options flow.

#

You probably are thinking of active listening, which is where your Shelly broadcasts a beacon asking all nearby devices to broadcast beacons.

gleaming wraith
#

Hello everyone. I have a BLE enabled home inverter UPS, which communicates data to the android app and shares info like AC status, battery %ge, current load, voltage, past 7 day stats etc. How to extract these stats using a raspberry pi zero 2w by polling every x seconds and feed it into home assistant using MQTT?

The android app is proprietary and non-open-source. I decoded the apk using IntelliJ Idea to check the source code, but couldn't make any sense out of it, since I don't have any dev knowledge on Android development. I checked with the support team and the app developer team, whether they have exposed any API to access it, to which they denied.
I captured the BLE packets from my phone and opened the dump in Wireshark, I can see the packets being sent/received to/from the device, but don't know which attribute is doing what. I am completely clueless here, if anyone has expertise on this, please help. I'd really appreciate it.

keen burrow
#

OK, I need some help from the bluetooth gurus:
I'm trying to use an ActiveBluetoothDataUpdateCoordinator. I'm using it because I want to actively connect to the device as soon as the advertisement is discovered (the device is often out of range). This all works fine, except that the advertisement data never changes (there's no useful data in the advertisement data), so only get one single call to _needs_poll, and therefore the poll_method.
Once discovered, I want to poll at regular intervals. I tried multiple inheriting ActiveBluetoothDataUpdateCoordinator and DataUpdateCoordinator, but chaos ensued.
What's the right way to do this?

fringe field
#

It’s meant for when most of the data is coming from the advertisement and polls are rare and short.

#

I think the dev docs have a guide for how to choose an approach

#

Off the top of my head airthings is similar to what you want

keen burrow
# fringe field Don’t use the active coordinator at all

Indeed - this is how I first implemented it. The problem I'm trying to solve is two things:

  1. The device is often out of range (it's a car), so if using a DataUpdateCoordinator, I get rude messages on the log every poll. Maybe I handle this more gracefully? Not sure.
  2. When the device comes into range again I only have a short window of opportunity to connect and fetch data before the device turns off. With a DataUpdateCoordinator, I needed a short polling interval to be sure to get in on this window.
    The ActiveBluetoothDataUpdateCoordinator seemed promising, since I get a callback when there is an advertisement, so no need to poll like crazy, just sit and wait for a callback.
    Thanks for your help, I keep trying the DataUpdateCoordinator route...
analog torrent
fringe field
#

That’s out of date

analog torrent
#

what do you mean ?

#

the hardware got replaced again ? or the firmware fixed issue ?

fringe field
#

Firmware fix

analog torrent
#

oh, well that's the best solution, because i didn't want to risk falling on the one bad hardware in between to ...

#

i should look at it again then

#

Thanks for the info :)

flat tangle
#

afternoon guys... I built a BT proxy some while ago... just because I had the parts... and placed it in another room as far from the HA box as possible in my home.. its working fine... it just got an update.. but it just occured to me I never even really tested it... its just sitting there... I've looked at its logs.. but theres nothing there... is there a way to see for example what BT devices its picking up? or any other indication of it working?

fringe field
#

You can see the Bluetooth addresses it can see in its diagnostic download

flat tangle
#

I can grep that but its not really that helpful... but then again not really sure what I was wanting - I suppose theres not much else for it to do... at least I know its doing its job.

kind walrus
#

What are the differences between ESPHome Bluetooth proxies and Bluetooth adapters ?

fringe field
#

That’s a hard one to answer without knowing more about what you want to do. In terms of the Bluetooth stuff that HA can do by itself, there isn’t really one. A good ESPhome with Ethernet is better performing than a good Bluetooth dongle.

#

Proxies can’t do audio or serial ports

#

But there’s no HA integrations built in for that

#

You can use both at the same time in HA and Ha will pick the best one for the device you are trying to control

#

I used to do that but now I’ve got 4 proxies

kind walrus
#

I learned that you can commission matter devices with bluetooth adapter instead of using a smartphone. Can you do that with Bluetooth Proxy ?

fringe field
#

No. Bluetooth proxies are used by HA integrations.

#

That new feature is part of an addon, not HA itself, so it can’t use proxies.

#

I’m not sure if matter and HA can use the same dongle at the same time - pretty sure it used to cause major problems and was why they removed the feature in the first place

fickle moth
#

I'm a big stupid idiot and bought three switchbot blinds and the gateway thinking if they work with google home, they're got to work with my setup, but now I can't seem to find a way to get them connected. it's asking me for a google home matter gateway to add them to google home, am I screwed? I thought switchbot had great compatibility

#

I have HA running in a docker container, and I don't have bluetooth working on it

#

I have a zigbee coordinator, SLZB-06, and it has a matter-over-thread setting but it's asking me to reflash it FROM zigbee, which I still need/use

#

I used the API key to add switchbot cloud, but it just shows no devices

fickle moth
golden granite
#

I have 4 of the blind tilts hooked up the exact same way with no issues.

spark cairnBOT
strong zinc
#

Hi, I'm using eshome as bluetooth presence sensor. It can detect my tracker, but not my phone. I checked the mac addess on my phone 10 times, it's correct. i'm still "Away" 😭
I have no idea why.
i'm getting desesperated.

#

It should take 5 minutes. 5 hours later investigating google. Nothing.

rotund sail
#

What phone?

strong zinc
#

Android phone

#

I saw a video where the guy install a special firmware which seems to be connected to MQTT.

#

may be it's the way to go ....

#

I'm currently using arduino and esp-idf on 2 esp32 in //

#

my tracker is detected on both, but not my android...

rotund sail
#

Android has no native BLE support

strong zinc
#

we are sending ppl to the moon, we will soon travel in space, we have quantic simulations, .... but no BLE on android.

#

tha'ts realy disapointing me... 😦

#

well then... i'll stop losing my time on it! Thanks a lot for this quick and short answer Tinkerer !!!!! 🙂

compact eagle
#

I just set up an ESPHome Bluetooth proxy... super super cool. However, I still have some Bluetooth devices near the proxy disconnecting from time to time. It could be the devices themselves misbehaving, but... what's the best way to check if it's using the proxy?

Do I need to re-pair the device now that the proxy exists? The docs don't really elaborate.

fringe field
fringe field
fringe field
#

I’d start off by enabling the signal strength sensor if it’s available. We’ve seen some combinations of radios not be great together - needing to be less than 1m apart. Signal strength should help rule that out.

#

We’ve seen atmospheric conditions and time of day seemingly have a meaningful impact on that strength so we want to collect a few days worth.

rustic moat
#

Hi ! i'm trying to use the govee ble integration (i have the govee smart buttons) but it always shows "No devices found on the network". I have setup home assistant on my raspberry pi 4b in a docker compose environment, my bluetooth module is enabled and working

cerulean elbow
cerulean elbow
oblique oak
#

2024.8.0. Next month

rustic moat
#

bruh i spend the day trying to make ssomething non existant work lol

compact eagle
compact eagle
#

I'm leaning toward it being the device going into some sort of sleep mode, because it consistently goes unavailable then comes back, but I don't know for sure. It's went unavailable and came back to being fine > 100 times just today.

fringe field
compact eagle
fringe field
#

Yes

#

And decent signal strength

compact eagle
#

Ok cool, apt to blame the device then.

#

Thanks for taking a look!

twilit arch
#

Yo guys, I just ionstalled a shelly 2pm and enabled its bt repeater within its software and within HA. When i place my BLE device near it though it does not work. Is there any way to check if the repeater is actually working?

amber birch
#

Just impulsively (read: mistakenly) bought a bunch of Switchbot devices with no hub & realized I don't even have bluetooth on my HP Elitedesk 600 to passthrough to the HA VM.
Is there any buying advice for a USB-BT adapter vs a ESP32 proxy?

fringe field
#

On that alone I’d go for a proxy

fringe field
hard dragon
#

Hey folks, I'm having trouble getting ESPresence set-up and working and was hoping one of you might be able to point me in the right direction

true trout
#

New user, new install, bluetooth frame reassembly error

twilit arch
fringe field
#

What integration is that?

twilit arch
#

I did not know shelly repeater was picky with devices, i replaced the normal 2 with pm just for the bt extension feature. Anyway the device was added to Smart life and is added in HA with Tuya BLE integration. Considering the device is correctly working when in Pi range anyway I would exclude an integration problem

fringe field
#

Not at all

#

If it’s a custom integration there are a myriad of ways they could have f***d up

#

Can you point me to the component you are using? The ha_tuya_ble component I can find hasn’t seen any love in over a year

#

However if it is that one, it looks like it relies on making an active connection to the device

#

That is not compatible with Shelly

#

Shelly only forwards advertisement data, which is enough for eg the xiaomi plant sensor or lots of temperature, humidity, motion etc sensors from govee, inkbird, xiaomi, etc.

#

Only ESPHome proxies can forward GATT connections

twilit arch
#

The way it works is through tuya credentials

#

HE gets the credentials from the account and allows for the connection to the device

#

To avoid the encryption on the device...juts like temperatur reades from xiaomi

fringe field
#

Xiaomi puts the data in the advertisement data, we never connect to it over GATT (we can poll the plant sensor battery, but that won’t break everything if it doesn’t work)

twilit arch
#

Cause the original is not working... too ild like u mentioned

fringe field
#

So without digging too deep I can see it uses async_ble_device_from_address to ask for a connectable address

#

That will never work with Shelly

#

You need ESPhome based proxies

twilit arch
#

ok

#

You have been super helpful

#

I have one ESPhome repeater laying around

#

I will try it later when i go home

#

The only problem it is on the outside.. I will need to find a proper casing to allow enviromental damage

fringe field
#

If Shelly have a physically appropriate product you might be able to run esphome on it