Towards smart agriculture