On this forum I've found a (doorbell) BASH-script that will capture an image from my camera and send it through Telegram to our mobiles.
Code: Select all
#!/bin/sh SnapFile="/var/tmp/camsnapshot.jpg" # Get snapshot via Domoticz server wget -O $SnapFile "http://**IP_ADDRESS_DOMOTICZ**:**PORT**/camsnapshot.jpg?idx=1" # Send Telegram message with image curl -s -X POST "https://api.telegram.org/bot**TOKEN**/sendPhoto" -F chat_id=-**CHATID** -F photo="@$SnapFile" -F caption="Er staat iemand aan de deur!" # Remove Image /bin/rm $SnapFile
I've created a blocky-event that should run the script Whenever I press the doorbell button in Domoticz, the script will run and the doorbell will ring. Whenever I use the doorbell the script isn't run and the doorbell will ring like expected. All devices are running the latest stable versions. When am I doing wrong or have I forgotten to set?
It has worked like I wanted it, but after a crash all settings where lost since I haven't made notes or backups