Giter Site home page Giter Site logo

synology-photos-memories's Introduction

Synology Photos Memories

This is a Node JS/Docker app that fills the void for synology photos lacking a memory feature similar to Google Photos. The simple solution that I've found is to use the unofficial api to fetch the photos in a given timeframe, and send an email with working web links to those photos. Furthermore, NodeJS serves a web page where these photos can be accessed.

Hosting on your NAS

The easiest way to use this app would be to host it on your NAS using Docker

DSM 7.2+

Important If you have not set up quickconnect, you should (as admin) go in Control Panel -> Login Portal -> Applications and set the photo alias related to Synology Photos app.

To install with Docker using the new container manager app, use the following steps:

  1. Search for, and download the the image from the Docker registry. Select the latest tag Download the image from the docker registry
  2. Go to the image and click run
  3. Change the container name if you prefer, and click next
  4. In the Port Settings section, click Add and set the Local Port (the first textfield input) to whatever you want: it's the port you will use to access the web view of 'memories'; Then set the Container Port (the second textfield input) to 8080
  5. Add the following ENV variables

Docker config

You'll need the following environment variables to run the image:

Key Value Optional
NAS_IP yournasip.yourquickconnectid.direct.quickconnect.to:5001 No
USER_ID MyID No
USER_PASSWORD password123 No
SERVICE_NAME gmail No
SEND_BY month No
SEND_EMAIL [email protected] No
SEND_EMAIL_PASSWORD sendpassword123 No
RECEIVE_EMAIL [email protected] No
EMAIL_SUBJECT Your Monthly Photos Yes
PORT Your Monthly Photos in web page ( NB ) No
FOTO_TEAM Optional value for foto space. Set to true if you only have photos in shared space not in your personal space Yes

You shouldn't need to change any other settings.

NAS_IP:

This is the url you use to connect to quickconnect. Used to build the links in each email.

Note Email send and webpage view have only been tested with quickconnect enabled, so NAS_IP should point to your quickconnect url. Other's have suggested it works the same with http:<yourlocalport>:5001

USER_ID:

This is the ID you use to login to quickconnect

USER_PASSWORD:

Your password for quickconnect

SERVICE_NAME:

This is the service provider of the email you'll use for your memories to be sent from. Gmail is probably the easiest, but you may need to add an 'app password' to allow access if you have 'allow less secure apps' enabled in your settings.

You can do so at myaccount.google.com/apppasswords

Here's a list of the following services that are allowed for your send email: https://community.nodemailer.com/2-0-0-beta/setup-smtp/well-known-services/

SEND_BY:

This is how frequently you want a memory email. The options are 'day', 'week', or 'month'. For 'day', the email will be sent every morning at 8am. For 'week', the email will be sent every Monday at 8am. for 'month', it will be sent the first of every month at 8am.

SEND_EMAIL:

This is the email address from the same service provider you selected earlier, from which your memory emails will be sent.

SEND_EMAIL_PASSWORD:

The password for your send email (may require 'app password' for gmail). If you have enabled 2-factor authentication you need to generate an app-specific password and use that in place of your actual password.To do that, go to My App Passwords.

RECEIVE_EMAIL:

The email address you want the memory emails delivered to. This can be any email address/service.

EMAIL_SUBJECT:

This can be anything you want.

PORT:

Important This must be the same port as the Local Port set in the Port Settings section.

This can be any port you want (not already in use). The web page is then accessible through it.

FOTO_TEAM

Optional boolean value in case you only have photos in your shared space.


Altogether, your env settings should look something like this:

ENV settings

  1. Click done

Feel free to make a pull request or submit an issue if you see any mistakes!

synology-photos-memories's People

Contributors

juliancast avatar loenus avatar treyg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

synology-photos-memories's Issues

Problem with authentication

I have also problem with authentication, not sure what doing wrong. I do not run it in docker, and it returns me 400 bad request
I'm sure ip address, quick connect id is correct.
image

when I change ip address to just ip address point to nas from my local network it returns 403 forbidden

image

Don't you know what I'm doing wrong ?
thank you

Feature request - Output photos information in json or xml format

Hello,

I'm looking for a script able to reproduce the "remember" facebook feature, for photos stored on a Synology Nas, using Synology photo database and api : each day, display one photo taken exactly X year(s) from the current date.

Your script is what I found the more relevant to what I whish.

It already retrieve photo(s) url for a specific date, I would like to have the following information added to the output :

  • Exif Date/Time
  • URL of the different thumbnail photo size, if any set
  • Photo location, if any set
  • Digital camera used, if any set

All this information given on a text file using XML or JSON format.
For my need, the existing mail output part is not usefull.

Unfortunately I can't help the JS scripting part, but if you want help about formatting the output, I will be able to help, by providing samples.

Thanks in advance :)

Error in JS Webpage

Hi. I just installed your great docker project according to your guide in readme on my synology.

Trying to access the newly built in Webpage, i get the following error...

Any idea where this comes from or how to fis this?

Thanks in advance

    123|     </button>
    124|
 >> 125|     <% const uniqueDates = new Set();
    126|     urlList.forEach(photo => {
    127|         formattedDate = new Date(photo.date).toLocaleString().split(',')[0]
    128|         uniqueDates.add(formattedDate);

Cannot read properties of undefined (reading 'forEach')
    at eval ("/app/views/home.ejs":13:13)
    at home (/app/node_modules/ejs/lib/ejs.js:703:17)
    at tryHandleCache (/app/node_modules/ejs/lib/ejs.js:274:36)
    at View.exports.renderFile [as engine] (/app/node_modules/ejs/lib/ejs.js:491:10)
    at View.render (/app/node_modules/express/lib/view.js:135:8)
    at tryRender (/app/node_modules/express/lib/application.js:657:10)
    at Function.render (/app/node_modules/express/lib/application.js:609:3)
    at ServerResponse.render (/app/node_modules/express/lib/response.js:1039:7)
    at file:///app/index.js:207:7
    at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5) ```

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.