Which protocol should I use to create a WiFi-based integration without having to write HA-specific code?

Hey everyone! I’m new here.

I’m currently reverse-engineering the serial debug port of my heating system. So far I have a raspberry pi with a RS384 adapter and a python script that writes a bunch of information (temperatures, states) to stdout.

I want to extend / rewrite that script to instead publish those sensor values via WiFi, then put the project on GitHub. Ideally I want them to be picked up my my HA installation (in the same LAN) via some common open standard and without having to write any HA-specific code. Is this possible?

Researching a bit, it seems like this might be possible by implementing the whole thing as either a MQTT device or a Matter device, though both would then need a separate “broker” server that I don’t have running so far.

Does anyone have any advice or suggestions on how to build this?

MQTT is the way I’d go. It’s well understood, there’s no shortage of libraries to help you, no matter what language you use, and pretty much any home automation platform will understand it.

As a bonus you can optionally publish MQTT Discovery payloads so that HA will auto-create the entities.

1 Like

Thank you for the advice! I used MQTT with the discovery feature you mentioned and published my results / code (written with python asyncio) here:

1 Like