Energy-smart farming