bermuda icon indicating copy to clipboard operation
bermuda copied to clipboard

Multiple bugs or state "Out Home"

Open TioBundy opened this issue 8 months ago • 5 comments

I've noticed that since the last Home Assistant 2025.5 update, Bermuda failures and failed readings as "out of the house" without actually being, have increased drastically, and I They don't go away completely, and take more time in this state, In addition, I have raised the time to consider that state considerably, but I do not solve anything. It had been practically 10 days or maybe more without any errors or problems, and it was as a result of the update that I have had these failures again.

I hope that you can take a look at it has changed in Haos to see if something can be affecting, since it is not just Bermuda, the update has affected several more things.

In fact, now when you make a change in Bermuda in his adjustments, he considers you a few seconds "out of home", when before he only came out as "not available", but you returned to the state "at home" and fired no automation.

Thanks.

TioBundy avatar May 10 '25 22:05 TioBundy

you're absolutely right, I'm experiencing the exact same issues since updating Home Assistant to 2025.5. Bermuda suddenly marks devices as "out of home" for no reason, even though they are nearby and were working perfectly for weeks prior.

razserv2010 avatar May 11 '25 21:05 razserv2010

you're absolutely right, I'm experiencing the exact same issues since updating Home Assistant to 2025.5. Bermuda suddenly marks devices as "out of home" for no reason, even though they are nearby and were working perfectly for weeks prior.

Update your ESPhome boards. It seems, and for now I'm leaving it at that, that there was something (the last update was almost at the same time as the HA update) that was affecting it. I'm lowering the time to consider myself "off" to minimums I've practically never used, and at least for a while there are no complaints, since when I lowered it that much, it immediately marked me as off.

I've also set both BT proxies to work practically 100% of the time:

esp32_ble_tracker: scan_parameters: interval: 150ms # default 320ms. Time window: 125ms # default 30ms. Time active: true Bluetooth_proxy: active: true

This way there are only 25ms between one scan and the next window. If you set it to 150-150, it would scan 100% of the time.

The problem is finding the right point; it's not a one-day pit; it will take weeks. And if another update changes things later... It's worth considering not always updating all ESPhome panels.

TioBundy avatar May 12 '25 15:05 TioBundy

Just FYI, if you look at the Beta of ESPHome 2025.05, there are several BLE PRs included that look very relevant. I’ve had the same issues mentioned above and I’ve deployed the beta to my 32 proxy environment. It’s too early for me to say it’s fixed, but my initial impression is that it’s a big step back to where it was for me previously (working perfectly for my use cases).

There are further BLE fixes that won’t make the 2025.05 release but should come around the 2025.06 release as they are related to the latest ESP-IDF and require more work to integrate.

You can find them easily if you want to review at the ESPHome GitHub. You may consider deploying the beta and testing how it works for you.

drewancil avatar May 15 '25 05:05 drewancil

Hi!

I've also set both BT proxies to work practically 100% of the time:

You might want to check out my recommended settings as well, at https://github.com/agittins/bermuda/wiki/ESPHome-Configurations - I particularly like the scan automation for the c3 proxies, and use that on all my devices.

It's possible that some issues are being caused by the way that esphome proxies manage active connections, so if you have integrations that make outbound connections to devices the proxies providing those connections will, as I understand it, stop reporting advertisements for the duration of that connection.

Some people have decided to deploy additional proxies in their home so they can dedicate some to exclusively tracking adverts and other handling the active connections.

I know there are plans for the esp integration to get better controls over the state of proxies, so hopefully Bermuda will be able to get some insight into when to expect a proxy to stop reporting, and to weight the lack of reports accordingly - but by far the more reliable approach will always be to have enough proxies that you can either dedicate some to active connections, or so that you have a level of redundancy.

Also worth noting - there were some niggly bugs in Bermuda that I think have been in all the 0.8 versions up to (hopefully) v0.8.2-beta2, which I released today. It contains a big re-work of how the internals operate so would be interested to know if it improves your situation.

agittins avatar May 17 '25 06:05 agittins

Thanks for the ideas and for the efforts around Bermuda - it has a lot of promise. It was formerly working perfectly for me, and at some point very recently I started getting frequent not home on my various iBeacons. Unfortunately, I run a highly dynamic environment and am involved in beta testing HA, ESPHome, and Bermuda and my change control was inadequate to pinpoint exactly when the issue started.

I had already deployed most of your recommended esphome settings, reflashed my esp devices since the partition changes, and added proxies (I have 32 of them in a 2050 square ft single level condo with quite a few being Ethernet and several of the WiFi having external antenna with extra gain).

I had initially hoped the Esphome 2025.5 was helping, but it is still occurring. Maybe a bit less, but it’s hard to quantify. I did deploy the Bermuda b2 last night and although it’s early and needs more testing, It doesn’t seem to have solved it for me.

I plan to deploy a couple more Ethernet proxies with external antenna and set outbound scanning and connections to false as you mentioned in the guide. I have also done virtually no tuning as since it was working formerly, I didn’t see the need. So I’ll try that as well.

If I display the history of the Bermuda tracker with the native ha beacon tracker, the ha beacon never goes away when it shouldn’t, but the Bermuda one does. When looking at the graph, it seems, there is some regularity or pattern every 10 minutes. Does that interval mean anything to you? I don’t perceive or measure any other difficulties on my ha instance otherwise. It’s not 10m like clockwork, but the graph sure looks fairly regular. I can post a jpg if that is useful.

Thanks again - willing to do any troubleshooting to improve this very useful component.

drewancil avatar May 17 '25 20:05 drewancil

@TioBundy

The problem is finding the right point; it's not a one-day pit; it will take weeks. And if another update changes things later... It's worth considering not always updating all ESPhome panels.

There have certainly been some significant changes in the Bluetooth areas of ESPHome in the last few releases - but this is not the normal state of things, it's usually pretty stable. I think because I've also made some significant changes in Bermuda (including adding some niggly bugs in the initial v0.8.0 area) it has probably compounded to make things worse. Fingers crossed for a more stable future!

Is this issue good to close now, or do you still have outstanding issues?

@drewancil that sounds like a pretty nice deployment! The 10 minute intervals don't ring any bells, is it possibly the devtracker timeout you have set in your Bermuda config? The native device tracker timeout is hard-coded, but Bermuda lets you configure its timeout.

Can I ask you to open a fresh issue for your setup, and include a "download diagnostics" and ideally some logs from "Enable debug logging" with some notes on observing a particular entity going unknown so I can correlate the observations with the logs?

Given you have quite a busy environment, I'd suggest updating to v0.8.2-beta3 first, and running your "download diagnostics" after say just a few minutes of runtime - there's an issue with diags that I haven't nailed down yet, which can cause the system to wedge up if the diags are processing too much history.

agittins avatar May 19 '25 15:05 agittins

¡Hola!

También configuré ambos servidores proxy BT para que funcionen prácticamente el 100% del tiempo:

Quizás también quieras revisar mis configuraciones recomendadas en https://github.com/agittins/bermuda/wiki/ESPHome-Configurations . Me gusta particularmente la automatización del escaneo para los servidores proxy c3 y la uso en todos mis dispositivos.

Es posible que algunos problemas se deban a la forma en que los servidores proxy de esphome administran las conexiones activas, por lo que si tiene integraciones que realizan conexiones salientes a dispositivos, los servidores proxy que proporcionan esas conexiones, según tengo entendido, dejarán de informar anuncios mientras dure esa conexión.

Algunas personas han decidido implementar servidores proxy adicionales en su hogar para poder dedicar algunos exclusivamente al seguimiento de anuncios y otros a manejar las conexiones activas.

Sé que hay planes para la integración de esp para obtener mejores controles sobre el estado de los proxies, por lo que, con suerte, Bermudas podrá obtener una idea de cuándo esperar que un proxy deje de informar y ponderar la falta de informes en consecuencia, pero, con mucho, el enfoque más confiable siempre será tener suficientes proxies para poder dedicar algunos a conexiones activas o para tener un nivel de redundancia.

También cabe destacar que hubo algunos errores molestos en Bermuda que creo que han estado presentes en todas las versiones 0.8 hasta ( con suerte ) la v0.8.2-beta2, que publiqué hoy. Contiene una importante reestructuración del funcionamiento interno, así que me interesaría saber si mejora tu situación.

Thank you Knight. I'm going to try that beta because today, for example, he gave a false positive of absence, I found out because that closes my smart lock and sets the alarm (this I didn't notice). Let's hope they solve the problems because the alarm calls my phone and it's annoying as it detects me if I go to the bathroom at night😅😂.

When he says the ESP C3 he talks about the minis? I need to maybe fill my house with of a few of them that are significantly easier to hide than the classic ESP devices.

TioBundy avatar May 19 '25 16:05 TioBundy

@TioBundy

El problema es encontrar el punto correcto; no es un problema de un día; tomará semanas. Y si otra actualización cambia las cosas más adelante... Vale la pena considerar no actualizar siempre todos los paneles de ESPhome.

Sin duda, ha habido cambios significativos en las áreas de Bluetooth de ESPHome en las últimas versiones, pero esto no es lo habitual; suele ser bastante estable. Creo que, como también he realizado cambios significativos en Bermuda (incluyendo algunos errores menores en la versión inicial v0.8.0), probablemente esto haya empeorado las cosas. ¡Crucemos los dedos para que el futuro sea más estable!

¿Es bueno cerrar este asunto ahora o todavía tienes asuntos pendientes?

I think it can be closed, and we'll pick up the topic again if you missed it when the recent Betas (which I'm going to test right now) and the upcoming changes to ESPhome arrive as a stable release. Hopefully, the issues will be fixed.

I think I'll also disable the board that controls an LED strip in my kitchen as a proxy and use an extra one I have at home to add some extra support to the two that are currently only acting as proxies without any additional work.

TioBundy avatar May 19 '25 16:05 TioBundy

I installed the latest beta a couple of hours ago and so far so good.. only two family are home right now so I'll it a couple of days before uploading the device history and diagnostics data.

rickt123 avatar May 19 '25 17:05 rickt123

Cheers @TioBundy , I'll close this one out as resolved then.

If you have any troubles with beta3 or later please feel free to open a fresh issue for it, and if you can include a "download diagnostics" it will usually give me more insight into what's happening as well.

Thanks!

agittins avatar May 20 '25 06:05 agittins

Cheers @TioBundy , I'll close this one out as resolved then.

If you have any troubles with beta3 or later please feel free to open a fresh issue for it, and if you can include a "download diagnostics" it will usually give me more insight into what's happening as well.

Thanks!

Really Beta 3 is working! I put 90 seconds for "Away Home" and 2 seconds per scan and 0 false positives, I'm telling you I'd have had a hell so far with other versions.

TioBundy avatar May 20 '25 12:05 TioBundy

Excellent, glad to hear it's working well now!

agittins avatar May 20 '25 19:05 agittins