     HTTP.begin();
 
     Serial.printf("Starting SSDP...\n");
-    UPnP.setSchemaURL("description.xml");
-    UPnP.setHTTPPort(80);
-    UPnP.setName("UPnP Motion Sensor Kit");
-    UPnP.setSerialNumber("001788102201");
-    UPnP.setURL("index.html");
-    UPnP.setModelName("UPnP Motion Sensor Kit");
-    UPnP.setModelNumber("929000226503");
-    UPnP.setModelURL("http://danny.backx.info");
-    UPnP.setManufacturer("Danny Backx");
-    UPnP.setManufacturerURL("http://danny.backx.info");
-    SSDP.begin();
+    device.setSchemaURL("description.xml");
+    device.setHTTPPort(80);
+    device.setName("UPnP Motion Sensor Kit");
+    device.setSerialNumber("001788102201");
+    device.setURL("index.html");
+    device.setModelName("UPnP Motion Sensor Kit");
+    device.setModelNumber("929000226503");
+    device.setModelURL("http://danny.backx.info");
+    device.setManufacturer("Danny Backx");
+    device.setManufacturerURL("http://danny.backx.info");
+    SSDP.begin(device);
 
-    UPnP.begin();
+    UPnP.begin(device);
 
     Serial.printf("Ready!\n");
   } else {


void loop() {
  HTTP.handleClient();
  delay(1);
}

const char* password = "your-password";

ESP8266WebServer HTTP(80);
UPnPDevice device;

void setup() {
  Serial.begin(115200);
