   esp.process();
   if(wifiConnected && readyToSend) {
       sprintf(data_buf, "{\"type\": \"note\", \"title\": \"PIR Motion\", \"body\": \"Status = [%s]\"}", pirStatus[pirState]);
-      debugPort.println(data_buf);
+      Serial.println(data_buf);
       rest.post("/v2/pushes", (const char*)data_buf);
-      debugPort.println("ARDUINO: send post");
+      Serial.println("ARDUINO: send post");
 
       if(rest.getResponse(data_buf, 256) == HTTP_STATUS_OK){
-        debugPort.println("ARDUINO: POST successful");
+        Serial.println("ARDUINO: POST successful");
 
     
       } else {
-        debugPort.println("ARDUINO: POST error");
+        Serial.println("ARDUINO: POST error");
       }
       delay(2000);
       readyToSend = false;
       
     } 
-}+}

}

void setup() {
  Serial.begin(19200);
  debugPort.begin(19200);
  esp.enable();
  delay(500);
  esp.reset();
  delay(500);
  while(!esp.ready());

  debugPort.println("ARDUINO: setup rest client");
  if(!rest.begin("api.pushbullet.com", 443, true)) {
    debugPort.println("ARDUINO: failed to setup rest client");
    while(1);
  }
  rest.setContentType("application/json");
  rest.setHeader("Authorization: Bearer <your_api_key>\r\n");

  /*setup wifi*/
  debugPort.println("ARDUINO: setup wifi");
  esp.wifiCb.attach(&wifiCb);

  esp.wifiConnect("DVES_HOME","wifipassword");
  debugPort.println("ARDUINO: system started");

  attachInterrupt(0, pirChange, CHANGE);
}

  if(res.getArgc() == 1) {
    res.popArgs((uint8_t*)&status, 4);
    if(status == STATION_GOT_IP) {
      Serial.println("WIFI CONNECTED");
     
      wifiConnected = true;
    } else {
