Smart farming applies Internet of Things (IoT) technology in modern agriculture to enhance efficiency and operational effectiveness. However, continuous operation of IoT devices often results in high energy consumption. This study aims to analyze and optimize energy usage of IoT devices using the Markov Chain model. Five key devices were monitored over four weeks: aerator, LED lamp, power head,…