Internet of Things (IoT) landscape to cover long-range applications. The LoRa-enabled IoT devices adopt an Adaptive Data Rate-based (ADR) mechanism to assign transmission parameters such as spreading factors, transmission energy, and coding rates. Nevertheless, the energy assessment of these combinations should be considered carefully to select an accurate combination. Accordingly, the computational and transmission energy consumption trade-off should be assessed to guarantee the effectiveness of the physical parameter tuning. This paper provides comprehensive details of LoRa transceiver functioning mechanisms and provides a mathematical model for energy consumption estimation of the end devices EDs. Indeed, in order to select the optimal transmission parameters. We have modeled the LoRa energy optimization and transmission parameter selection problem as a Markov Decision Process (MDP). The dynamic system surveys the environment stats (the residual energy and channel state) and searches for the optimal actions to minimize the long-term average cost at each time slot. The proposed method has been evaluated under different scenarios and then compared to LoRaWAN default ADR in terms of energy efficiency and reliability. The numerical results have shown that our method outperforms the LoRa standard ADR mechanism since it permits the EDs to gain more energy. Besides, it enables the EDs to stand more, consequently performing more transmissions.