@Override	
	public Sensor.Status readSensor(Sensor sensor) throws L8Exception 
	{
		try {
			Response response = this.client.get("/l8s/" + this.simul8torToken + "/sensor/" + sensor.getName());
			if (response.getCode() == 200) {
				JSONObject json = (JSONObject)response.getJSON();
				
				if (sensor.equals(Sensor.TEMPERATURE)) {
					float celsiusValue = readFloat(json, "temperature_sensor_data_celsius");
					float fahrenheitValue = readFloat(json, "temperature_sensor_data_fahrenheit");
					return new Sensor.TemperatureStatus(readBool(json, "temperature_sensor_enabled"), celsiusValue, fahrenheitValue);
				}
				if (sensor.equals(Sensor.ACCELERATION)) {

					float rawX = readFloat(json, sensor.getName() + "_sensor_data_rawX");
					float rawY = readFloat(json, sensor.getName() + "_sensor_data_rawY");
					float rawZ = readFloat(json, sensor.getName() + "_sensor_data_rawZ");
					int shake = readInt(json, sensor.getName() + "_sensor_data_shake");
					int orientation = readInt(json, sensor.getName() + "_sensor_data_orientation");
					
					return new Sensor.AccelerationStatus(readBool(json, "acceleration_sensor_enabled"), rawX, rawY, rawZ, shake, orientation);
				}
				
				int value = readInt(json, sensor.getName() + "_sensor_data");
				if (sensor.equals(Sensor.AMBIENTLIGHT)) {
					return new Sensor.AmbientLightStatus(readBool(json, "ambientlight_sensor_enabled"), value);
				}
				if (sensor.equals(Sensor.PROXIMITY)) {
					return new Sensor.ProximityStatus(readBool(json, "proximity_sensor_enabled"), value);
				}
				if (sensor.equals(Sensor.NOISE)) {
					return new Sensor.NoiseStatus(readBool(json, "noise_sensor_enabled"), value);
				}
				return new Sensor.Status(false);
			}		
			throw new L8Exception("Error reading simul8tor sensor");
		} catch (Exception e) {
			throw new L8Exception(e);
		}
	}