Julio Ojeda-Zapata frets about potential burglaries when he’s away from home, so before a recent trip he tricked out his house with Internet-connected video cameras, motion sensors, and smart outlets. Most, but not all of the gadgets work with Apple’s HomeKit, which points to lingering gaps in the company’s home-automation ecosystem.