reply_markup = "inline_keyboard": [["text": "🔦 Turn on Light", "callback_data": "light_on"]]
def send_photo(): img_data = requests.get(CAMERA_URL).content files = 'photo': ('snap.jpg', img_data) url = f"https://api.telegram.org/botBOT_TOKEN/sendPhoto" params = 'chat_id': CHAT_ID, 'caption': 'Live Update' response = requests.post(url, files=files, data=params) print(response.json()) while True: send_photo() time.sleep(30) # Send an update every 30 seconds ipcam telegram channel upd
Test your setup by running the Python script manually before setting it up as a background service. Good luck, and secure your feeds 'caption': 'Live Update' response = requests.post(url