Telegram - How to send image from MotioneyeOS

Hello,
I have a active MotioneyeOS camera in my network.
How can I send a image using “sendTelegramPhoto”? I tried it several times, but now I have no clue.

Thanks
Tobus

It’s documented here.

I’m aware of this description, but it doesnt help in my case.
The MotionEye provides me two links:
Streaming URL
Embed URL

But what I want is only a jpg or png so the two links doesnt work for me.

The motionEyeOS Settings/Video Streaming section should have a third URL, just above the two quoted. The missing one is called “Snapshot URL” and be of the form:
http://IPaddress/picture/cam number/? [user/pass stuff in base64] .

If the third link is not there, hmm, reboot or re-install, especially if old version. ISTR that if your single cam is defined as a “Simple MJPEG cam” lots of options are missing but I suspect this is not your issue.

I’m not currently using SnapShot but did a year or so back and it worked fine.

This is my solution to send the last photo in telegram

import time

import datetime

import os

import glob

ts = time.time()

stfolder = datetime.datetime.fromtimestamp(ts).strftime(’%Y-%m-%d’)

print(stfolder)

list_of_files = glob.glob(’/data/output/Camera1/’ + stfolder + ‘/*’)

latest_file = max(list_of_files, key=os.path.getmtime)

final_path = “@”+latest_file

print(final_path)

final = “curl -s -X POST ‘https://api.telegram.org/botXXXXXXXXXX:YYYYYYYYYYYYYYYYYYYYYYY/sendPhoto’ -F chat_id=-XXXXXXXXXXXXX -F photo=” + final_path + " -F caption=‘Alarm/Carefull!!!’"

os.system(final)