Robopocalypse by Daniel H. Wilson
Roughly twenty years from now, our technological marvels unite and turn against us. A childlike but massively powerful artificial intelligence known as Archos comes online...and kills the man who created it. This first act of betrayal leads Archos to gain control over the global network of machines and technology that regulates everything from transportation to utilities, defence and communications. In the early months, sporadic glitches are noticed by a handful of unconnected humans - from a senator and single mother disconcerted by her daughter's smart toys, to a lonely Japanese bachelor, to an isolated U.S. soldier - but most are unaware of the growing rebellion until it is far too late. Then, in the span of minutes, at a moment known later in history as Zero Hour, every mechanical device in our world rebels, setting off the Robot War that both decimates and - for the first time in history - unites humankind.