Comment envoyer un SMS avec MOTION
Bonjour,
je débute dans la programmation.
J'ai un Raspberry PI 2 depuis 1 mois et je voudrais envoyer un SMS avec le logiciel MOTION de Larvsen.
Le site : http://lavrsen.dk/foswiki/bin/view/M...eBasicFeatures donne en effet le code pour envoyer un SMS avec MOTION.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| #!/bin/sh
# Motion sample script to send an sms at start of an event.
# Replaces the former 'sms' option.
# Just define this script as 'on_event_start'-script in motion.conf like that:
# on_event_start send_sms "%Y-%m-%d %T"
#
# If you want to send an e-mail message here as well, just uncomment the last
# line of this script.
#change to suit your needs:
#location of 'sms-client' binary
SMS_CLIENT="/usr/bin/sms_client"
#Destination sms number
TO="12345"
#Don't change anything below this line
$SMS_CLIENT $TO "Motion detected $1"
#/usr/local/bin/send_mail $1 |
Mais j'ai l'impression que ce code est du PHP (présence du $) et non du Python et ni du code interprétable par le Raspberry PI 2 (RPI2) : python bute sur le $.
Quelqu'un peut m'aider à faire fonctionner ce code sur mon RPI2?
Cordialement.