Sunday, December 7, 2014

how can I use motion by ken lavrsen to send a text message to my phone?

That's what we're attempting to answer today..

Short answer, edit (as su) /etc/motion/motion.conf and change

# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
; on_event_start value
 

To

# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
on_event_start /home/pi/textme.py


Simple? You would just put in on_event_start echo Alert | mail -s "Subject" number@messaging.sprintpcs.com

Okay, this actually works - but, there's a blemish - as soon as you launch motion with "sudo motion", you get a text message.. Why? That's just dumb. Is it a problem with motion?

Anyhow, I think this gmail to send text to phone with Raspberry Pi might have a hole somewhere. Just a day after doing this, I get a spam SMS this morning :(

No comments:

Post a Comment