Modern communication technologies, Internet protocols, tiny intelligence devices, Cloud/Fog computing have enabled the IoT explosion which will revolutionize the world we live in. IoT devices are mostly battery powered and hence their life mainly depends on their battery power. Energy harvesting is a viable alternative which can actually achieve a near-infinite lifetime for such wireless battery powered nodes. In this paper, we investigate the impact of energy-harvesting feature in IoT network. We extend the existing design of BeeSensor routing protocol, a swarm-intelligence (SI) based protocol, by adding energy harvesting capabilities to network nodes. We then perform empirical evaluations of the extended version, EHA-BeeSensor and compare its performance with the existing protocols. The results show that EHA-BeeSensor not only achieves near-infinite network lifetime, it also performs better in terms of packet delivery ratio, latency and routing overhead.