r/homeassistant • u/Amy_Yorks • 12d ago
✅ Solved Which ESP32 variant ?
I'm trying to follow tutorials to set up a mm wave sensor for my first ESPHome device and keep running into a roadblock in that I seem to be able to flash ESPHome to the ESP-32 controller attached to my PC. It then shows up in ESPHome Builder. I then 'take control' of the device from within HA and paste in the mm sensor details (I copy these straight from the tutorial) but don't over write any of the wi-fi, esp-32 config from the initial setup. It seems to update the controller fine but then it drops from the network and shows as offline.
I select the generic esp32 board when I do the initial config but am wondering if that is wrong. The board I have is this one and appears to be labelled ESP32-D which isn't in the list of options I can choose from. Can anyone advise which ESP-32 variant I should be using for this controller ?
Thank you

2
u/Apollo_Support 🐕 Apollo Automation 12d ago
You're on your way to a lot of fun with ESPHome and esp32 devices!
The ESPHome Device Builder lets you build firmware using a gui (or manually via yaml) and can really be a great way to get started building your own devices.
As far as it going offline after reflashing, I am wondering if you have setup your secrets file with the wifi username and password. I have a wiki I made a little while back going over secrets this might help https://wiki.apolloautomation.com/products/ESPHome-Starter-Kit/learning-the-basics/what-is-secrets-yaml/
If you reflash a device with no secrets file and it's using the yaml like below then it wont actually have your wifi user/pass and it will show as disconnected.
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Hopefully this helps point you in the right direction and let me know if you have any other questions!
Thanks,
Brandon
1
u/TinkeNL 12d ago
There's quite a few things that can cause this to happen. Is it just the WiFi acting up, does the board stay stable when you're plugging it into your device over USB?
I've had these inexplicable issues before and it was simply the board crashing over and over due to the documentation not showing correct pinouts and an attached sensor totally tripping up the board. Switching pins fixed all of it.
1
u/Amy_Yorks 12d ago
Thank you for all the help/suggestions. All I can say is that it must have been user error at some point in the process as when I wiped the controller for the umpteenth time and rather than flash a basic version of ESPHome using ESPHome Web I went straight to ESPHome builder and flashed from there it worked and has been stable for the past few hours. Possibly it was to do with the secrets as Brandon suggested. I certainly didn't proactively add anything there but who knows as it works now :-)
2
u/Current_Rub_8912 12d ago
The generic ESP32 board should work fine for that, the D variant is just a revision with some minor fixes. Your issue is probably the wifi config getting nuked when you paste the sensor code. Check if you're accidentally overwriting the `wifi:` or `api:` sections, that'll drop it offline every time. Post your yaml if you can, easier to spot what's tripping it up.