Feature suggestion: Remote connect (ESPHome initiates connection to HA via SSL)

I’m trying to build IoT devices which connect to my Home Assistant from outside the local network. My HA is exposed to the internet on its own domain via SSL but at the moment - if I understand right - ESPHome only works if HA can reach it first.
I have a few applications for which it would be practical if ESPHome could initiate the connection to HA, such as a physical presence display for my girl-friend’s apartment and a sensor package for an off-grid cabin.

esphome is the server. Set up a vpn.

The ESP32 probably isn’t powerful enough to maintain a VPN and buying a VPN router to operate one IoT device is a little out of proportions, I believe, not to mention the administrative work of maintaining the routers. It would make more sense to install separate RPis running HA in federation in the locations and have them do the tasks but even that would be overkill. Client abilities in ESPHome would make those use cases much easier.

How about MQTT?

1 Like

That probably would work, although I would have to expose my MQTT server and I don’t have an application level gateway to screen MQTT requests.

Maybe I failed to communicate my intentions properly - I’m not looking for solutions for my use case. I can just write a basic ESP HA-API client which pulls/pushes what I need and I’m happy.
It’s just that I recently have tinkered a lot with ESPHome and even replaced some of my self-coded stuff with it because it’s easier on the maintenance. I thought, client functionality would improve ESPHome, hence I made the suggestion. If that doesn’t fit the project philosophy, it’s totally fine. It was just a suggestion, not even a feature request :slightly_smiling_face:

I understand. There is the possibilty of the rest sensor on esphome too. No idea on security though.