Role of IoT in Energy Efficiency and Public Safety in a Smart City Connected Community