Wireless Sensor Network (WSN) and the sensing devices are considered part of the core components of the Internet of Things (IoT). Hence, the modeling of IoT-WSNs is fundamental to having a better understanding, management, and deployment of this kind of technology. A fundamental issue in WSN is energy consumption due to the inherent limitations of this resource in the sensor devices. On the other hand, several issues arise in heterogeneous scenarios due to the coexistence of different sensor devices. Therefore, the modeling process becomes challenging and must consider the different transmission and operation cycles and modes that the transmission protocol implements to assure successful functioning in terms of transmission, synchronization, and energy savings. A duty-cycled MAC WSN protocol (PSA-MAC) has been modeled based on a pair of two-dimensional Discrete-Time Markov Chain (2D-DTMC), whose solution in terms of stationary probability distribution is used by expressions that have been derived to evaluate the energy consumption of sensor devices that could be used for WSN-based IoT applications. Analytical results of average energy consumption are obtained, where the synchronization, data, and sleep periods of a full transmission cycle are considered in a heterogeneous scenario with different node classes and priority assignments. Also, the normal and awake operation cycles are considered to assure synchronization and energy savings. Moreover, the transmission schemes of SPT (transmission of single packets) and APT (transmission of packets in aggregation) are also considered in the model. These results are validated through discrete event-based simulations, and the obtained results are accurate.