Display your photos from album of Google Photos on MagicMirror².
{
module: "MMM-GooglePhotos",
position: "top_right",
config: {
albums: [], // Set your album name. like ["My wedding", "family share", "Travle to Paris"]
updateInterval: 1000 * 60, // minimum 10 seconds.
sort: "new", // "old", "random"
uploadAlbum: null, // Only album created by `create_uploadable_album.js`.
condition: {
fromDate: null, // Or "2018-03", RFC ... format available
toDate: null, // Or "2019-12-25",
minWidth: null, // Or 400
maxWidth: null, // Or 8000
minHeight: null, // Or 400
maxHeight: null, // Or 8000
minWHRatio: null,
maxWHRatio: null,
// WHRatio = Width/Height ratio ( ==1 : Squared Photo, < 1 : Portraited Photo, > 1 : Landscaped Photo)
},
showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended.
showHeight: 1920,
timeFormat: "YYYY/MM/DD HH:mm", // Or `relative` can be used.
}
},
albums
Now this module can access not only your owns but also shared. You can specify album title like this.
albums: ["My wedding", "family share", "Travle to Paris", "from Tom"],
updateInterval
updateInterval
is 10 seconds. Too often update could makes API quota drains or network burden.sort
new
, old
, random
are supported.uploadAlbum
GPHOTO_UPLOAD
notification.this.sendNotification("GPHOTO_UPLOAD", path);
create_uploadable_album.js
.node create_uploadable_album.js MyMagicMirrorAlbum
MMM-Selfieshot
and MMM-TelegramBot
can upload their pictures through this feature.condition
fromDate
: If set, The photos which was created after this value will be loaded. (e.g: fromDate:"2015-12-25"
or fromDate:"6 Mar 17 21:22 UT"
)toDate
: If set, The photos which was created before this value will be loaded. (e.g: toDate:"Mon 06 Mar 2017 21:22:23 z"
or toDate:"20130208"
)fromDate
and toDate
.minWidth
, maxWidth
, minHeight
, maxHeight
: If set, the photos have these value as original dimensiont will be loaded. You can use these values to avoid too big or too small pictures(like icons)minWHRatio
, maxWHRatio
: With these values, you can get only portrait photos(or landscaped, or squared)width / height
. So =1
will be squared dimension. >1
will be landscaped. <1
will be portrait.condition: {
fromDate: "2018-01-01", // I don't want older photos than this.
minWidth: 600, // I don't want to display some icons or meme-pictures from my garbage collecting albums.
maxWHRatio: 1, // I want to display photos which are portrait.
}
showWidth
, showHeight
timeFormat
relative
to show more humanized.debug
autoInfoPosition
true
: automatically change position to each corner per 15 minutes.false
: not using.[top, left, bottom, right]
autoInfoPosition: true, // or false
// User custom callback
autoInfoPosition: (album, photo)=> {
return ['10px', '10px', 'none', 'none'] // This will show photo info top-left corner.
}
css/custom.css
.#GPHOTO_INFO {
display: none;
}
css/custom.css
.#GPHOTO_INFO {
top: 10px;
left: 10px;
bottom: inherit;
right: inherit;
}
css/custom.css
.#GPHOTO_BACK {
display: none;
}
css/custom.css
.#GPHOTO_CURRENT {
background-size: cover;
}
css/custom.css
.#GPHOTO_CURRENT {
background-size: contain;
}
clock
more clearly on showing in fullscreen_below
: Add this into your css/custom.css
..clock {
padding: 10px;
background-color: rgba(0, 0, 0, 0.5);
}
@keyframes trans {
from {opacity: 0}
to {opacity: 0.5}
}
#GPHOTO_CURRENT {
background-size:cover;
opacity:0.5;
}