Dear All
Who can advise me to have an extra output routine function applied to : ESP8266 NodeMCU Async Web Server – Control Outputs with Arduino IDE (ESPAsyncWebServer library) I need to expand one buttonfunction by sending an IR- code by a preset GPIO- output- pin.
So my suggestion was to add extra functionallity in the space below , marked by “*********”
// Send a GET request to <ESP_IP>/update?output=<inputMessage1>&state=<inputMessage2> server.on("/update", HTTP_GET, [] (AsyncWebServerRequest *request) { String inputMessage1; String inputMessage2; // GET input1 value on <ESP_IP>/update?output=<inputMessage1>&state=<inputMessage2> if (request->hasParam(PARAM_INPUT_1) && request->hasParam(PARAM_INPUT_2)) { inputMessage1 = request->getParam(PARAM_INPUT_1)->value(); inputMessage2 = request->getParam(PARAM_INPUT_2)->value(); digitalWrite(inputMessage1.toInt(), inputMessage2.toInt());
**************************************************************************** }
If it were me I would search the web for an ESP8266 IR Remote library (Something like https://github.com/crankyoldgit/IRremoteESP8266). You would also need to search for the IRCodes for the device you want to control as well as the protocol it uses. Then use one of the library examples to place the code where you need it to be.
IR control is not as easy as it sounds. There are many different protocols created by many different manufacturers. Phillips is the largest (Or was the last time I checked a few years ago).
Hi.
I answered your question here: https://rntlab.com/question/esp8266-nodemcu-async-web-server-extra-output-routine-function-required-2/
Regards,
Sara