I'm trying to send a notification in Telegram with a snapshot from a camera.
I can't do it at all.
send camera snapshot
Moderator: leecollings
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
send camera snapshot
- Attachments
-
- domoticz camera.jpg (28.96 KiB) Viewed 1320 times
-
- Posts: 157
- Joined: Wednesday 02 October 2019 7:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands
- Contact:
Re: send camera snapshot
Create a script file and paste code below.
Then call the script from your code
(script must be executable, make it so: sudo chmod +x [scriptfile] )
Then call the script from your code
(script must be executable, make it so: sudo chmod +x [scriptfile] )
Code: Select all
#!/bin/sh
#FILE LOCATION
SnapFile="[LOCATION FOR TEMP STORAGE]"
#FETCH SNAPSHOT
wget "[URL TO GET SNAPSHOT]" -O $SnapFile
#SEND SNAPSHOT
curl -s -X POST "https://api.telegram.org/bot[APIKEY]/sendPhoto" -F chat_id=[CHATID] -F photo="@$SnapFile"
#REMOVE FILE
rm $SnapFile
rpi4 - zigbee2mqtt - roborock - espeasy - rfxcom - homewizard p1 - otgw - homebridge - surveillance station - egardia - goodwe - open weather map - wol - BBQ detection - rsync backup
-
- Posts: 112
- Joined: Thursday 08 December 2022 22:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: ROMANIA
- Contact:
Re: send camera snapshot
thx. i gone try tonight
Who is online
Users browsing this forum: No registered users and 0 guests