Hi,
I'm looking at the new Foscam FI9928P camera, but before I buy it, does anyone know if Domoticz could support the following:
Camera is looking at the path, but when a motion sensor (or doorbell) is triggered, it moves to that location, zooms in for a bit - takes a snapshot, mails it to me, then returns to its original position.
Haven't seen anything in the forums that describe this (the snapshot and mailing seems possible though)
Foscam FI9928P PTZ control
Moderator: leecollings
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Foscam FI9928P PTZ control
you can use http cgi links to operate your camera:
when dorbell rings (of course DOmoticz CAN intercept such trigger), send the HTTP command to move to a specific point the camera
here is the link:
https://www.foscam.es/descarga/Foscam-I ... .11.06.pdf
I was in the mood to create a plugin for that... but I do not have the time for
when dorbell rings (of course DOmoticz CAN intercept such trigger), send the HTTP command to move to a specific point the camera
here is the link:
https://www.foscam.es/descarga/Foscam-I ... .11.06.pdf
I was in the mood to create a plugin for that... but I do not have the time for
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Foscam FI9928P PTZ control
Thanks. I'll have a look.
-
- Posts: 38
- Joined: Friday 27 December 2013 3:13
- Target OS: Linux
- Domoticz version: Beta
- Location: Friesland
- Contact:
Re: Foscam FI9928P PTZ control
I did it like this, with a foscam compatible camera:
I get several telegrams with pics from different angle, after taking pics camara moves back to start position.
Code: Select all
#!/bin/bash
#Doorbell ringing, send telegram notification:
if [ -e "/var/ramdrive/domoticz" ]; then RUNDIR="/var/ramdrive"; else RUNDIR="/opt/domoticz"; fi;
TEMPDIR="${RUNDIR}/temp"; SCRIPTSDIR="${RUNDIR}/scripts"
#wget -q --output-document ${TEMPDIR}/snapshot.jpg http://<user>:<password>@192.168.192.73:83/snapshot.cgi
#curl -s -m 5 http://<user>:<password>@192.168.192.73:83/snapshot.cgi > ${TEMPDIR}/snapshot.jpg
nohup ${SCRIPTSDIR}/TG_PjedrBot.sh msg <your_telegram_adress> "Kijk eens wie er voor mijn deur staat aan te bellen?" &>/dev/null
if ping -c 1 192.168.192.73 > /dev/null; then
if [ -e "${TEMPDIR}/snapshot.jpg" ]; then rm "${TEMPDIR}/snapshot.jpg"; fi
nohup wget -q --output-document ${TEMPDIR}/snapshot.jpg http://<user>:<password>@192.168.192.73:83/snapshot.cgi |>/dev/null
#ls -l /var/ramdrive/snapshot.jpg; echo "${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg"
nohup ${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg &>/dev/null
nohup curl -s -m 5 http://<user>:<password>@192.168.192.73:83/decoder_control.cgi?command=33 |>/dev/null; sleep 6s
if [ -e "${TEMPDIR}/snapshot.jpg" ]; then rm "${TEMPDIR}/snapshot.jpg"; fi
nohup wget -q --output-document ${TEMPDIR}/snapshot.jpg http://<user>:<password>@192.168.192.73:83/snapshot.cgi |>/dev/null
#ls -l /var/ramdrive/snapshot.jpg; echo "${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg"
nohup ${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg &>/dev/null
if [ -e "${TEMPDIR}/snapshot.jpg" ]; then rm "${TEMPDIR}/snapshot.jpg"; fi; sleep 6s
nohup wget -q --output-document ${TEMPDIR}/snapshot.jpg http://<user>:<password>@192.168.192.73:83/snapshot.cgi |>/dev/null
#ls -l /var/ramdrive/snapshot.jpg; echo "${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg"
nohup ${SCRIPTSDIR}/TG_PjedrBot.sh send_photo <your_telegram_adress> ${TEMPDIR}/snapshot.jpg &>/dev/null
nohup curl -s -m 5 http://<user>:<password>@192.168.192.73:83/decoder_control.cgi?command=31 |>/dev/null
else
nohup ${SCRIPTSDIR}/TG_PjedrBot.sh msg <your_telegram_adress> "Webcam3 is niet online, zo raad maar wie." &>/dev/null
fi
nohup echo "Klaar" 2>&1 | >/dev/null
#EOF
-
- Posts: 38
- Joined: Friday 27 December 2013 3:13
- Target OS: Linux
- Domoticz version: Beta
- Location: Friesland
- Contact:
Re: Foscam FI9928P PTZ control
TG_PjedrBot.sh
Code: Select all
#!/bin/bash
if [ -e "/var/ramdrive/domoticz" ]; then RUNDIR="/var/ramdrive"; else RUNDIR="/opt/domoticz-extra/"; fi
TEMPDIR="${RUNDIR}/temp"; LOGDIR="${RUNDIR}/log"; echo "`date` $*" >> ${LOGDIR}/${0##*/}.log;
TOKEN=<your_telegram_token>; CHATID=<your_chat_id>; echo "Sending Telegram: $*";
echo "param1=$1"
if [ $1 == 'send_photo' ]; then
echo curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" -F chat_id=${CHATID} -F photo="@${3}"
curl -s -X POST "https://api.telegram.org/bot${TOKEN}/sendPhoto" -F chat_id=${CHATID} -F photo="@${3}"
echo 'Foto verzonden'
else
curl --data chat_id=${CHATID} --data-urlencode "text=$1" "https://api.telegram.org/bot${TOKEN}/sendMessage"
echo 'Tekst verzonden'
fi
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: Foscam FI9928P PTZ control
Thanks, but I'm using the newer cameras with HD and there doesn't seem an easy way to start a manual record for video or snap a picture in the CGI user guide (I'm using V1.06). Anyone have an idea?
Thanks
Thanks
Who is online
Users browsing this forum: No registered users and 0 guests