Esp with home assistant WITHOUT esphome

I can find a wealth of online resources concerning esp with esphome and home assistant, or with esphome without home assistant, but I want to connect my esp/arduino projects directly to home assistant WITHOUT esphome. I also want to know if I can code them solely in C++, and not use yaml at all. Maybe I’m being stubborn, or maybe what I’m asking for isn’t possible, though I’m hoping it is, but I have many projects already coded that I would like to avoid completely redoing just to use them with home assistant. Some of the projects took months to get certain aspects to function properly together, for example using espnow and wifi on the same device.

Sure. But your projects will need someway to communicate with HomeAssistant. MQTT is used most often for this. Then just create the relevant sensors and switches in homeassistant. I did this before switching to esphome.

So there’s no way to send the data direct from the esp to home assistant. You need some data translation in between?

You need some way to connect with Home Assistant that uses an interface both sides understand, on the physical connection side (that would probably be TCP/IP over wifi for you) and the software / protocol layer side. For the latter you could use all kind of interfaces: REST over HTTP, Websockets, MQTT, MySensors, Firmata, and probably some more obscure ones. MQTT is highly standardized in the IoT world and manages the lower level transmission details for you, while still leaving the data definitions to yourself.

I personally use MQTT for all my IP connected DIY devices (although I don’t use wifi, nor ESPs) and I highly recommend it. It decouples your code from HA, which is actually a good thing. You can avoid all kind of issues with breaking changes on the HA API side that way. I also write all my microntroller firmware in C++, I don’t see a point in using a glorified code generator like ESPHome and add yet another third party dependency I neither need nor want to depend on.

2 Likes