Peter Chen was at work earlier this week when he saw something disturbing on his iPhone.

A man and a 17-year-old boy were robbing his San Jose home.

He could see it through a live feed of a security video camera he had set up and attached to his smartphone.

He called police.

By 2 p.m. Monday, 26-year-old Gabriel Hernandez and the teen were behind bars.

“This is a great, great, great case,” said San Jose police Sgt. Ronnie Lopez.

Lopez lauded the use of technology and citizen activism in helping police catch the suspects.

The 31-year-old Chen, an engineer at a San Jose tech company, had gotten an e-mail alert to his phone telling him that something in motion had been detected by his video camera set up at his Evergreen area home.

Chen installed the Logitech 700e surveillance camera for about $280 just before Thanksgiving after his girlfriend’s car had been broken into. The e-mails, with attached photos, had come before. But he usually deleted them if the motion was set off by a cat or something benign.

This e-mailed photograph showed a man’s head peeking around the corner of his backyard. He switched on his live feed camera to his phone and saw “two guys rummaging around.”

“It was pretty scary,” Chen said. “It was like the movies when you’re watching your friend get killed from the window, and you can’t get to him.”

So, still from his phone, he Googled the number for San Jose police, which said to call 911. He did.

Turns out, two traffic cops, Sgt. Steve Payne and Officer Jeffrey Fielder, were in the area. Lopez said the two quickly arrived at Chen’s home and found the suspects stuffing some money and video games into bags.

By the time Chen arrived home, he said the cops had the two suspects in the back of their car.

“This really paid off,” Chen said. “I’m going to make sure to look at every image now when I get an e-mail. And I’m probably going to install more cameras at home, too.”

Contact Lisa Fernandez at 408-920-5002.