Greece achieved independence from the Ottoman Empire in 1829 .