   // null-terminate input buffer
   inputBytes[i] = '\0';
   // execute command
-  if (cmd == 'P') {
-    int value = atoi(inputBytesPtr);
-    if (value > 0) {
-      resetSleep(value);
-    }
-  } 
-  else if (cmd == 'A') {
-    int value = atoi(inputBytesPtr);
-    if (value >= 0) {
-      settings.r1 = value;
-    }
-  } 
-  else if (cmd == 'B') {
-    int value = atoi(inputBytesPtr);
-    if (value >= 0) {
-      settings.r2 = value;
-    }
-  } 
-  else if (cmd == 'C') {
-    int value = atoi(inputBytesPtr);
-    if (value >= 0) {
-      settings.offset = value;
-    }
-  } 
-  else if (cmd == 'D') {
-    int value = atoi(inputBytesPtr);
-    if (value >= 0) {
-      settings.sensitivity = value;
-    }
-  } 
-  else if (cmd == 'S') {
-    int value = atoi(inputBytesPtr);
-    if (value >= 0) {
-      digitalWrite(RELAY_PIN, HIGH);
-    } 
-    else {
-      digitalWrite(RELAY_PIN, LOW);
-    }
-  } 
-  #ifndef NOETH
+  if (cmd == 'R') {
+    reset();
+  }
   else if (cmd == 'F') {
     long value = atol(inputBytesPtr);
     if (value >= 0) {


#ifndef NOETH

  // Buffers used for parsing HTTP request lines
  char buffer[STRING_BUFFER_SIZE];

  // Server configuration parameters, energino will listen for
  // incoming requests on this port
  const long SERVER_PORT = 8180;

  // This configuration is used when DHCP fails
  IPAddress IP(172,25,18,219);
  IPAddress MASK(255,255,255,0);
  IPAddress GW(172,25,18,254);
  
  // Not found page
  const char CONTENT_404[] = "HTTP/1.1 404 Not Found\n\n";
  
  // Not implemented page
  const char CONTENT_501[] = "HTTP/1.1 501 Not Implemented\n\n";
  
  // JSON response header and footer
  const char JSON_RESPONSE_BEGIN[] = "HTTP/1.1 200 OK\nContent-Type: application/json\n\n[";

 */

#include <SPI.h>
#include <SD.h>
#include <Ethernet.h>
#include <EEPROM.h>
#include <avr/eeprom.h>

// comment/uncomment to disable/enable debug
#define DEBUG

// comment/uncomment to disable/enable ethernet support
//#define NOETH

#define RELAY_PIN 3

#ifdef DEBUG
#define DBG if(1) 
