Energy efficient IoT data collection in smart cities exploiting D2D communications