Internet of Things (IoT) based sensor networks have gained unprecedented popularity in recent years. With the exponential explosion of the objects (sensors and mobiles), the bandwidth and the speed of data transmission are dwarfed by the anticipated emergence of IoT. In this paper, we propose a novel heterogeneous IoT model integrated the power line communication (PLC) and WiFi network to increase the network capacity and cope with the rapid growth of the objects. We firstly propose the mean transmission delay calculation algorithm based the 3D Markov chain according to the multi-priority of the objects. Then, the attractor selection algorithm, which is based on the adaptive behavior of the biological system, is exploited. The combined the 3D Markov chain and the attractor selection model, named MASM, can select the optimal path adaptively in the heterogeneous IoT according to the environment. Furthermore, we verify that the MASM improves the transmission efficiency and reduce the transmission delay effectively. The simulation results show that the MASM is stable to changes in the environment and more applicable for the heterogeneous IoT, compared with the other algorithms.