On Spain’s Atlantic coast, the city of Santander has installed 12,000 sensors that measure everything from when streetlights need to be dimmed to when trash dumpsters are full — saving millions for cash-strapped public coffers. It’s becoming a model for cities worldwide.