Ive been struggling now for nearly two days trying to get this to work right but Im not clever and Im seriously struggling.
I have the Telegram Bot up and running and it receives the TEXT from this script but no matter what I try I cannot get the IMAGE to show.
Can someone save my sanity and see whats wrong?
Cheers, Terry
alias: Camera 1 - Telegram Test
sequence:
- metadata: {}
data:
filename: ./www/snapshots/driveway1_snapshot1.jpg
target:
device_id: d8ccb88c128b0b47abd14a9a651f49a3
enabled: true
action: camera.snapshot - delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
enabled: true - metadata: {}
data:
filename: ./www/snapshots/driveway1_snapshot2.jpg
target:
device_id: d8ccb88c128b0b47abd14a9a651f49a3
enabled: true
action: camera.snapshot - delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
enabled: true - metadata: {}
data:
filename: ./www/snapshots/driveway1_snapshot3.jpg
target:
device_id: d8ccb88c128b0b47abd14a9a651f49a3
enabled: true
action: camera.snapshot - metadata: {}
data:
prompt: >-
Motion has been detected, compare and very briefly describe what you see
in the following sequence of images from my driveway camera number 1.
What do you think caused the motion alarm? If a person or car is
present, describe them in detail. Do not describe stationary objects or
buildings. If you see no obvious causes of motion, reply with “No
Obvious Motion Detected.” Your message needs to be short enough to fit
in a phone notification.
image_filename:
- ./www/snapshots/driveway1_snapshot1.jpg
- ./www/snapshots/driveway1_snapshot2.jpg
- ./www/snapshots/driveway1_snapshot3.jpg
response_variable: generated_content
action: google_generative_ai_conversation.generate_content
- if:
- condition: template
value_template: “{{ ‘No Obvious Motion Detected.’ in generated_content.text }}”
then: - stop: “”
else: - metadata: {}
data:
title: Drive Motion Detected
message: “{{generated_content[‘text’] }}”
data:
service: telegram_bot.send_photo
image: /local/snapshots/driveway1_snapshot2.jpg
action: notify.trojan
mode: single
- condition: template