© 2020 by the authors. The Industrial Internet of Things (IIoT) network generates great economic benefits in processes, system installation, maintenance, reliability, scalability, and interoperability. Wireless sensor networks (WSNs) allow the IIoT network to collect, process, and share data of different parameters among Industrial IoT sense Node (IISN). ESP8266 are IISNs connected to the Internet by means of a hub to share their information. In this article, a light-diffusion algorithm in WSN to connect all the IISNs is designed, based on the Peano fractal and swarm intelligence, i.e., without using a hub, simply sharing parameters with two adjacent IINSs, assuming that any IISN knows the parameters of the rest of these devices, even if they are not adjacent. We simulated the performance of our algorithm and compared it with other state-of-the-art protocols, finding that our proposal generates a longer lifetime of the IIoT network when few IISNs were connected. Thus, there is a saving-energy of approximately 5% but with 64 nodes there is a saving of more than 20%, because the IIoT network can grow in a 3n way and the proposed topology does not impact in a linear way but log3, which balances energy consumption throughout the IIoT network.