The main issue to be addressed in Wireless Sensor networks (WSN) applications is the limited life time of sensors and short communication range. Professional data aggregation techniques are, therefore, needed. In this paper, we consider the problem of increasing the WSN lifetime using a cluster-based data aggregation algorithm. We propose a novel method in tackling the problem. We use Mobile Elements (ME) in Internet of Things (IoT) environment to act as Cluster Heads in a cluster-based aggregation algorithm. We believe that utilizing the IoT technology by mixing it with the WSN technology leads to good results. Our experiments show an impressive extend the network lifetime, while not effecting the quality of data gathering.