Read the statement by Michael Teeuw here.
MMM-GooglePhotos
-
@Sean Thank You. Will learn up on this and see if I can do it myself
-
Brilliant module - thanks for the development.
I am trying to get two instances of this module running on one magic mirror, so I can show one photo at the top and one at the bottom.
I have copied the module into a different folder, renaming it (and in the CSS files as necessary). I also set up a separate google API project and separate authorisation to see if that was an issue.
Both modules run, but the photos get loaded one on top of the other despite having different positions:
modules: [ { module: "MMM-GooglePhotos", position: "top_center", config: { albumId: "blanked for posting", // your album id(s) from result of `auth_and_test.js` refreshInterval: 1000*20, scanInterval: 1000*60*10, // too many scans might cause API quota limit also. //note(2018-07-29). It is some weird. API documents said temporal image url would live for 1 hour, but it might be broken shorter. So, per 10 min scanning could prevent dead url. sort: "random", //'time', 'reverse', 'random' showWidth: "800px", // how large the photo will be shown as. (e.g;'100%' for fullscreen) showHeight: "400px", originalWidthPx: 1024, // original size of loaded image. (related with image quality) originalHeightPx: 728, // Bigger size gives you better quality, but can give you network burden. mode: "hybrid", // "cover" or "contain" (https://www.w3schools.com/cssref/css3_pr_background-size.asp) //ADDED. "hybrid" : if you set as "hybrid" it will change "cover" and "contain" automatically by aspect ratio. } }, { module: "MMM-GooglePhotos2", position: "bottom_left", config: { albumId: "blanked for posting", // your album id(s) from result of `auth_and_test.js` refreshInterval: 1000*15, scanInterval: 1000*60*10, // too many scans might cause API quota limit also. //note(2018-07-29). It is some weird. API documents said temporal image url would live for 1 hour, but it might be broken shorter. So, per 10 min scanning could prevent dead url. sort: "random", //'time', 'reverse', 'random' showWidth: "1024px", // how large the photo will be shown as. (e.g;'100%' for fullscreen) showHeight: "728px", originalWidthPx: 1024, // original size of loaded image. (related with image quality) originalHeightPx: 728, // Bigger size gives you better quality, but can give you network burden. mode: "hybrid", // "cover" or "contain" (https://www.w3schools.com/cssref/css3_pr_background-size.asp) //ADDED. "hybrid" : if you set as "hybrid" it will change "cover" and "contain" automatically by aspect ratio. } }, ] };
Any ideas where I have gone wrong? Thanks!
-
@mirrorman2
Each instance would be rendering different doms but they have same “Id”. That would make this behavior. Sorry, I haven’t considered duplicated instances on development.
If you want duplicated instances, modify source where “id” is used.
By example;
wrapper.id = “GPHOTO” -
This post is deleted! -
@stephaniesal
Is there any error or suspicious log message on execution? Without log, I cannot guess what happened. -
This post is deleted! -
Hi there,
is it possible just to show the last three images of the given album ? And moreover is there any chance to display the comments which belongs to the photo ? -
- Cannot limit the number currently. And I thought, If you want just a few pictures, you’d better to store your photos locally and to display them with other local-based module.
The better way I think is, to create new album for selected photos and use it. - There is no API to get comment. Sorry.
- Cannot limit the number currently. And I thought, If you want just a few pictures, you’d better to store your photos locally and to display them with other local-based module.
-
Thank you for making this great module and a very a good set of instuctions. I am struggling with the last step.
I run the
node auth_and_test.js
and it opens the browser windows asking me to login. I proceed to do that, go through my 2FA and then land on a page which is asking me to select a google account form a list of 1 (just my account). Clicking my account just redirects me back to the same exact page. Have you seen this issue before? Any idea on how to fix this? -
@redink Somebody has same issue. Copy the URL and use another browser. (Or another device - like your dev pc). I think it could be some kind of cookie issue.