   lamp3_val = val.substring(0,commaPosition);
   Serial.println(lamp3_val);
   
-  lamp4_val = val.substring(commaPosition+1, val.length());
+  lamp4_val = val.substring(commaPosition+1, (val.length()-1));
   Serial.println(lamp4_val);
   
   if(lamp1_val == "1"){

  pinMode(lamp2_power, OUTPUT);
  pinMode(lamp3_power, OUTPUT);
  pinMode(lamp4_power, OUTPUT);
  digitalWrite(lamp1_pin, HIGH);
  digitalWrite(lamp2_pin, HIGH);
  digitalWrite(lamp3_pin, HIGH);
  digitalWrite(lamp4_pin, HIGH);
  digitalWrite(led_power, HIGH);
  digitalWrite(lamp1_power, LOW);
  digitalWrite(lamp2_power, LOW);
  digitalWrite(lamp3_power, LOW);
  digitalWrite(lamp4_power, LOW);
  delay(1000);
  Serial.println("Dimas Ganteng");
}

void loop(){
  String val = get_lamp("/api/hcs_get_lamp");
  Serial.println(val);
  
  commaPosition = val.indexOf(';');
  lamp1_val = val.substring(0,commaPosition);
  val = val.substring(commaPosition+1, val.length());
  Serial.println(lamp1_val);
  

#include <SPI.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <HttpClient.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0E, 0xF5, 0x30 };
const char hostname[] = "192.168.2.4";
IPAddress ip(192,168,1,6);

int commaPosition;
String lamp1_val;
