There are three ways to make an ESP32 talk to Home Assistant. Pick by how much you want to write.
ESPHome
You describe the board and the sensors in a short YAML file, and ESPHome builds the firmware. The device shows up in Home Assistant by itself. It is the quickest path for common sensors and relays.
Arduino with MQTT
You write the code and publish values to a broker. It is more work, but it suits custom logic, and the device keeps running with no Home Assistant at all.
Your own HTTP or Telegram interface
Fine for a single device. It does not scale to a dashboard of many.
First flash and updates
The first upload must go over USB, and the web flasher on this site can do it from Chrome or Edge. After that you can update over the air.
Habits that save pain
- Give each device a fixed address or a reservation in the router.
- Keep the logic that protects things, such as turning off a heater, on the device rather than in Home Assistant, so it still works when the server is down.
- Add a sensor that reports uptime and Wi-Fi signal. It shows resets and weak links at once.
- Remember that the server also needs power during an outage.
Comments
No comments yet. Share your experience or ask a question.