Ok, I am in need of a little help, both my Account and Doorbell Things are showing “online”, but I am still getting a Zero kb file when I attempt to download the video. Can someone let me know where I am missing something? I have made some changes to the original rule posted earlier, using a change to the time of the last event. Also, it is not necessary for me to have the last 10 videos, they will be time stamped and saved when sent by telegram. Here is my code:
rule "Ring Trigger"
Item Ring_Acct_Time changed
executeCommandLine("wget " + Ring_Acct_URL.state.toString + " -O /tmp/ring.mp4", 5000)
logInfo("Ring.com","Ring video should have downloaded")])
logInfo("Ring.com","video should have been saved and sent by telegram")
This is my ring.sh file:
curl -s -X POST "https://api.telegram.org/bot[BotNumber]:[Token]/sendVideo" -F chat_id=[ChatID] -F video="@/etc/openhab2/tmp/ring.mp4"
The telegram API will not send an empty file, but it will work with a downloaded video file from Ring.com, so that part works.