Integrating/discovery without mqtt

Hello everyone, I am in the middle of a project including my own ESP32 sensor design and code and after testing how mqtt works I was left unsatisfied. This question is about getting the nice default user experience of registering such a sensor via the home assistant ux.

I feel writing my own custom integration seems overkill since my sensor has its own UX (via Wifi) and in the end has only a dynamic list of binary presence zones per sensor. I am therefore wondering if there is a default discovery functionality in HA. I know how to get the local HA instance via mDNS but I have not found any documentation detailing any build-in integrations or an easy way to advertise my sensor to a HA so it automatically appears. Maybe that is not possible.

I would love to share my project but for now I need to decide the best way to integrate it in the most native way possible (for example, my ZigBee ethernet gateway just appeared the first time I connected it to my network without a custom integration). I have no problems coding anything that would be needed, I am a senior software developer.

Any pointers or feedback appreciated,
Andreas Pardeike

You could use the ESPHome API. There are a couple of tools that link to the resources in the third paragraph here: Native API Component — ESPHome

ESPHome uses its own firmware and that creates problems with my own needs. I am tight in resources and therefore need my own firmware. I am reading about HomeKit Discovery which I think is active in a default HA installation. Using HomeSpan seems straight forward. Still reading, would that work?

I meant use the native ESPHome API libraries, not ESPHome config for your device. It supports discovery but is a bit quirky in the fact that the devices are servers and HA is the client. The protocol is very efficient apparently.

No idea about HomeSpan, a quick search reveals it is Homekit compatible so should work with HA.

I see. My sensor is already a server so I have to check for port conflicts between my UX and ESPHome. I’ll have a look at the native ESPHome libraries. I haven’t looked into ESPHome in details but I assume it displays the same device card like any of the other normal devices one would connect (like hue lamps or HomeKit devices).

Correct.