   int lightNumber;
 
   // Light 1
-  if (strstr(data, "1")) {
+  if (strstr(data, "0")) {
     lightNumber = 0;
   }
 
   // Light 2
-  if (strstr(data, "2")) {
+  if (strstr(data, "1")) {
     lightNumber = 1;
   }
 
   // Light 3
-  if (strstr(data, "3")) {
+  if (strstr(data, "2")) {
     lightNumber = 2;
   }
 
   // Light 4
-  if (strstr(data, "4")) {
+  if (strstr(data, "3")) {
     lightNumber = 3;
   }
 


byte timeArrayPosition = 0;

// KAKU transmitter
NewRemoteTransmitter transmitter(transmitterAddress, transmitterPin, transmitterPeriod);

// Ethernet details

// Used for the KAKU remote functionality
const long transmitterAddress = 12877286;
const int transmitterPin = 7;
const int transmitterPeriod = 260;

// Used for smart lights
const byte ldrPin = A0;
