@Override
	public void messageArrived(MqttTopic topic, MqttMessage message)
	{
		String[] topics = topic.getName().split("/");
		String subtopic = topics[topics.length-1];
		Housemate person = null;
		WCMessage msg = null;
		
		for(Housemate hm : Housemate.values())
		{
			if (hm.getName().equals(subtopic))
			{
				person = hm;
			}
		}
		if(person == null)
			return;
		
		try
		{
			msg = WCMessage.parseString(new String(message.getPayload()));
			Location l = Location.parseLocaction(msg.getLocation());
			String date = msg.getDate();
			updateHousemate(person, l, date);			
		}
		catch (MqttException e)
		{
			e.printStackTrace();
		}
		catch (ParseException e)
		{
			System.out.println(e.getMessage());
		}
				
		drawClock();		
	}