Read the statement by Michael Teeuw here.
MMM-GooglePhotos
-
As I’ve said in another post, I couldn’t maintain this module anymore.
However, yesterday night, suddenly I got an idea of what happened. (Not tested, and… sorry, I couldn’t test)
Most of MM modules and MM itself are using the same port to communicate internally and externally. I suspect some modules(and even inside logics in a module) were racing to use the port. They had opened and closed the port by their own schedule, which could make this symptom. Connection with Google Server often needs some long time probably.
The solution might be to use a different port not to race. and make the connections not to happen asynchronously. For the performance, I usually used asynchronous attempting to communicate with Google Server, It might make worse that issue.
Well, some modification of source might be needed, but as I’ve said (again), I couldn’t.Anyway, this guess is not confirmed by the test, just an idea.
If someone could get an inspiration, I hope this guess could be a help. -
@Sean makes perfect sense!! I guessed that was Google … I could only offer that much help as I don’t have time to really look at it either.
Thank you for the response and someone with more time could take a peek at it.
-
@Sean thank you. As always I appreciate the efforts you’ve put in. Much of my posting has been throwing out ideas to see what might stick too. I’m not adept enough at js to tackle this myself but may try at some point. I’ve got it logging at almost a line by line level to see if there’s one call that has the problem. I actually got a whole new error today which was weird. I’ll keep posting as I discover anything but please don’t think I’m trying to get you to do something, it’s more for documentation of the problem in hopes that someone can fix it!
-
New error now that I’ve increased logging. Not sure it’s related but it does seem more specific.
Error: getaddrinfo EAI_AGAIN photoslibrary.googleapis.com
Which could be this. https://github.com/googleapis/google-api-nodejs-client/issues/761Popping up at this line (I have a log entry directly before that shows up, and one after that doesn’t)
var response = await this.request(token, 'mediaItems:search', 'post', null, data) -
@gonzonia said in MMM-GooglePhotos:
getaddrinfo EAI_AGAIN
that means your network failed… are u using a pihole for connection security?
seen lots of failures thru pihole…
-
@sdetweil I do but I thought I’d switched the DNS on there to not use it. Apparently not. This new error was likely the result of the update to pihole v5 (need to figure that out separately). Thanks for pointing me in the right direction!
-
@sdetweil It’s interesting. I’m seeing this error now instead of the socket disconnected error. I’ve changed the DNS on the MM to not use the pihole (it’s using Google DNS).
I don’t know why I’m seeing this vs. the other error all of a sudden. I still think it’s hard to blame the network exclusively. I have other modules too that all run fine at the exact same time.
I’ve tried to figure out how to catch the error but I don’t think I can. From what I can tell it’s making the async call and then while waiting for a response it loses the connection for some reason. I’m not skilled enough to re-write try the async queue method referenced in the github post I linked to previously. I’m just hopeful someone who has the same problem might have the skills to fix it or at least catch it better so that the module doesn’t fail completely. (Meanwhile I’ll keep trying to identify what the problem is).
-
@gonzonia i don’t think the referenced issue is the problem, but there is a bunch of work needed to improve error recovery. I don’t KNOW for sure what the problem IS, but looking at the code there is no recovery from it.
-
anybody have any issues with the photos stop changing after a while? i cant figure it out my post
-
I noticed this module is using huge data. Almost downloading more than 3gb/day. My refresh rate is 1.5min per photo. Anyone else noticed this? How can we reduce the data usage? Probably show photos from the cached data instead of downloading every time?
-
@soubhik-khan I went over the code last month for some not refreshing problem. and it does build and use a local cache.
how big are the pictures? and how many are there?
at 1 mb each for 960 pics, it could be 1gb in a day
-
@sdetweil yes you are right, I think I found the issue. Its not this module. There is something else on the pi hijacking my bandwidth! its insane ~ 24GB is last 24 hours!

I was about the do a clean install but then I thought I will just remove the unused folders first! I guess its from pocketshhinx or sphinxbase, I had installed some of those voice assistant modules! I removed those two folders and looks like now the data usage is back to normal. Will monitor for a day, if this doesnt help, will need to do a clean install
-
I am currently using this module to display one album that has 5 photos in it. I have it set to change the photo every 15 seconds. For some reason once it gets to the 5th photo, it only displays for barely 1 second and then starts from the beginning again. Any suggestions on how to fix this so that the last photo will display as long as the others?
-
@celliott I don’t know for sure but there is debugging info available
edit the node_helper.js
and add
debug:true,between these two lines
module.exports = NodeHelper.create({ start: function()then stop mm, pm2 stop all if using pm2
then
cd ~/MagicMirror npm start >somefile.txtwait til u see the error
then ctrl-c on the mm terminal window
(alt-spacebar, n to.minimize mm screen if you didn’t use ssh) -
For those just joining, I was able to get this to work using the Google OAuth desktop option and the V2 token generator that hermanho made at the link below
-
@orayoflighto awesome thanks guys but some of us are really dumb and I can’t figure this out. No new get token no matter how hard I try and I don’t know how to do it on my local pc… If I copy the file over I get the following 
-
@orayoflighto i tried to do this but i am too dumb, how do i clone on local pc ? and when i do put v2 in folder and node i get this error

-
@megagprime to get a pull request
in the existing module folder do
git fetch origin pull/#/head:local_branch_name
replace # w 146
and pick a name for branch namethe when that completes (no message)
do
git checkout whatever name u usednow your photos module is using the pull request version
then the normal instructions should work
edit : shows what u get for not checking and trusting some ‘now old’ post on the internet!
-
@sdetweil admin@raspberrypi:~/MagicMirror/modules/MMM-GooglePhotos $ pull/<145>/head:< g2 >
bash: syntax error near unexpected token `145’ -
@megagprime no <>
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
