HACS, Supervisor, Integrations?

I wrote a containerized REST gateway for an obscure hub. Now what is the best way to make it available to others? My inspiration was one that was installed with Supervisor, is that the only way to distribute a container?

If it is purely python code to integrate a piece of hardware, it is best to make a custom component and make installable by HACS.

If it is more than that, and relies on other linux packages, then it is an addon.

You probably have an addon.

Of course you can install a docker container on either HASSOS or a supervised install. First stop portainer, then you have a nice method to install/manage. But no gui integration with HA.

I originally wrote it for .Net Core, there’s no reason I can’t convert it to Python and create an integration except am I allowed to keep a service running? It opens a TLS/SSL socket to the hub through which it can receive push notifications. That means the socket needs to stay active and connected. Can I do that in a pure Python implementation? If so can you point me to the documentation about this?

You are waaaaay over my pay grade now. Look up, follow the link to dev docs. And/or look at the source on github and see if there is anything similar.

As long as it is async and doesn’t block would be my simplistic and naive answer…

I am guessing this https://developers.home-assistant.io/docs/integration_fetching_data

Yeah, I did the REST gateway because I know I can easily invoke it through poling. It just means all devices need to be manually created with the end point. That documentation doesn’t look like I can keep anything running in the background. Maybe a custom service but that seems like not exactly what it is intended for since I would run my service 24/7.

So for now I’m going to be releasing it as a Supervisor add-on because it already works in that state and I’ll play around with miss-using the integration services.

Yes you can and that is what most integrations do and must do to work. So nothing strange there.

That is good to know. Thank you!