Barcelona — In the picturesque Barcelona district of El Born, residents can get a better night's sleep nowadays because garbage trucks pass only when bins in the street are full, thanks to high-tech sensors that detect when they need to be emptied.
Meanwhile, a few streets away, magnetic sensors under the road surface allow drivers to find out in advance if a parking space is free - saving them time and cutting back on vehicle emissions.
Other high-technology solutions for street lamps, traffic lights and parking meters have been deployed in Spain's second-largest city in recent years.
One theatre is even decked with a smart vertical garden on its outer wall, which collects its own rainwater via a solar-powered system on the roof.
As one of Europe's richest cities, most of Barcelona's inhabitants already have good access to municipal services and a high quality of life.
But in poorer parts of the world, urban experts say efforts to improve cities with cutting-edge technology can run into challenges, particularly when applied in slums.
"A 24-hour smart water meter can only be possible if you're connected to the water system in the first place," said Ayona Datta, a reader in urban futures at King's College London.
In developing countries, technology may be introduced across a city to make transport or water services more efficient, but will likely only work in its richer areas, she added.
The idea of giving the same thing to everyone in both middle-class and low-income neighbourhoods can be problematic, she said.
"IT companies will sell (smart technology) as a package without any kind of customisation at a grassroots level," she said.
Smart technology installed like this is "giving the icing on the cake to people who are already connected", Datta told the Thomson Reuters Foundation.
In many cases, those who lack access to electricity or the internet cannot benefit from high-tech infrastructure, she added.
"You really need to engage with the social context (and) social issues first," she emphasised.
In India, dozens of smart cities are planned as the South Asian nation seeks ways of coping with rapid growth in its urban population.
By 2050, India will have an additional 300 million urban residents, according to UN-Habitat, the U.N. agency that deals with cities.
But one high-profile "smart city" strategy for Dholera, in Gujarat state, has sparked opposition.
It involves a new 920-km (572-mile) metropolis on the edge of the ancient port city, set to run mostly on solar power and intended to become a global manufacturing hub.
Critics say it will displace subsistence farmers, is at risk of inundation due to being built on a floodplain, and will cost more than planned.
"A lot of smart city projects are real estate projects," said Nancy Odendaal, an associate professor of urban planning at the University of Cape Town.
"On the African continent this becomes particularly poignant as it is seen as the last frontier for property speculation and development," she added.
In most of Africa, smart cities tend to be "top-down" projects to create satellite cities, like Konza Technopolis in Kenya and Eko Atlantic City in Nigeria, Odendaal noted.
Dubbed "Africa's Dubai", Eko Atlantic is being built on Victoria Island next to Lagos. Developers say it will become a new financial headquarters for Nigeria as well as solving chronic housing shortages in Lagos.
Detractors argue that shiny urban centres like Eko Atlantic are designed for a wealthy elite, and do nothing to help poor communities living on their doorstep.
Elsewhere, smart city strategies have received a mixed reception.
Rwanda's capital Kigali was praised for becoming one of the first cities in Africa to roll out free wireless internet in some areas in 2013.
However, it has also been criticised for building new housing ordinary Rwandans cannot afford.
In South Africa's Cape Town, some people see smart city projects as an excuse for gentrification - "just another way of turning old neighbourhoods into swish, consumer zones", said Odendaal.
"KNOW YOUR CITY"
Some of the most effective schemes are those that harness technology but are not marketed by governments as "smart", she said.
They include Map Kibera, which began as a free, open digital map of Africa's largest slum in the Kenyan capital, Nairobi. It has grown into an interactive project pinpointing local services and providing information about security in Kibera.
Its developers, Map Kibera Trust, say the initiative gives visibility to marginalised communities, with two other Nairobi slums replicating the idea.
Non-governmental groups like Slum Dwellers International (SDI) are also doing useful work at grassroots level, said Odendaal.
The network of community-based organisations representing the urban poor in 32 countries across Africa, Asia and Latin America runs a "Know Your City" campaign.
Slum residents collect data and information about where they live, which is held in a central database and can be used by governments and other decision-makers.
SDI says the data is owned by the community, and gives an "informed and united" voice to the urban poor.
"Smart technology has very utopian intentions but it's really about how it's implemented on the ground," said Datta. "It is very universal but has to be rooted in the context of a place in order for it to work."
Community-led initiatives can function especially well, as in India where local people have started sharing photos of suspected sex offenders on instant messaging service WhatsApp, she said.
"Smart technology has had all sorts of unintended consequences," she added. "What emerges can exist completely outside of state regulation."
- Reporting by Sophie Davies; editing by Megan Rowling. Please credit the Thomson Reuters Foundation, the charitable arm of Thomson Reuters, that covers humanitarian news, climate change, resilience, women's rights, trafficking and property rights. Visit http://news.trust.org/)
The Thomson Reuters Foundation is reporting on resilience as part of its work on zilient.org, an online platform building a global network of people interested in resilience, in partnership with the Rockefeller Foundation.