Skip to content

Instantly share code, notes, and snippets.

@apphands
Created August 19, 2019 22:26
Show Gist options
  • Save apphands/2757efa1b8e4fcce69cbd55ff4acea44 to your computer and use it in GitHub Desktop.
Save apphands/2757efa1b8e4fcce69cbd55ff4acea44 to your computer and use it in GitHub Desktop.
NodeMCU esp8266 home irrigation script
// Load Wi-Fi library
#include <ESP8266WiFi.h>
// Replace with your network credentials
const char* ssid = "edmonds";
const char* password = "jennyjenny";
WiFiServer server(80);
// Variable to store the HTTP request
String header;
#define SERIAL_BAUDRATE 115200
const String relayName[] = {"Lawn", "Grapes", "Paths", "Flowers", "Berries", "Garden", "Deck", "Lilacs"};
String relayState[] = {"off", "off", "off", "off", "off", "off", "off", "off"};
const int relayGPIO[] = {D8, D7, D6, D5, D4, D3, D2, D1};
// Current time
unsigned long currentTime = millis();
// Previous time
unsigned long previousTime = 0;
// Define timeout time in milliseconds (example: 2000ms = 2s)
const long timeoutTime = 2000;
void setup() {
Serial.begin(SERIAL_BAUDRATE);
// Initialize the output variables as outputs
for (int i = 0; i < 8; i++)
{
pinMode(relayGPIO[i], OUTPUT);
digitalWrite(relayGPIO[i], HIGH);
}
// Connect to Wi-Fi network with SSID and password
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
// Print local IP address and start web server
Serial.println("");
Serial.println("WiFi connected.");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
}
void loop(){
WiFiClient client = server.available();
if (client) {
Serial.println("New Client.");
String currentLine = "";
currentTime = millis();
previousTime = currentTime;
// loop while the client's connected
while (client.connected() && currentTime - previousTime <= timeoutTime) {
currentTime = millis();
if (client.available()) { // if there's bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
header += c;
if (c == '\n') { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row.
// that's the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what's coming, then a blank line:
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println("Connection: close");
client.println();
for (int i = 0; i < 8; i++)
{
if (header.indexOf("GET /"+ relayName[i] +"/on") >= 0) {
for (int x = 0; x < 8; x++) {
// first turn all off
relayState[x] = "off";
digitalWrite(relayGPIO[x], HIGH);
}
Serial.println( relayName[i] +" on");
relayState[i] = "on";
digitalWrite(relayGPIO[i], LOW);
} else if (header.indexOf("GET /"+ relayName[i] +"/off") >= 0) {
Serial.println( relayName[i] +" off");
relayState[i] = "off";
digitalWrite(relayGPIO[i], HIGH);
}
}
// Display the HTML web page
client.println("<!DOCTYPE html><html>");
client.println("<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
client.println("<link rel=\"apple-touch-icon\" href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALiQAAC4kBN8nLrQAAIABJREFUeJzt3Xlg3AWd///X6zMzaXoCQluhTdJyqYClyaSHKBYB72tXLawH0iaBuooLKre4tXjiBbiolOZoAV0pu+5P12NdT3Y9OJq0IIu7lZJm0sIi6ld70CMzn/fvD9At0DQzk5l5fz6feT3+2zaZeS42ySuf+cznA4iIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIyi7eatR3s3iIifwDtARGqvvXfracwE/9W6ZvBF3i0i4oPeASJSW4vWbJmZT2UGABxjhv9iPrWwf8WsJ727RKS2dARApI4sWWnpfCq9HsAxAEDiZKQLX3bOEhEHGgAidWRXy/BnAb78GX9InN/em+twShIRJ3oJQKROZHtybwfxtYP9nZntAbloo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0kkkQaACI1sHS9pbbu3v7isFBYjAALzbiQtBcBDLzbfFlowEMEf0GGPwtG8LN7L5wz6F0lUg80AEScZFdvn2QN4TyEYSvIeQBOoeFkEEd4t1WDwfIENxvsfoTcGBD3PrlnQv9DF83c5d0mUo80AEQipu3mrUcjnXohg/BEM55I4kQAx8KsJQ7nFZhhB2mDMG422n8D/O8gLPz6j7tHHnr44hP3efeJyFM0AERiZH7Po9NpIy1BirMtxCwCswAcY7DpAKYTnG7A8wibCrKiX99m2EvY7w14AuATgD1BYruZbTOmtiEMc+lMavC+82f/vpLPKyLVoQEgkkQrLTh1ztZpQcEOS6dTUyzkpEKIiQwwERZmSKYYBumQYSqwoBDSwsCsYEGQtxB7kMKeMMSeIBXuCguZHfun/uFPD51zyn7v/7dERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERKS2/n9qT4FBIqfOrwAAAABJRU5ErkJggg==\">");
client.println("<script>setTimeout(function(){location.replace(\"/\");}, 5000);</script>");
// CSS to style the on/off buttons
// Feel free to change the background-color and font-size attributes to fit your preferences
client.println("<style>html { font-family: Helvetica; display: inline-block; margin: 0px auto; text-align: center; background-color: #000; color: #FFF }");
client.println(".buttonON { background-color: #0D8BEA; border: none; color: white; margin-left: 5px; margin-right: 5px;");
client.println("text-decoration: none; font-size: 30px; margin: 5px, 5px; width: 180px; height: 100px}");
client.println(".buttonOFF {background-color: #5c6369; border: none; color: white; margin-left: 5px; margin-right: 5px;");
client.println("text-decoration: none; font-size: 30px; margin: 5px, 5px; width: 180px; height: 100px}");
client.println(".buttonREFRESH {background-color: #1e262e; border: none; color: white; margin-top: 10px; margin-left: 1px; margin-right: 1px;");
client.println("text-decoration: none; font-size: 15px; margin: 5px, 5px; width: 360px; height: 50px}");
client.println("</style></head>");
// Web Page Heading
client.println("<body><h1>Sprinklers</h1>");
for (int i = 0; i < 8; i++)
{
// Display current state, and ON/OFF buttons for Relays
if (relayState[i]=="on") {
client.println("<p><a href=\"/"+ relayName[i] +"/off\"><button class=\"buttonON\">"+ relayName[i] +"</button></a>");
} else {
client.println("<p><a href=\"/"+ relayName[i] +"/on\"><button class=\"buttonOFF\">"+ relayName[i] +"</button></a>");
}
i++;
if (relayState[i]=="on") {
client.println("<a href=\"/"+ relayName[i] +"/off\"><button class=\"buttonON\">"+ relayName[i] +"</button></a></p>");
} else {
client.println("<a href=\"/"+ relayName[i] +"/on\"><button class=\"buttonOFF\">"+ relayName[i] +"</button></a></p>");
}
}
client.println("<p><a href=\><button class=\"buttonREFRESH\">Refresh...</button></a>");
client.println("</body></html>");
// The HTTP response ends with another blank line
client.println();
// Break out of the while loop
break;
} else { // if you got a newline, then clear currentLine
currentLine = "";
}
} else if (c != '\r') { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
}
}
// Clear the header variable
header = "";
// Close the connection
client.stop();
Serial.println("Client disconnected.");
Serial.println("");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment