Dear all,
I’m new to this forum and Domoticz.
I already read a lot on this forum, but I still have got some issues/questions.
I setup the notification using NMA and email setting correctly.
I want to send a push notification with a snapshot of a camera, by using Blockly (because I’m not familiar with Lua yet)
1. When I use the (Blockly) command “Send Notification” , I do receive a push notification on my phone, but there is no snapshot included.
2. When I use the (Blockly) command “Send camera snapshot”, I receive an email, with attachment (which is an incorrect format). This attachment is only 480 Bytes, so it seems the snapshot taken, was not ready, when it was already send.
Can someone help me, by telling what is wrong. (Or what I am doing wrong )
And is it even possible to send a push notification to a phone, including a snapshot ?
Thanks in advance for the answers.
Problems with taking snapshots and sending notifications.
Moderator: leecollings
-
- Posts: 13
- Joined: Wednesday 01 March 2017 13:32
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Problems with taking snapshots and sending notifications.
I have the same issue. There is small icon (placeholder) included in the email, but the picture itself is not included. Maybe this is also a permission issue like the issue described in viewtopic.php?f=6&t=18437&hilit=camera+snapshot.
-
- Posts: 1
- Joined: Friday 28 July 2017 15:54
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Problems with taking snapshots and sending notifications.
I am a new user and wondering that what language you are using for this program below
#!/bin/sh
#SendMsgTo=$1
SendMsgTo=$TelegramChatId
today=`/bin/date '+%d-%m-%Y__%H-%M-%S'`;
TempFileDir=/home/pi/Pictures/
#################################################################
IP="ip" # IP address Camera
##########################################################
SnapFile=$TempFileDir"$today-snapshot.jpg"
if ping -c 1 $IP > /dev/null ; then # if IPCAM is online then:
wget -O - http://ip/camsnapshot.jpg?idx=2 > $SnapFile
sleep 2
curl -s -X POST "https://api.telegram.org/bot"$TelegramB ... /sendPhoto" -F chat_id=$SendMsgTo -F caption="Beweging gedetecteerd in huiskamer" -F photo="@$SnapFile"
else
curl --data 'chat_id='$SendMsgTo --data-urlencode 'text=IP-cam niet beschikbaar.' 'https://api.telegram.org/bot'$TelegramB ... endMessage'
fi
#!/bin/sh
#SendMsgTo=$1
SendMsgTo=$TelegramChatId
today=`/bin/date '+%d-%m-%Y__%H-%M-%S'`;
TempFileDir=/home/pi/Pictures/
#################################################################
IP="ip" # IP address Camera
##########################################################
SnapFile=$TempFileDir"$today-snapshot.jpg"
if ping -c 1 $IP > /dev/null ; then # if IPCAM is online then:
wget -O - http://ip/camsnapshot.jpg?idx=2 > $SnapFile
sleep 2
curl -s -X POST "https://api.telegram.org/bot"$TelegramB ... /sendPhoto" -F chat_id=$SendMsgTo -F caption="Beweging gedetecteerd in huiskamer" -F photo="@$SnapFile"
else
curl --data 'chat_id='$SendMsgTo --data-urlencode 'text=IP-cam niet beschikbaar.' 'https://api.telegram.org/bot'$TelegramB ... endMessage'
fi
Re: Problems with taking snapshots and sending notifications.
Nobody any answers to the question(s) in the first post???
-
- Posts: 26
- Joined: Thursday 30 June 2016 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Amsterdam
- Contact:
Re: Problems with taking snapshots and sending notifications.
Hello,
I am also using the camera snapshop blockly, but the delayed one. So my first action in the event is to open the API URL on the camera to move it into the proper position to take the snapshot with an "Open URL" action, then I am using the "Send Camera Snapshot XXXXX with subject BLA after N seconds" and it is working perfectly fine.
I am also using the camera snapshop blockly, but the delayed one. So my first action in the event is to open the API URL on the camera to move it into the proper position to take the snapshot with an "Open URL" action, then I am using the "Send Camera Snapshot XXXXX with subject BLA after N seconds" and it is working perfectly fine.
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: Problems with taking snapshots and sending notifications.
can you give us your example of blockly ?dervogt wrote: ↑Friday 17 November 2017 14:38 Hello,
I am also using the camera snapshop blockly, but the delayed one. So my first action in the event is to open the API URL on the camera to move it into the proper position to take the snapshot with an "Open URL" action, then I am using the "Send Camera Snapshot XXXXX with subject BLA after N seconds" and it is working perfectly fine.
thx
Who is online
Users browsing this forum: No registered users and 1 guest