Files
fresh-home/scripts/cameras/create_camera_link.yaml

18 lines
795 B
YAML

# alias: Create temporary camera link
# sequence:
# - variables:
# link_id: "{% for _ in range(40) %}{{ range(10)|random }}{% endfor %}"
# - action: webrtc.create_link
# data:
# link_id: "{{ link_id }}" # create a random or permanent link ID
# # url: rtsp://rtsp:12345678@192.168.1.123:554/av_stream/ch0
# # entity: camera.sonoff # you can use camera entity_id or url
# url: rtsp://192.168.1.7:8554/cam03_sub
# open_limit: 1 # how many times a link can be opened (0 - unlimit, 1 - default)
# time_to_live: 60 # how many seconds will the link live (0 - unlimit, 60 - default)
# - action: persistent_notification.create
# data:
# message: '<a href="/webrtc/embed?url={{ link_id }}" target="_blank">Open Camera</a>'