       Serial.println("set hostname failed");
     */
   }
+
+  toSend += pageFooter;
+  webServer.send(200, "text/html", toSend);
+}
+String genServerConfForm() {
+  String f = pageTop;
+  f += ": Server Config";
+  f += pageTop2;
+  f += "<h2>Configure a server</h2><p>\n";
+
+  f += "<form method='POST' action='svrchz'> ";
+  f += "<br/>IP address: <input type='textarea' name='svraddr'><br/><br/> ";
+  f += "<input type='submit' value='Submit'></form></p>";
+
+  f += pageFooter;
+  return f;
+}
+void handle_serverconf() {
+  Serial.println("serving page at /serverconf");
+  String toSend = genServerConfForm();
+  webServer.send(200, "text/html", toSend);
+}
+void handle_svrchz() {
+  Serial.println("serving page at /svrchz");
+  String toSend = pageTop;
+  toSend += ": server configured";
+  toSend += pageTop2;
+
+  for(uint8_t i = 0; i < webServer.args(); i++) {
+    if(webServer.argName(i) == "svraddr")
+      svrAddr = webServer.arg(i);
+  }
+
+  // TODO persist the config
+
+  // TODO some way of verifying if server config worked
 
   toSend += pageFooter;
   webServer.send(200, "text/html", toSend);

ESP8266WebServer webServer(80);
String apSSIDStr = "WaterElf-" + String(ESP.getChipId());
const char* apSSID = apSSIDStr.c_str();

/////////////////////////////////////////////////////////////////////////////
// page generation stuff ////////////////////////////////////////////////////

  }
}
void getTemperature(float* waterCelsius) {
  tempSensor.requestTemperatures(); // Send the command to get temperatures
  *waterCelsius = tempSensor.getTempC(tempAddr);
  Serial.print("Temp: ");
  Serial.print(*waterCelsius);
  Serial.println(" C, ");
  return;
}
void getHumidity(float* airCelsius, float* airHumid) {
