###### Abstract
Due to the variety of node capabilities, HWSNs can be classified into several principal categories based on differences in energy levels, computing power, connection quality, data generation rates, and node mobility. In the category of energy heterogeneity, nodes possess varying initial energy levels or are equipped with sensors that support replaceable batteries. In terms of computational capabilities, some nodes have superior processing power and larger storage capacities than others. Regarding link heterogeneity, certain nodes provide longer-distance and more reliable communication links within the network. For data rate heterogeneity, nodes differ in their sensing schedules and the size of the data packets they generate. Finally, with respect to mobility, nodes may either be stationary or capable of movement, with mobile nodes exhibiting different speeds. Energy heterogeneity is considered fundamental, with link, computation, and data rate heterogeneities being viewed as functions of energy heterogeneity. Additionally, mobility heterogeneity not only introduces energy challenges but also adds configuration complexities within the network [19]. This work focuses on enhancing energy efficiency within the network layer by introducing a method that ensures key requirements such as self-organisation and energy-efficient data communication. This is accomplished through dynamic clustering and routing in a network that is heterogeneous across multiple parameters and levels. Clustering protocols are a key method for energy-efficient data collection, organising nodes into clusters. Each cluster is led by a cluster head (CH), which gathers data from its members and sends it to an external base station (BS), often through multi-hop communication between cluster heads. The process typically involves two main phases: (i) the election of cluster heads and the formation of clusters, where nodes elect cluster heads and join a cluster, and (ii) the operational phase, where data are transmitted to a centralised BS. Clustering ensures that only nodes with the cluster-head role endure the overhead associated with multi-hop communication in long-distance transmission. To ensure energy is used efficiently, the process of electing cluster heads and forming clusters may be periodically repeated. The strategy of rotating the cluster-head role [6; 8; 17; 20; 21; 22; 23] in conjunction with clustering plays a crucial role in extending the network's lifespan. This approach minimises the need for significant traffic during leader election and cluster setup, as outgoing cluster heads directly appoint their successors. It assumes the existence of pre-established clusters, which can be formed using either static [24; 25; 26] or dynamic methods [27; 28; 29; 30; 31; 21; 32]. In current clustering protocols, cluster heads (CHs) take on more responsibilities compared to cluster members, leading to significantly higher energy consumption than their cluster member counterparts. Moreover, existing approaches do not fully account for the diverse heterogeneity of sensor nodes. In large-scale networks, cluster heads use multi-hop inter-cluster routing to transmit data to the base station, which causes cluster heads closer to the base station to encounter excessive relaying loads, resulting in their premature failure [16]. Therefore, beyond cluster-head selection and rotation to balance intra-cluster energy consumption, an optimal relay-node selection and rotation scheme is also necessary. The proposed energy-efficient routing for IoT-based multi-level heterogeneous networks aims to be adaptable and meet the requirements of networks of varying sizes, from small- to large-scale. The main contributions of this study are summarised as follows:  
1. A novel approach is proposed to extend network lifetime and enhance energy efficiency in intra-cluster communication. This includes the development of a versatile heterogeneity model for multi-parameter heterogeneous networks.