pibooth / pibooth-google-photo

Pibooth plugin to upload pictures on Google Photos
GNU General Public License v3.0
8 stars 4 forks source link

Google photo is not working #17

Closed JoostNuyttens closed 2 years ago

JoostNuyttens commented 2 years ago

Sorry for writing this but I don't really know how the google API is working. I followed the description "Grant secure access' to optain the credential file where I'm refering to in the config file. I also have a folder on google photos with a shared album but the pictures I take are only saved locally on a USB key. Is there anything I must do and that is not described?
I would like to have this pibooth as a surprise for my daughters wedding. Thanks a lot for any help.

Config file:

[GOOGLE]

Album where pictures are uploaded

album_name = pibooth

Credentials file downloaded from Google API

client_id_file = ~/Documents/credentials.json

Pibooth :

pb@pb:~ $ pibooth pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html pygame-menu 4.0.7 [ INFO ] pibooth : Installed plugins: qrcode-1.0.2, picture-template-1.0.0, google-photo-1.2.3 [ INFO ] pibooth : Starting the photo booth application on Raspberry pi 3B+ [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (1824) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory. [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (914) open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ INFO ] pibooth : Configuring Picamera camera ... [ WARNING ] pibooth : No printer configured in CUPS (see http://localhost:631)

sravel commented 2 years ago

Hello, can you tried without # before [GOOGLE] on your configuration file Like:

[GOOGLE]

# Album where pictures are uploaded
album_name = Pibooth

# Credentials file downloaded from Google API
client_id_file = ~/Documents/credentials.json

is the raspberry pi well connected to the internet?

JoostNuyttens commented 2 years ago

Hello thank you for your reply. I appreciate it very much! Already one step closer :-). I have the following message when pibooth is started 👍

pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html pygame-menu 4.0.7 [ INFO ] pibooth : Installed plugins: qrcode-1.0.2, picture-template-1.0.0, google-photo-1.2.3 [ INFO ] pibooth : Starting the photo booth application on Raspberry pi 3B+ [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (1824) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory. [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (914) open OpenCV | GStreamer warning: unable to start pipeline [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created [ INFO ] pibooth : Configuring Picamera camera ... [ WARNING ] pibooth : No printer configured in CUPS (see http://localhost:631) [ INFO ] pibooth : Initialize Google Photos connection Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=1009544968590-oh3kr5ggt50m0ofklhdm4pdvth63s6fp.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A40735%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fphotoslibrary.sharing&state=dMlNUfon70jxTX7NaJfgU5rKcC5GQd&access_type=offline ......

When put that link in my browser I get the message that "google didn't verify the app" and it brings me to the Google OAuth consent screen. Is it necessary to do something over there or did I already changed so much settings by trying before that I better start over again?

Thanks again,

Joost

sravel commented 2 years ago

As the application is not developed by google, it is necessary to validate access to the Photos API. It is therefore necessary to follow the validation steps, by ticking the photo access. It is normal to also receive a "Security Alert" email from google which mentions "Pibooth now has access to your Google account. If you are not the origin of this authorization, we advise you to check this activity and to secure your account."

JoostNuyttens commented 2 years ago

Hello Christian,

It is working! Thanks a lot. Have a great Sunday. Ça marche! Merci beaucoup. Bon weekend.

Met vriendelijke groeten, Cordialement, Best regards, Mit freundlichen Grüßen,

Joost Nuyttens Bestuurder

Hugo Verrieststraat 28, 8790 Waregem – Belgium T +32 56 60 43 48 | M +32 475 68 69 43

[Afbeelding met klok, object, monitor, scherm Automatisch gegenereerde beschrijving]http://www.nuyttensautomatisatie.be/ Your partner in industrial automation ELECTRICAL DESIGN - PANEL CONSTRUCTION - MACHINE & PROCESS CONTROL­­ WEB BASED VISUALISATION & DATA LOGGING - ROBOT & COBOT APPLICATIONS

[Afbeelding met schermafbeelding, hand, speler, vasthouden Automatisch gegenereerde beschrijving]http://www.tact-software.be/

Van: RAVEL Sébastien @.> Verzonden: woensdag 8 juni 2022 9:16 Aan: pibooth/pibooth-google-photo @.> CC: Joost Nuyttens @.>; Author @.> Onderwerp: Re: [pibooth/pibooth-google-photo] Google photo is not working (Issue #17)

As the application is not developed by google, it is necessary to validate access to the Photos API. It is therefore necessary to follow the validation steps, by ticking the photo access. It is normal to also receive a "Security Alert" email from google which mentions "Pibooth now has access to your Google account. If you are not the origin of this authorization, we advise you to check this activity and to secure your account."

— Reply to this email directly, view it on GitHubhttps://github.com/pibooth/pibooth-google-photo/issues/17#issuecomment-1149551651, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD5RNHKZQLASHAN5ZFKM6YLVOBCELANCNFSM5YAARFWA. You are receiving this because you authored the thread.Message ID: @.**@.>>