Can't get allowlist_external_dirs to find path correctly

I’m trying to test my Blink Cameras and following this Blink integration guide I keep running into the following error when trying to write the picture to the indicated path:

Failed to perform the action script/blink_doorbell_snapshot. Cannot write /blink/pics/doorbell_pic.jpg, no access to path; allowlist_external_dirs may need to be adjusted in configuration.yaml

here’s what my configuration.yaml looks like:


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

hass_cozylife_local_pull:
   lang: en
   ip:
     - "192.168.1.99"

allowlist_external_dirs:
  - '/blink/videos'
  - '/blink/pics'

I double and triple checked my indentation, checked other examples and threads where some folks had it nested under homeassistant: but when I tried it that way and saved, I wasn’t able to restart HA, so I removed it, corrected indentation and I’m still stuck with the error shown above.

Here’s also a copy of the script YAML I’m trying to run when encountering this error:

alias: blink_doorbell_snapshot
sequence:
  - action: blink.trigger_camera
    metadata: {}
    data: {}
    target:
      entity_id: camera.doorbell
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /blink/pics/doorbell_pic.jpg
    target:
      entity_id: camera.doorbell

Any help here would be greatly appreciated! :pray:

Start with this and see if you get results

allowlist_external_dirs:
    - /config
1 Like

@LiQuid_cOOled that worked I think? Does adding config with no single quotes mean it’ll add all sub folders below it? Any difference in my syntax when using quotes or not here?

It says action ran successful after running the script so now I’m trying to figure out how to access the file that was written in that /blink/pics path.

EDIT: I noticed that you actually indented further than I did too. Looks like roughly 4 spaces, so wondering if that’s it?

The indention is a not an issue.

  • What file editor are you using?

  • Where is the folder located?

  • Is it in www?

Actually never mind, I got the same error again upon restart

I have a Blink system so I’ll test. Can you answer the questions above?

You need to adjust the script to include at least /config/

I tested this with success

action: camera.snapshot
metadata: {}
data:
  filename: /config/www/pics/doorbell_pic.jpg
target:

You are best off targeting a folder within the www folder.

  1. Create a folder in www folder called blink

  2. use this in your config file

allowlist_external_dirs:
    - /config/local/blink
  1. Use this action
sequence:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /config/www/blink/doorbell_pic.jpg
    target:
1 Like

Thanks for digging in here and sorry for not responding sooner as I fell asleep right after writing that last post.

  • What file editor are you using?

I was using File Editor

  • Where is the folder located?
  • Is it in www?

It was directly right under the root /homeassistant/ as I was just going off the examples in the Blink documentation which I guess should be revised to be more obvious perhaps?


Your last post was indeed the solution! :pray:
I ended up making /blink/pics within /www/ and I was able to see that the doorbell_pic.jpg was successfully written there and I can open the picture to view it.


Now the next part is getting this picture to display in a card, then ideally have the script run when I click on the card/picture to trigger a renewal of the picture. Any tips there on cards I could use to achieve that?