Using sketch without ESP Home?

I have a bit of a low level and complex esp32 sketch to interface with a device i have. I know i can write snippets of ESP32 C++ code and put it in a ESPHome configuration but the size of my sketch would make that pretty messy.

Is there an alternative way to connect my esp32 sketch in the arduino IDE with homeassistant? I imagine there is all kinds of HA framework stuff that ESPHome is doing, etc. and ideally i’d love to be able to leverage all that.

Or is there a way i can just upload my sketch to a file on my HA server and have ESPHome reference that?

You could use MQTT for communications between HA and your ESP.
Just need to add the relevant code to your Arduino sketch to Pub/Sub to the appropriate MQ broker / topic.

1 Like