     // Turn on the light
     if (strstr(data, "on")) {
       transmitter.sendUnit(lightNumber, true);
-      updateSmartValues((hour()*60) + minute(),analogRead(ldrPin));
-    } else { // Turn off
+      // Enable this to update SmartValue updating, untested
+      // updateSmartValues();
+    } 
+    else { // Turn off
       transmitter.sendUnit(lightNumber, false);
     }
 

    sprintf(lightCommand, "light%01u:%s", receivedCode.unit, receivedCode.switchType == NewRemoteCode::off ? "false" : "true");

    client.send(lightCommand);
    
    updateSmartValues((hour()*60) + minute(),analogRead(ldrPin));
  }

  // Enable the receiver again

void onData(SocketIOClient client, char *data) {
  if (strstr(data, "Time:")) {
    timeUpdate(data + 5);
  } 
  else {
    int lightNumber;

    // Light 1
