Inspiration
I have a old laptop lying around with a webcam, which I have turned into a home surveillance camera. I can watch my apartment through my last project HomeCam, but I can't spend all day staring at the screen.
What it does
HomeCamSpark is a home surveillance camera integrated with Cisco Spark. It sends a photo to a Spark room whenever motion is detected, so that the homeowner can receive a notification on their mobile device instantly. The homeowner can also send text to the Spark room which will be spoken on the computer, in order to scare off potential threats.
How I built it
- motion(1) detects motion and invokes my script
- PHP script sends picture to Cisco Spark API
- ngrok allows Cisco Spark API to reach the computer
- PHP script receives messages from the homeowner through a webhook, and invokes festival(1) for text-to-speech
Challenges I ran into
My access token works correctly when I invoke Cisco Spark API from curl
, but it doesn't work from a PHP script.
I spent much time debugging this, and it turns out to be an extra newline in one of the configuration files, which causes part of the HTTP header to be spilled into the request body, but Cisco Spark API is returning a confusing error code so I didn't suspect that part earlier.
Accomplishments that I'm proud of
The whole thing is built in 3 hours~
What I learned
It's possible to build cool things in just a few hours.
What's next for HomeCamSpark
Now I have 3 home surveillance cameras that have different protocols and codebase. Maybe I need to integrate them somehow?
Log in or sign up for Devpost to join the conversation.