Tomorrow's cities - nightmare vision of the future?
The connected city never sleeps. The thousands of sensors embedded in roads, sewers, water pipes, streetlights are busy collecting information day and night. Perhaps even your bin, which might also be tweeting.
Sensor provider Enevo offers internet connection for bins in cities in Finland, the Netherlands, UK, Belgium, Canada and the US, and runs a Twitter feed - Trashcan Life.
The tweets aren't exactly sparkling wit, including insights such as:
- "I am 26% full"
- "My current internal temperature is 24C"
- "I expect to be full on Wednesday"
It is part of a push to make bin collection smarter, cheaper and less frequent and may ultimately mean an end to the early wake-up call of the bins being emptied.
If our cities are getting increasingly plugged into the network, then so are we.
Wearables that measure all kinds of things from body temperature, hydration levels, heart-rate and sleep patterns are commonplace.
And the data we collect can reveal interesting insights about how our lives, day and night, impacts our health.
Fitness band provider Jawbone compared the sleep data of one million users around the US and found that city residents tended to get far less than those in rural or suburban areas.
It also found that people living in the Brooklyn area of New York went to bed the latest while those in Maiu, Hawaii, had the earliest bedtime.
''Our sleep cycles adapt to the pace and lifestyle of the world we live in and the world by which we are surrounded - which can be much more hectic, fast-paced and full of nightlife entertainment in major cities," the report said.
Meanwhile, a recent study from Microsoft mined data from 75 million keystrokes and clicks on Bing from more than 30,000 individuals wearing a fitness device.
The research found that those who were busiest during the day, based on their Microsoft calendars and search activity, slept worse at night and those who slept less than six hours for two consecutive nights were sluggish for the next six days.
The trend towards both cities and citizens being plugged into the network has only one logical conclusion, says Prof Andrew Hudson-Smith, from University College London's Centre for Advanced Spatial Analysis.
"Bees exist on Earth to pollinate flowers, and maybe humans are here to build the machines," he says.
"Urban robots are just starting to appear, and in 200 years time, machines may run the urban form.
"The city will be one big joined-up urban machine, and humans' role on Earth will be done."
If that thought doesn't keep you awake at night, then a more mundane problem just might.
Cities never really get dark any more and that is becoming a serious issue, particularly for those who want to spend time looking at the night sky.
In September, the city authorities in Reykjavik, Iceland, ordered all street lights to be turned off in multiple sections of the city to facilitate better views of the northern lights.
Other cities are making the move to smart LED lights in an attempt to control the brightness of streetlights.
As well as offering significant savings because they last longer (up to 20 years) and emit far less energy, such lights can also be plugged into the network, meaning cities can decide when they want to throw out light and when they want to dim it.
Street lighting is estimated to account for 40% of a city's electricity bill, and cities that have made the move report huge savings - Detroit says it has shaved $2.5m (£2m) off of its annual bill.
In Glasgow, the council has taken the idea one step further - fitting smart street lights with noise sensors and connecting them to CCTV cameras so that, if noise goes above a certain level, an alert is sent to its operations centre for evaluation in case it is caused by anti-social or criminal behaviour.
The council told the BBC that it does not yet have any significant data on how the lights are performing.
It is just one illustration of how connected cities can veer from their original purpose into entirely new territories, which may not always be ones their inhabitants will feel entirely comfortable about.
Technology may help impose some order and efficiency on the urban landscape, but many who live there will hope cities long continue to be fast-paced and hectic. It is why many of us love them.
Smart city case study: Barcelona
Barcelona has an impressive 500km (311-mile) fibre-optic network, which acts as a backbone for a host of connected services as well as providing citizens with city-wide wi-fi.
The city's lighting works hard:
- 1,100 lamp-posts have been converted to LED, offering cost savings of 30%
- Sensors in the lights can determine when people are passing beneath and light up or dim according to footfall
- They form part of the wi-fi network
- They are equipped with air-quality sensors
There are 19,500 smart meters in targeted areas of the city, which monitor and optimise energy consumption.
Smart bins monitor waste levels and optimise collection routes.
In transport, Barcelona has plenty of electric cars and bike-sharing schemes, while digital bus-stops don't just give waiting passengers updates on when buses will arrive but also provide charging stations, free wi-fi and information about the best apps to download to learn more about the city.
Drivers can take advantage of an app - ApparkB - that can identify empty parking spaces and allow users to pay for the spot online.
Even the irrigation systems in Barcelona's parks are hooked into the network.
Sensors monitor rain and humidity, allowing park workers to decide how much water is needed in each area, which has led to a 25% cut in the city's water bill.
Barcelona has made its city operating system - Sentilo - which controls all the sensors open-source and available to other cities.
Through the system, data is also shared with citizens.