Hello everyone. Please how do i connect my esp32 to HA without directly flashing the board through USB? So i have my custom code running on the board already but i want to integrate some controls from HA how do i do that without overriding my own code. I know about using MQTT but that means i have to setup a broker somewhere else say a cloud and then connect HA to that same broker but that increases latency and not what i really want to do. I’m new to HA platform so i don’t know if i’m missing something.
First why not use esphome? Secondly you can setup mqtt on HA which will cause very little lag. You are going to need something to connect it which will no doubt involve reflashing it.
Hello fdcDev,
Welcome to the Home Assistant Forum!
You can talk to HA’s MQTT broker if it’s running one and the esp is on the same network.
UPDATE: Oops, missed seeing your reply Arh, but yes, what you said.
Thank you for your response. I am working with ESPHome but i don’t really understand the second part of your reply. All i want is to be able to talk control the esp from HA(through esphome) but still have my custom code in the esp.
Thank you. About the HA MQTT, does it come along with the HA on my local network or do i need to provide some form of internet access in order to initiate communication. I have worked with cloud based MQTT brokers but in this case that’s not what i want. Could you please tell me more about your approach.
Esphome is an easy (ish) way to create code to run on ESP chips. If you are running your own code on an esp you will need to add something like MQTT to your code and install an MQTT server to HA for it to work. Esp will not work with your own code that is not created in Esphome builder.