Saving videos captured by Ring Door Bell

Hi,

Anyone knows how to convert this yaml syntax to node red JSON?

url: “{{ state_attr(‘camera.front_door’, ‘video_url’) }}”

*************** Full YAML syntax ******************
automation:
alias: “Save the video when the doorbell is pushed”
trigger:

  • platform: state
    entity_id: binary_sensor.front_doorbell_ding
    to: “on”
    action:
  • service: downloader.download_file
    data:
    url: “{{ state_attr(‘camera.front_door’, ‘video_url’) }}”
    subdir: “{{state_attr(‘camera.front_door’, ‘friendly_name’)}}”
    filename: “{{state_attr(‘camera.front_door’, ‘friendly_name’)}}”

Many thanks!

Try this

[{"id":"5ecaa299314df65d","type":"server-state-changed","z":"cefc8fdcaf9aa4dd","name":"Ring","server":"866d530b.6066a","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.front_doorbell_ding","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":730,"y":4040,"wires":[["d0a686300efed95b"],[]]},{"id":"d0a686300efed95b","type":"api-current-state","z":"cefc8fdcaf9aa4dd","name":"Front Door","server":"866d530b.6066a","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"camera.front_door","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":870,"y":4040,"wires":[["797fc6e6fa0344cc"]]},{"id":"797fc6e6fa0344cc","type":"function","z":"cefc8fdcaf9aa4dd","name":"Data","func":"const url = msg.data.attributes.video_url\nconst subdir = msg.data.attributes.friendly_name\nconst filename = subdir\nmsg.payload = {}\nmsg.payload = {\"data\" : {\"url\" : url, \"subdir\" : subdir, \"filename\" : filename}}\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1010,"y":4040,"wires":[["ffd204f1bf4a006d"]]},{"id":"ffd204f1bf4a006d","type":"api-call-service","z":"cefc8fdcaf9aa4dd","name":"Download","server":"866d530b.6066a","version":5,"debugenabled":false,"domain":"downloader","service":"download_file","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":4040,"wires":[[]]},{"id":"866d530b.6066a","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]

Perfect! it works!!

Many many thanks :pray:

How can i add “mp4” attribute to the created file?

Found it - “filename” : filename+“.mp4”

Thanks again!
Ran