load device state when it's online.