Control server like ESP by URL/HTTP

Good morning!
I’m using this tool since saturday and by now I’m quite satisfied. As my next step I’m going to try ESPHome, but as far as I understand I can’t implement any logical things there. I have some self-written, more or less complex ESP libraries for my own projects (like an automated smart plant growing optimizer) which I’d like to integrate into Home Assistant.

So: Can I control a server by HA, e. g. by sending HTTP-requests to this ESP-server, where I just process the GET-requests?

Thanks in advance!
Stefan

Depends on how complex they are, but from my experience you can implement logical things on the ESPHome device itself. There are for example automations or you can also add custom C++ code.

You could use rest commands to control anything that accepts HTTP requests.

However, a more common pattern for integrating ESP devices running home-grown code (not ESPHome or Tasmota), seems to be using MQTT.

Have a read of this. Sounds like what you want to do should be possible using ESPhome.