-
Notifications
You must be signed in to change notification settings - Fork 10
Configuration
There are at least three ways:
- Using a Raspberry Pi single board computer
- Use the self-o-mat Base System
- Start with a fresh Raspberry Pi OS installation
- Using your Linux machine (laptop, desktop, etc.)
Cross reference: Hardware#computers.
- Load the image on an SD card and put it back into the Raspberry Pi
- Boot the Raspberry Pi and follow the configuration guide (localization, password, WiFi, etc.)
- Install software updates
- Optionally run
raspi-configto adjust the configuration (e.g. change the hostname, enable SSH for remote access, etc.), reboot - tbc
-
CAMLIBSenvironment variable related to libgphoto2 and/or gphoto2 (the script./start.shsets it to./libsbut that folder does not exist after cloning and building; not sure if this is really required); accessed byGphotoCamera::start()
-
/opt/.selfomat.type: has<box_type>as its contents (is read during run-time) -
./settings/: holds multiple JSON files-
<box_type>.json:- setup-specific settings are stored in this JSON file; at startup the code tries to open the JSON file with where
box_typeis initialized to a hard-coded default value during compile-time but can be replaced by the contents of/opt/.selfomat.type(see above) - settings inside the file are:
camera_type,has_flash,has_button,disable_watchdog,debug,button_port_name,image_dir,show_led_setup,force_image_dir_mountpoint,fullscreen.- You need to give a valid
image_dirand specify whether it needs to be a mount point or not viaforce_image_dir_mountpoint(<HOME>/<USERNAME>/Picturesis a possibility).
- You need to give a valid
- setup-specific settings are stored in this JSON file; at startup the code tries to open the JSON file with where
-
- inside
<HOME>/-
.selfomat_settings.json:- settings:
trigger_counter,storage_enabled,printer_enabled,template_enabled,flash_enabled,show_agreement,filter_choice,filter_gain,debug_log_enabled,autofocus_before_trigger,frontend_language_choice) - acessed by
BoothLogic::readSettings()andBoothLogic::readSettings() -
BoothLogic::readSettings()tries to read settings from this file and otherwise (if the file does not exist) uses hard-coded default values -
BoothLogic::readSettings()tries to write this file
- settings:
-
- internationalization ("i18n") is controlled by the files in
./i18n- related:
frontend_language_choiceas set in.selfomat_settings.json(see above) set the frontend language -
[de|en|fr]_frontend.json: language definition files (German/English/French) for the photo booth's screen UI -
[de|en.json]: language definition files (German/English) for the browser accessible settings app
- related:
Templates basically provide an overlay over the photo printouts. The idea is that you can frame the picture or overlay the final picture with a company logo. In order to create a template, you simply need to create a PNG frame with a transparent region. The photo booth software will detect the transparent region and insert the image there. Note that the image will be scaled in such a way that it's not stretched but covers the whole area.
Example:
An empty template image can be found here (1864 x 1228 pixels).
There are currently four template files:
-
/.template.png(accessed byImageProcessor::loadTemplateImage()) -
/.template_screen.png(accessed byImageProcessor::updateTemplate()andBoothGui::reloadTemplate()) -
/.template_props.json(accessed byImageProcessor::loadTemplateImage()andImageProcessor::updateTemplate()) -
/.template_screen_props.json(accessed byImageProcessor::updateTemplate()andBoothGui::reloadTemplate())
All 4 files will be created by the software as soon as a template is uploaded using the website.
The two .png files are the images: /.template.png is the full resolution template, the template_screen.png is the template scaled down for the user interface. This allows faster rendering since we don't need to scale it later.
The two _prop.json files contain the rectangle where the image needs to be inserted in pixel coordinates. Again there is a file for the final print file as well as for the low resolution screen preview.
Covers both /.template_props.json and /.template_screen_props.json.
Expected properties: offset_x, offset_y, offset_w, offset_h
The self-o-mat software provides a configuration website via built-in web server. The web server uses port 9080, i.e. it can be accessed using the URL http://<IP>:9080 or http://localhost:9080 on the local machine.
The interface between the web server and the standalone photo booth application is Protocol Buffers (Protobuf) - a free and open-source cross-platform data format used to serialize structured data. The message definitions can be found in ap.proto.
Settings changes made via the web server applied to the standalone photo booth application are applied instantly since the web server directly calls C++ functions. All settings are stored on photo booth power off.
CUPS (formerly an acronym for Common UNIX Printing System) is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. It also provides a web interface. It can be accessed using the URL http://<IP>:631 or http://localhost:631 on the local machine.