The rapid proliferation of the internet of things (IoT) technology has significantly transformed urban landscapes, giving rise to smart city frameworks that leverage interconnected devices for enhanced efficiency and functionality. In these environments, vast amounts of data are generated by diverse sensors and devices, necessitating advanced strategies for effective data collection and transmission. This paper introduces a novel approach to address data collection and transmission challenges in IoT-enabled smart city frameworks. The proposed design integrates IoT-Cloud for efficient data collection and employs the energy efficient reliable data transmission (EERDT) model, optimizing IoT data transmission. The enhanced dragonfly routing algorithm, incorporating the firefly algorithm, enhances data routing efficiency. Experimental results demonstrate EERDT's superiority over energy-aware iot-routing (EAIR) and location-centric energy-harvesting aware-routing (LCEHAR), revealing significant improvements in communication overhead, data processing latency, and network lifetime. The EERDT exhibits substantial reductions in communication overhead, enhancing overall network performance. The EERDT model showcases lower data processing latency and energy consumption, highlighting its potential for resource-efficient IoT data transmission. This work contributes an innovative solution for smart city IoT networks, emphasizing performance enhancements and resource efficiency.