Introduction: Photobooth Pro Weeding Raspberry Pi

About: 🔩Maker Arduino Raspberry. 🇫🇷🇬🇧 🖨️3D Print and design creation ! 🖨️ ☕My STL design ; https://cults3d.com/fr/utilisateurs/diyfunproject 📲FULL WEBSITE : …

Another Rapsberry Photobooth ? Yes and no ! in this tutorial i cover many features that i haven't seen in any project project yet !

I will go through classic install and also :

How to implement telegram and google api in detail, how to make a complete borderless full screen and a nice mounting design for cheap price !


I use the great project pibooth which look likes the more accomplished from all the project i saw.

Supplies

Our shopping list :

-Raspberry pi (any version)

-Canon SELPHY CP1300 ( Here list of supported/compatible camera for Gphoto2)

-Touchsreen

-2 press button (optional)

-Reflex - Canon EOS 100D - Noir + Objectif EF-S 18-55 mm f/3,5-5,6 III or PICAM [some webcam may also work]

-SD card 8G0

Step 1: Mounting

Firt step i connect everything tho the PI (camera,printer,touchscreen)

i also added 2 button before the way the software work on the touchscreen can be sometime confusing but it's optional you can use either

The button pin are set as it in the code so it will work once connected


Step 2: BOX Mounting

I did some basic craft , i bought a planch of wood cut it and put the camera at the right height .

I then put everything inside camera printer touchscreen and did the hole for everything !



Step 3: Setup Raspberry

how to Install OS on the SD card:


i would recommend to use raspberry pi imager as it is easy to use and you can automatically setup wifi

-Select the OS (Raspbian) then select the storage (SD Card)

-Click on the gear icon , you just need to tick the box and your wifi will be pre configure


Once done either connect on you administration box to know the IP or use Ip scanner

Now that you have the IP connect whith Putty with the username and password

Step 4: Install Pibooth

How to install pibooth :

We will update the system and installing the pibooth


Upgrade all installed software:

sudo apt-get update
sudo apt-get full-upgrade

Install SDL2 (and extras) which is required by pygame 2+:

sudo apt-get install libsdl2-*

Optionally install the last stable gPhoto2 version (required only for DSLR camera):

wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/gphoto2-updater.sh
wget https://raw.githubusercontent.com/gonzalo/gphoto2-updater/master/.env
chmod +x gphoto2-updater.sh
sudo ./gphoto2-updater.sh

Optionally install CUPS to handle printers (more instructions to add a new printer can be found here ):

sudo apt-get install cups libcups2-dev

Optionally install OpenCV to improve images generation efficiency or if a Webcam is used:

sudo apt-get install python3-opencv

Install pibooth from the pypi repository:

sudo pip3 install pibooth[dslr,printer]

Hint

If you don't have gPhoto2 and/or CUPS installed (steps 5. and/ or 6. skipped), remove printer and/or dslr under the []


We will have few extra package but everything wil be compatible either using DLSR camera ou pi camera

(everything is install under pi user)


note : I will use VIM in this tutorial but nano work just replace in command

Step 5: Testing and Configure

First photo test and configration :

Now you pibooth should be up and running

Make few test open a consol on the pi (no ssh) send:

pibooth


Make sure your camera is connected , and you should be able to take picture from the pi directly


Customize photobooth :


We can start personnalizing our photobooth I will go through few options as most of them are pretty explicit

vim .config/pibooth/pibooth.cfg

Background Image:

Lets configure the final image background

vim .config/pibooth/pibooth.cfg

In picture Section

[PICTURE]

# Background RGB color or image path (list of tuples or quoted paths accepted)
#backgrounds = (255, 255, 255)

I replace with

# Background RGB color or image path (list of tuples or quoted paths accepted)
backgrounds = /home/pi/Pictures/b.jpg


my picture is saved in Pictures folder , if you have issue remove the ".jpg"


Change the screen interface background:

It work the same but we will change the background of the pibooth

[WINDOW]

before

# Background RGB color or image path
background = (0, 0, 0)

after

# Background RGB color or image path
background = /home/pi/Pictures/b.jpg


Display the date on picture:

[PICTURE]

# Secondary text displayed

footer_text2 = {date}



Step 6: Printer Setup

How to configure the printer


If you prefer video : https://www.youtube.com/watch?v=nCcTX7C7kwA&ab_channel=CarolineDunn


The printer packages are already install just need to configure

I have used the Canon SELPHY CP1300 but won't recommend it if you use this project for weeding or long party

You can fill the printer only with 15page so you will have to change it very often .

( I haven't found an official website with supported printer for raspberry but you can use any printer you want that is supported by CUPS )


Add the user "pi" to the group authorized to print "lpadmin". In terminal type:

sudo  usermod  -a  -G  lpadmin  pi


Open the Internet browser by clicking on the blue globe icon at the top left of the taskbar. In the URL bar, enter the following address:


http://127.0.0.1:631

Then press ↵ Enter. This will open the CUPS configuration page in your browser.

Click the Administration tab. Then click Add Printer. You will be prompted to enter your username and password.


The default username is piand the default password is raspberry unless it has been previously changed.


Select your printer from the list of local printers and click Continue. Ignore the VNC remote printer and don't worry if your printer is listed twice.


Rename your printer to something easy to remember and simple to type. In the example shown, we'll rename the default printer Sony_UP-DR200 to just SonyUP to make it easier to remember and type. You can also enter a location tag if you wish. In this example, we'll enter photobooth as the location. Then click Continue.


Select the printer driver for your printer brand and model. Then click Add Printer.


Select the default setting print meters you prefer on this printer. If you don't know what a particular setting does, it's best to leave it alone. The most important setting is to make sure the media size matches the paper size you are currently using. Then click on Set default options. You should see a confirmation page that says "The default options for printer 'YourPrinterName' have been set successfully." This will then redirect you to the main printer status and task page.



Credit : wikihow

Step 7: Plugin Telegram

Telegram plugin

With this plugin you will get all the picture taken in you telegram channel ( you can add people to this channel also):

pip install pibooth-telegram-upload
sudo reboot


Below are the new configuration options available in the pibooth configuration

If you don't have in vim .config/pibooth/pibooth.cfg you can copy paste it

[Telegram]

# Telegram bot token
telegram_token =

# Chat/Channel id
telegram_chat_id =

# Message to show when sending the picture
telegram_message =


Telegram bot token :

-open this link :https://t.me/botfather

-Then start a chat with BotFather by clicking on the “Start” button. Then type “/newbot” to create a new bot. You must then give your bot a name (be careful, it will be visible to your customers when they contact you via Telegram)

-You then receive the token needed to configure Telegram in ChayAll


Chat/Channel ID:

-open this link : https://botostore.com/c/getmyid_bot/

-Click on start and you will get the chat ID


It should look like something similar to this :


# Telegram bot token
telegram_token = 5814382377:EETb4mAxNIS55wtDtgfghx7sYGFi06pWjOU
# Chat/Channel id
telegram_chat_id = -884361449


Step 8: Plugin Google API

Google photo plugin :

It will be similar process as telegram


pip3 install pibooth-google-photo
sudo reboot


Below are the new configuration options available in the pibooth configuration:


If you don't have in vim .config/pibooth/pibooth.cfg you can copy paste it

[GOOGLE]

# Album where pictures are uploaded
album_name = Pibooth

# Credentials file downloaded from Google API
client_id_file =


How to configure:

-Go to Google Photos Library API and click on Enable the Google Photos Library API.

-Enter a project name (for instance pibooth) and click on NEXT.

-Enter a text to be displayed on user consent page when you will start pibooth with pibooth-google-photo enabled for the first time (for instance Pibooth) and click on NEXT.

-Select the application type: Desktop app.and click on CREATE.

-Download the credential file, save it somewhere accessible by pibooth and click on DONE.

-The file should be named credentials.json


-Once download i recommend using WINscp put the fle in any folder

( after uploaded i move the file to /usr/local/lib/python3.9/dist-packages/credentials.json )

-It look like this :


[GOOGLE]
# Album where pictures are uploaded
album_name = Pibooth
# Credentials file downloaded from Google API
client_id_file = /usr/local/lib/python3.9/dist-packages/credentials.json


Now at the next launch of pibooth allow to use Google Photos in the opened web browser window.



Step 9: TIPS

There few details to make the experience even better with less work to do next time you use pibooth

Hide taskbar :

Right-click on the taskbar and select "Panel Settings". Click on the "Advanced" tab, and check "Minimize panel when not in use".


Remove border from pibooth:


First i will advice to make it autostart :


vim .config/pibooth/pibooth.cfg

# Start pibooth at Raspberry Pi startup
autostart = True


and also fullscreen:

[WINDOW]
# The (width, height) of the display window or 'fullscreen'
size = fullscreen


Then borderless:

vim /etc/xdg/openbox/lxde-pi-rc.xml

The section application should look like below (make a backup of the file before)

<applications>
<application name="*">
<skip_taskbar>yes</skip_taskbar>
<layer>above</layer>
</application>
<application name="*" type="dock">
<layer>below</layer>
</application>
<application class="*">
<decor>no</decor>
</application>
</applications>



Remove screen sleep (See photo);

You can get to this menu by clicking the raspberry icon in the top-left corner .

With the start menu opened, you need to hover over the “preferences” option near the bottom of the menu .

Finally, click the “Raspberry Pi Configuration” option


With the Raspberry Pi Configuration menu opened, you will need to first change to the “Display” tab

Within this tab, you should see the option named “Screen Blanking“, click the “Disabled” button next to the option

Once the option is disabled, click the “Ok” button to apply the change


If you use DLSR camera you should do the same and also for the printer.


Change the Text display on screen:

 vim /home/pi/.config/pibooth

reboot can be necessary

Step 10: Conclusion

It it a great poject and extremly to get started as everything is moslty plug and play . There is also a lot of plugin and settings to play with , i haven't tested everything but will update the topic when i get into it !

If you have tested other plugin or have idea of improvement please share :)