You can wire any microcontroller into Home Assistant over MQTT . Publish sensor data to discovery topics and subscribe to command topics. You get full firmware control without ESPHome’s abstraction layer. The trick works on any chip: ESP32, RP2040, STM32, or a Raspberry Pi Pico W. It’s the right pick when your device needs custom protocols, bare-metal timing, or firmware features ESPHome can’t reach.
This post covers when raw MQTT makes sense, the discovery protocol that auto-registers devices, firmware examples on the ESP32 and RP2040, two-way control patterns, and security hardening.






