His toddler wasn't sleeping at night, and it taught him a thing or two about the Internet of Things (IoT).