i want to control my ESPHOME ESP32 with a tcp command.
( other words are : tcp command , a browser command , Rest command , url command , Get command )
in the days before ESPHOME i used the arduino ,
and had a code similar to :
server.on("/output", HTTP_GET, [] (AsyncWebServerRequest *request) {
String inputMessage = request->getParam("out")->value();
int outputState = inputMessage.toInt();
digitalWrite(outputPin, outputState);
request->send(200, "text/plain", "OK");
});
so i could use :
To turn the output on, enter the following URL in the browser: http:///output?out=1.
To turn the output off, enter the following URL in the browser: http:///output?out=0.
If i read API for ESPHome
and API for Homeassitant
only POST message are allowed to change states in anything.
my aproach is to use a ESP32(Esphome ) as walkaround to send url-commands
such as : http://<ESP32-IP-Address>/output?out=0
my question : how can i combine the ESP32 arduino with ESPhome , so i can send get-request to the ESP32 ?