GithubHelp home page GithubHelp logo

Broken Pictures about gallery-card HOT 4 CLOSED

Github-Axel avatar Github-Axel commented on July 25, 2024
Broken Pictures

from gallery-card.

Comments (4)

Github-Axel avatar Github-Axel commented on July 25, 2024

The configuration code of the card

type: custom:gallery-card
show_reload: true
entities:
  - sensor.cam1_snapshot
title: Camera
menu_alignment: Responsive
maximum_files: '10'

configuration.yaml

sensor:
  - platform: folder
    folder: /media/Cam1_SnapShot

For the record, I have never succeeded with path entitie... I don't find the good path... ^^'

from gallery-card.

Github-Axel avatar Github-Axel commented on July 25, 2024

Ok, I found my problem.

The gallery card take the listing in the media folder (or the path declared in your entities) while it follow the path local/ia/Cam1_SnapShot/Entrance_20221028-194132.jpg (local = www folder created in the config folder)
The path local/ia/Cam1_SnapShot/***.jpg is exposed to the world publicly without restriction. (like mention in the description)
Is there a solution to only give access to hass session and not the world ?
If I go in media trough lovelance
that's the link of my picture

https://my.website.com/media/local/Cam1_SnapShot/Entrance_SnapShot.jpg?authSig=eyJhbGciOiJIRzI1NiIsInR5cCI6IkpXVCJ9.eyJ5pc3MiOiI1N2UzOTd8M2U0NjJjOTdM2ZTU1ZWM2MzZkNTQ3YiIsInBhdGgiOiIvbWVkaWEvbG9jYvwv65d442FtMV9TbmFwU2hvdC4bnRgyYW5jZV9TbmFwU2h8qcGciLCJwYXJhbXMiOnt9LCJpYXQiOjE2NjcxNTI4NTcsImV4cCI6MTY2NzIzO4730.FoICSfq_T2JyF2no4zMrhJO-dLA4Xa1j8YRHN0gm4MyOE

Is there a way to take authSig generate by hass and add it to your gallery card ?

Thank you for your sharing.

from gallery-card.

TarheelGrad1998 avatar TarheelGrad1998 commented on July 25, 2024

Yes. You would need to use the media source instead of the folder component, as follows:

  1. Ensure that the folder has been added in configuration.yaml a media source (if it is not already):
    media_dirs: Cam1_SnapShot: [*path to media*]/media/Cam1_SnapShot

  2. use the media source in the path:
    `

  • path: media-source://media_source/Cam1_SnapShot/
    `

from gallery-card.

Github-Axel avatar Github-Axel commented on July 25, 2024

Thank you with your help, I finally found the way with media_source
My problem was also the capital letter in the folder name, oups ^^'

It is better like this :)
Configuration
homeassistant: media_dirs: cam1_snapshot: /media/cam1_snapshot
Card
entities:

  • path: media-source://media_source/cam1_snapshot/

So it's work perfect now !
Again thank you for your job and help !

from gallery-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.