I was having this idea for a long long time. Yesterday my friends and I were talking about it again. Well, apparently others have done so, if you Google it. Below is a very short list of things I found online (there are tons of apps and companies doing so).
But it occurs to me to understand why this method isn't so popular. Many companies are making expensive security cameras, and people still buy them. Maybe because we trust things that are dedicated to what they are made for? Then I see that Yi (belonged to XiaoMi) released low-cost security camera (around $30), and a lot of people like it, including me. I realized that it isn't we don't trust low-cost solutions to leverage old smartphones for surveillance. We like them and buy them because we simply don't care, because most of us simply like new stuff.
No matter how easy the setup is for the whole "using old smartphone as monitoring system," old stuff is old. We no longer want to touch the old phones. Maybe they are painfully slow. Maybe they have been sitting in the dust for so long. Maybe some functionality in the phone do not work any more. Maybe they carry so many memories and emotionally we do not want to revisit. And we move on, we get new phones, why do we turn back?