Trying to access camera metadata with Templates

Hi all,

I’m using s python script that is sending me a pushbullet notification when a movement is detected. In this notification I want to include an image from a cam I have in that area.

The Python script is working, it receives 2 parameters: Camera Name and Access Token (to access the cam image).

Checking my cams in the Dev Tools I see that both elements are available as part of it’s properties so I’d like to use that to call the script.

When I try to access to those properties in the template tool looks like I can’t (while I can access the state of each cam):

Now, when I try to access the access_token property using templates by using this:

{%- camera.gamezone.access_token -%}

I receive this error:

`Error rendering template: TemplateSyntaxError: Encountered unknown tag 'camera'.`

Any idea on how can I access to this so I can send this to my script as parameters?

I resolved this by myself … Jinja is killing me …

the way to access to this is this:

states.camera.living_room.attributes.access_token
1 Like

Hi @davedan,

Have you managed to make your notification work?
Your post helped me a little bit, but still cannot understand templates to make to work this
Maybe you could share your experience or thought how to get and attach images from ffmpeg camera?
Thanks.

sure! let me share what I have for my cams and see if I can help on the other thread.