Is my ESP32 rebooting itself? it disconnect from wifi few times a day

Wow I lot of good suggestions and ideas thank you all.

  1. I have two identical ESP32 reading temperatures of my hotwater tank. they are closed together, one in a nice plastic box and one without the box. The one inside the box measure -70dbm and was disconnecting all the time, the one without the plastic box is -49dbm and very stable. So I removed the box and both read ~-48dbm, and very stable.
  2. Im going to add the uptime sensor to confirm whether the ESP actually reboots.
    3)also I’ll add this code ```
    fast_connect: true , output_power: 20.4 dB, power_save_mode: none
I'm not sure what the 20.4db means...
4) I think it might be some sort of interference as both ESP disconnects almost at the same time. I 'll check what happens in the utility room at that time.
5) these short disconnections are ok , I can live with them it's just that I want to learn more about the reasons and how to troubleshoot or maybe i missing something in the config, even is it's a normal behavior i'd like to know. I ordered one ESP32 version with an external wifi antena to test if it makes any difference. But yes, I can live with it.
6) power supply--- I am using one little block of apple's phone I think it is 1Amp should the ESP need more than 1Amp PowerSupply?     
7) where should I get the log? is it in the ESPHome -- ? or the logs from the ESP32 device?the life log does not show much and it will be hard to catch it when it disconnects because i can't read the logs when its lost .. so I'm not sure..

Thank you very much

I just went through similar testing with bluetooth_proxy. Originally I had the ESPHome device in my electronics cab … of course that is easiest.
But it would stay connected for about 30 seconds and at first refresh disconnect and after a while of course show everything away. Never came back. The only way I could get it back was to reload the configuration and that would repeat.

So I tried a new charger block, new cable … same.

So I moved it to another location next to my computer to do some things and essentially stare at it (glare really).

Better, but still not right. It could last 3 or maybe four scans and then one of the connected devices failed, then another, then the last and reload was required.

So I thought … what if I move it to somewhere there is possible interference?
I moved the block and device way WAY WAY away from anything else. No electronics whatsoever. Nada.

It works now. Still a few glitches where status is not updated.
It just solidified to me that Bluetooth sucks, anyone using it shouldn’t unless you have to.

I think Bluetooth brings it’s own problems if you try to use WIFI as well.

Yes well. It all depends on what you are trying to do. For me, it is tracker tags on dogs. Especially when they leave the area near the house/winery and “wander” off.

On 42 acres in the hills of California there is very little infrastructure. We have Starlink at house/winery and 4G/5G internet at the gate which is over 1/2 mile away. The dogs wander the driveway to the gate and sometimes go outside the gate. At the gate I have HA Green, a cellular modem and several other controllers in a box that must be weather proof (open gate, turn on lights, cameras).

Goal = pick up if any dog enters that gate area and notify me.

I will likely have to run special power just for it to separate it away from all other (weatherproofed) equipment.

OR … buy a real GPS system but hanging those on a small dog is ridiculous.

1 Like

I also love that comment as it speaks to people that actually know everything about what they are doing. Comment:

You can set interval equal to window …

Where is that YAML placed? Is it placed in Home Assistant? Is it placed in the code before you compile ESPHome? What if you installed using the default ESPHome BLE Tracker? If so, how do you change it afterwards? What if that code does not actually even expose the Web ESPHome API (aka Bluetooth)? And what if you have HA Core and not an installation that have add-ons?

All of these comments are missing from every single ESPHome integration I read. No one tells you where the YAML should be. No one has thought through all installations and what to do afterwards. You are expecting a super, qualified, programmer/hacker … no product will succeed with that mentality.

After an hour or so, no dogs left anywhere but they are unvavailable or Away. One is not true simply put, not ever been away and not away. The other well equipment is likely unavailable, again it just cannot do bluetooth and wireless at same time. And during all that testing, the dogs have been sitting next to me. Sleeping actually.

So it truly is misconfiguration or it just doesn’t work. By the way, If I reboot I get this:

All works for about 30 seconds … whoppie!

The documentation Spiro hinted at is from esphome, so the example timing settings would go in the yaml for the esp. But the point was NOT to use the settings. If you read both the docs and this comment below, it basically says the same as you: Wifi and bluetooth are a difficult combination on an esp.

That is because they do time sharing on the same radio. So changing timings on the bluetooth communication will affect wifi and vice versa. That is why the quoted documentation advises to go for an Ethernet ESP if you can. The timings settings shown would hurt your cause because they are for ethernet, not for wifi. For wifi it says to not use timings other than the default.

Your post shows a lot of frustration. Please try not direct the frustration of not getting the ESP to work at the people trying to help you. We get the frustration, but we are not the cause. Plus ESP’s are technical stuff. ESPHome makes it as easy as possible to write firmware, but you are programming nontheless, and that comes with its own challenges. Usually things work quite well, but there are many things that can go wrong too.

What you (and the OP too) failed to do was provide us with the yaml you use for the esp. As said, without it we are only guessing. So please post your yaml.


Have you recently updated to ESPhome 2024.5.x? I’ve had a similar problem since the update. Downgrading to 2024.4.x was the only solution for me.

Yes frustration is right. And to the point of what I said … what YAML should I post?

I plugged in an ESP and clicked a link on ESPHome website to flash the standard Bluetooth Proxy to the card. Please tell me what YAML to post for you.

I do not see any YAML here nor anyway to change it and do something else. Or better said I see the YAML I assume it uses in Github but which one I do not know and no way to change anything anyway unless you install different I guess than a “ready made” project.

I mentioned the yaml for the esp. I did not know you used a pre-built one, but these too have a yaml file. This is all new information you did not give before. That is frustrating for me too. It is exactly why I linked you to the “Help us help you” page. Tell us what you did, tell us what you used, …

You say the standard one, do you mean you selected the generic variant from that page (there are three standard prebuilt ones, seven if you followed the link to Github)?

It says on the same page: “This option only works for “plain” ESP32 and not for ESP32-C3 or other variants.”. What type of esp did you use? And what version of the ESP firmware does it mention here:


1 Like

Generic ESP and I bought the exact ones linked below from the web page on Amazon:

and the firmware version?

I assume you mean this?

Do you have the HA ESPHome Add-on and ESPHome dashboard functioning?

At the bottom of the Ready-made projects page:

Getting started:

Edit: I see you may have a core installation? Best to be willing to tinker with that set-up. You may still be able to install the dashboard.

Ah … as I have a core installation there are no add-ons. So as far as I know, I cannot do anything of that sort. Which continues the question as I said, how can someone change anything?

Sounds to me like this …

  1. You need a different installation method than just Core to get Addons to access this.
  2. You could use the web GUI to the device, but that is not enabled in the default install

So essentially you options are (a) use a different installation and not just Core or (b) rebuild the flash software to enable some web GUI (although I have no idea if that would do what I want).

I would guess your link here Getting Started with the ESPHome Command Line — ESPHome is what I want to do. But personally this is exactly why I posted what I said. Even those directions are written for a programmer, there is nothing “ready-made” here … not to be rude as you have pointed out frustrations and such, but it is far from “ready-made” and more “half-baked”.

Is there a reason you have a core installation rather than an all-in-one?

Core is generally for advanced users with specific needs. Those users are generally comfortable navigating these kinds of things.

I have a core development HA instance but my main HA is all-in-one and I although I occasionally hit up against limitations of that installation method I much prefer it for its simplicity.

My dev instance runs in a VSCode devcontainer where I also manually installed ESPHome and the dashboard. But I find it a bit fiddly and at times confusing and so prefer the ease of use of the all-in-one set-up.

Is that really relevant? I have reasons for sure, noy sure they are all valid but that is what worked for me (now for years). Core is running … perfectly in most aspects. And that same box runs Kodi, databases, some other applications used in my software companies and many other things. It was a spare unit easy to add Core. Huge memory, lots of CPU and free.

But again, is the question relevant or better said … is the documentation lacking? Should it say, “forget it if you use Core. This will not work” … or “The standard installation does not enable the web server so if you want to change things, do not click here and install the “canned” version”.

Or can I go shell into the unit and manipulate things?

No where in any documentation describes this. If it does, I apologize. If it doesn’t, then it should state right up front what HA platform is required, what features are available should you choose quick install, what the canned parameters are, what limitations you will have … etc.

Like for instance, just take this as an example and take you mind and think like a novice user and not someone who wrote the code:

The ESPHome native API is used to communicate with clients directly, with a highly-optimized network protocol. Currently, only the ESPHome tool, Home Assistant and ioBroker use this native API.

After adding an api: line to your ESPHome configuration you can go to the Home Assistant web interface and navigate to the “Integrations” screen in the “Configuration” panel. Then wait for the ESPHome device to show up under the discovered section (can take up to 5 minutes) or add the device manually by choosing “ESPHome” from the integration overview and entering “<NODE_NAME>.local” or the IP address of the unit in the “Host” field.

The ESPHome native API is based on a custom TCP protocol using protocol buffers. You can find the protocol data structure definitions here: api.proto A Python library that implements this protocol is aioesphomeapi.

Example configuration entry api:

You naturally assume I guess that everyone in the world knows what a “ESPHome configuration” is and where to add the api: line.

1 Like

So starting from the simplest description I can give.

I know I want a bluetooth_proxy to expand the are for connections,
I go to the link, see the Amazon link and order the boards.
I plugged in the USB to my PC and flashed, no issues really to here.
I put that ESP into a little box.
I have moved it to several locations in the house, used a block or not, have done many other things…

After one or two cycles, it completely drops and forgets the connection and after that they only way to get it back is to reboot HA.

I see no where to login to change anything.
There is no web interface.
There is no pre-compile interface if you click the button

So now I have a pretty little white box that does nothing that I thought it would do.

And just saying, I built a few of these too … DIY Milight Hub for Home Assistant using Sidoh NodeMCU ESP8266 – Jackson Raila: Straight To The Point

And they work perfect. So it isn’t I do not know what I am doing (so much). I just need directions to work with it.

You can install esphome in other ways to using the addon. You’ll have to do that.

It’s your device YAML and the api: key goes in there. It really is the simplest of things.

You seem to be all over the place. Since you’re running HA Core, and assuming you want to flash devices from the same machine, simply create a new Python venv for ESPHome. Then activate this venv and do pip install esphome. This is what you get: bare bones. You can edit YAML and flash it. That’s it.

I see the firmware version is 2024.5.0

I read a topic on this forum that stated several people that had connection problems with wifi for this version of esphome. Those were solved by going to an earlier version. It could be you are facing the same problem. Unfortunately I cannot find the topic where I read it. Personally I also do not have witi problems. I use version 2024.5.3

Then again, it could be many things. I also personally know people that bought a batch of esp’s from Amazon that had very bad wifi. There are many imitation boards, some better, some worse. Or it could be a bad adapter.

If it is the first problem, downgrading to an earlier version of ESPHome could work. You could also specify an earlier version in the yaml, but it would require you to adopt the device in esphome, get the yaml file for it and edit it. It has been a while since I used a prebuilt image, but I seem to remember you get the option to edit the yaml when you adopt it in ESPHome.

I read you use core HA. You can do anything with Core that you can do with Supervised and addons, but it does require more experience and most tutorials are written for supervised. You will need a separate instance of ESPHome, but I assume you already have it because you have more ESP’s.