On a dark and stormy night two weeks ago in Schenectady, N.Y., Ken Hislop was relaxing at home when his cellphone suddenly began buzzing in his pocket. It was an urgent text message—from the General Electric Co. factory where he works.

Soon, a second message arrived. And then another, and another. The texts were being sent by tiny sensors embedded inside a series of machines, some of which look like enormous upside-down cement mixers. A violent thunderstorm passing through the area had caused something to go wrong.

...