[DEPRECATED] ST_Anything - Arduino/ESP8266/ESP32

Hello Dan and happy weekend
Onto my next little project already …and I came across the following built, looking for a way to automate my front door lock. https://electropeak.com/learn/smart-door-lock-w-wifi-login-page-by-arduino-esp8266/

It uses a ESP-01 and Arduino UNO (i have both those components) but for the life of me, with my limited knowledge that i have learned from you here in this thread, i don’t understand why he is not just using the ESP-01 and its GPIO pin (to trigger the lock or the relay on my case) but it introduces the UNO in the equation??

It also has this 2 pieces of code:
For the ESP-01

#include <ESP8266WebServer.h>
// WiFi network
const char* ssid     = "YourSSID";
const char* password = "YourPASSWORD";
ESP8266WebServer server ( 80 );
char htmlResponse[3000];
void handleRoot() {
 snprintf ( htmlResponse, 3000,
"<!DOCTYPE html>\
<html lang=\"en\">\
 <head>\
 <style>\
body {background-color: rgb(160, 0, 53);}\
h3   {color: white;text-align:center;}\
p    {color: white; text-align:center;}\
div  {color: white; text-align:center;}\
ID {text-align:center;}\
input {text-align:center;}\
</style>\
   <meta charset=\"utf-8\">\
   <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\
 </head>\
 <body>\
         <h3>\<canter>Electropeak Smart Security Door</canter>\</h3>\
         <p>\<canter>Please type your ID</canter>\</p>\
         <div>ID: <input type='text' name='pass_word' id='pass_word' align='center' size=10 autofocus></div> \
         <div>\
         <br><button id=\"save_button\">Log In</button>\
         </div>\
   <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js\"></script>\    
   <script>\
     var pass;\
     $('#save_button').click(function(e){\
       e.preventDefault();\
       pass = $('#pass_word').val();\        
       $.get('/save?pass=' + pass, function(data){\
         console.log(data);\
       });\
     });\      
   </script>\
 </body>\
</html>"); 
  server.send ( 200, "text/html", htmlResponse );  
}
void handleSave() {
 if (server.arg("pass")!= ""){
   Serial.println(server.arg("pass"));
 }
}
void setup() {
 // Start serial
 Serial.begin(115200);
 delay(10);
 // Connecting to a WiFi network
 Serial.println();
 Serial.println();
 Serial.print("Connecting to ");
 Serial.println(ssid);
 WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED) {
   delay(500);
   Serial.print(".");
 }
 Serial.println("");
 Serial.println("WiFi connected");  
 Serial.println("IP address: ");
 Serial.println(WiFi.localIP());
 server.on ( "/", handleRoot );
 server.on ("/save", handleSave);
 server.begin();
 Serial.println ( "HTTP server started" );
}
void loop() {
 server.handleClient();
} 

For the arduino

bool stringComplete = false;  // whether the string is complete
 
void setup() {
  // initialize serial:
  Serial.begin(9600);
  // reserve 200 bytes for the inputString:
  inputString.reserve(200);
 
  pinMode(9,OUTPUT);
}
 
void loop() {
  // print the string when a newline arrives:
  if (stringComplete) {
    if (inputString=="your_password")
   {
       digitalWrite(9,HIGH);
       delay(300);
       digitalWrite(9,LOW);
 
       Serial.println(inputString);
       // clear the string:
       inputString = "";
      stringComplete = false;
    }
  }
}
 
 
void serialEvent() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag so the main loop can
    // do something about it:
    if (inChar == '\n') {
      stringComplete = true;
    }
  }
}

I know you are way to busy to look and troubleshoot other peoples code but i need all the help i can get to get it to run on the ESP alone for compactness. Also i was thinking that if we somehow incorporate ST_Anything with it and than we will have relay control through SmartThings as well.
So ST control plus this sort of additional smart capability for other people that don’t have ST to access it via a shared passkey will be the ultimate coolness LOL.

Another semi-related issue that i need your or anyone’s expertise and it is bothering me with this install is that… When i connect and power the ESP-01 though the Arduino Uno or Mega’s that i have, it does not “boot” up but when i connect the ESP through this usb adapter https://www.amazon.com/gp/product/B07D49MSTM/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1 it works just fine and i can access the mini web-server that it is hosting which means that it signs up on my network and the ESP’s hardware works …What can cause this behavior?? Is it not enough voltage?? I have tried both the usb connection and a separate 5 volt adapter for the Arduino boards and of course using the 3v3 pin to power the ESP

Please let me know your thoughts i would love to tackle this project with your help of course LOL
Denis