Garage door opener, Need a separate website to be created

First of all I am new to programming. I am normally a network guy, managing routers and switches at a local hospital.

I need help to add a separate webpage to this script with all feature below.
I wanted to add something like this: ESP8266 Web Server (Code and Schematics) - YouTube

What I would like:
http: [local ip address]/garage.html
Garage door 1 [button- trigger garage door] [button- Status of the garage door- reply if the door is open or closed]

I just need code for garage door 1, I can do the rest for additional doors and status.

const byte Door1Enable = 15;
const byte Door2Enable = 14;

//Interrupt Definition
const byte Door1Status1 = 12; //Open
const byte Door1Status2 = 13; //Closed
const byte Door2Status1 = 4; //Open
const byte Door2Status2 = 5; //Closed

Garage_Door_Opener_SMS23.ino.ino.ino (11.2 KB)

I've seen good tutorials on using arduino + ESP8266 for smarthome appliances, so what exactly is your problem? :slight_smile:

lg, couka

Do not cross-post. Other thread removed.

Thanks guys. I got is created.

Thanks I have figured it out.

else if (req.indexOf("/Full") != -1){ //brings to Webpage 192.168.1.59/Full
client.flush();
client.println("HTTP/1.1 200 OK");
client.println(""); // do not forget this one
client.println("");
client.println("");
client.println("");
client.println("");
client.println("Garage Door");
client.println("");
client.println("");

String s1 = "Garage Door 1 is ";
s1 += (Door1_Status);
s1 += "\n";
client.println(s1);

client.println("

");

String s2 = "Garage Door 2 is ";
s2 += (Door2_Status);
s2 += "\n";
client.println(s2);
delay(1);

client.println("

");
client.println("

Click <a href="/gpio/3">here trigger Right Garage door

"); client.println("

");
client.println("

Click <a href="/gpio/2">here trigger Left Garage door

");

client.println("");
client.println("");

Serial.println("Client disonnected");

Might be obvious, but make sure you secure this IP address or page via a method other than obscurity so that you don't have people opening and closing your garage doors :slight_smile: