Skip to content

Configuration

helgeerbe edited this page Jun 3, 2022 · 24 revisions

configuration.yaml

By default, PictureFrame reads its configuration from ~/picframe_data/config/configuration.yaml . To use another file or path you can provide the config file as the first parameter picframe this/leads/to/my/config.yaml. Most parameters have default values if not provided in the config file.

The configuration is divided into different sections:

Viewer

Parameter Default Value Description
blur_amount 12 values larger than 12 will increase processing load considerably
blur_zoom 1.0 must be >= 1.0 which expands the background to just fill the space around the image
blur_edges False use blurred version of image to fill edges - will override FIT = False
edge_alpha 0.5 background colour at edge. 1.0 will show reflection of image
fps 20.0
background [0.2, 0.2, 0.3, 1.0] RGBA to fill edges when fitting
blend_type "blend" choices={"blend", "burn", "bump"}, type of blend the shader can do
font_file "~/picframe_data/data/fonts/NotoSans-Regular.ttf" font used to display any defined text overlay information
shader "~/picframe_data/data/shaders/blend_new"
show_text_fm '%b %d, %Y' format of date values when displayed in text overlay
show_text_tm 20.0 time (seconds) to show any defined text overlay information
show_text_sz 40 text character size
show_text "title caption name date folder location" The content of the text overlay (if any). Can include any combination of: "title", "caption", "name", "date", "location", "folder"
text_justify "L" text justification "L", "C" or "R"
text_bkg_hgt 0.25 (0.0-1.0), percentage of screen height for text background texture, 0 means no background texture
text_opacity 1.0 (0.0-1.0), alpha value of text overlay
fit False shrink to fit screen (i.e. don't crop)
kenburns False Ken Burns motion effect. If True, will set fit->False and blur_edges->False
display_x 0 pixel offset from left of screen (can be negative)
display_y 0 pixel offset from top of screen (can be negative)
display_w null width of display surface (null->None will use max returned by hardware)
display_h null height of display surface (null->None will use max returned by hardware)
use_glx False Set to True on linux with xserver running and no hardware 3d acceleration
mat_images 0.01 True, automatically mat all images. False, don't automatically mat any images. Real value, automatically mat all images whose aspect ratio differs from the display's aspect ratio by more than the specified value.
mat_type null A string containing the mat types to (randomly) choose from when matting images. It can consist of any or all of 'float float_polaroid float_color_wrap single_bevel double_bevel double_flat' (null or '' will use all mat types)
outer_mat_color null Color of the outer mat as an RGB list. null will auto-select a reasonable color from the image itself.
inner_mat_color null Color of the inner mat as an RGB list. null will auto-select a reasonable color from the image itself.
outer_mat_border 75 Minimum outer mat border in pixels
inner_mat_border 40 Minimum inner mat border in pixels (for styles that use it)
outer_mat_use_texture True True uses a texture for the outer mat. False creates a solid-color outer mat.
inner_mat_use_texture False True uses a texture for the inner mat. False creates a solid-color inner mat.
mat_resource_folder "~/picframe_data/data/mat" Folder containing mat image files
show_clock False True shows clock overlay. False does not show clock overlay
clock_justify "R" clock justification L, C, or R
clock_text_sz 120 clock character size
clock_format "%I:%M" strftime format for clock string
clock_opacity 1.0 (0.0-1.0), alpha value of clock overlay
menu_text_sz 40 menu character size
menu_autohide_tm 10.0 time in seconds to show menu before auto hiding (0 disables auto hiding)
geo_suppress_list [] substrings to remove from the location text

Model

Parameter Default Value Description
pic_dir "~/Pictures" root folder for images
deleted_pictures '~/DeletedPictures' move deleted pictures here
no_files_img "~/picframe_data/data/no_pictures.jpg" image to show if none selected
subdirectory "" subdir of pic_dir - can be changed by MQTT
recent_n 7 recent days, when shuffling file change date more recent than this number of days play before the rest
reshuffle_num 1 times through before reshuffling
time_delay 200.0 time between consecutive slide starts - can be changed by MQTT
fade_time 10.0 change time during which slides overlap - can be changed by MQTT
shuffle True shuffle on reloading image files - can be changed by MQTT
sort_cols 'fname ASC' Can be any columns in the table with optional ASC or DESC separated by commas (fname, last_modified, file_id, orientation, exif_datetime, f_number, exposure_time, iso, focal_length, make, model, lens, rating, latitude, longitude, width, height, title, caption, tags, is_portrait, location).
image_attr ['PICFRAME GPS', 'PICFRAME LOCATION', 'EXIF FNumber', 'EXIF ExposureTime', 'EXIF ISOSpeedRatings', 'EXIF FocalLength', 'EXIF DateTimeOriginal', 'Image Model', 'IPTC Caption/Abstract', 'IPTC Object Name', 'IPTC Keywords'] image attributes send by MQTT, Keys are taken from exifread library, 'PICFRAME GPS' is special to retrieve GPS lon/lat, 'PICFRAME LOCATION' is special to retrieve geo reverse (load_geoloc hast to be True)
load_geoloc False get location information from open street map NB if you switch this on (recommended)
geo_key 'this_needs_to@be_changed' then you MUST change the geo_key to something unique to you i.e. use your email address
locale 'en_US.utf8' "locale -a" shows the installed locales which can be used
key_list [['tourism','amenity','isolated_dwelling'], ['suburb','village'], ['city','county'], ['region','state','province'], ['country']]
db_file '~/picframe_data/data/pictureframe.db3' database used by PictureFrame
portrait_pairs False True to display portrait oriented images in pairs. False to display portrait oriented images singly.
log_level 'WARNING' could be 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'
log_file "" for debugging set this to the path to a file. NB logging messages will appended indefinitely so don't forget this. You will need to tidy it up later
use_kbd False Retired with release 2022.01.20. Use peripherals.

MQTT

Parameter Default Value Description
use_mqtt False Set True true, to enable mqtt
server "your_mqtt_broker" No defaults for server
port 8883 default=8883 for tls, 1883 else (tls must be "" then !!!!!)
login "name" your mqtt user
password "your_password" password for mqtt user
tls "/path/to/your/ca.crt" filename including path to your ca.crt. If not used, must be set to "" !!!!
device_id 'picframe' Unique id of device. Change if there is more than one PictureFrame
device_url "" if use_http==True, set url to picframe config page. Must be a valid url, or "" otherwise home assistant runs in an error.

HTTP

Parameter Default Value Description
use_http False Set True to enable http NB THIS SERVER IS FOR LOCAL NETWORK AND SHOULD NOT BE EXPOSED TO EXTERNAL ACCESS
path "~/picframe_data/html" path to where html files are located
port 9000 port used to serve pages by http server < 1024 requires root which is bad idea
use_ssl False
keyfile "path/to/key.pem" private-key
certfile "path/to/cert.pem" server certificate

Peripherals

Additional info could be found in the wiki under peripherals.

Parameter Default Value Description
input_type null default=null, valid options: {null, "keyboard", "touch", "mouse"}
buttons
pause pause/unpause the show
enable True default=True
label "Pause" default="Pause"
shortcut " " default=" "
display_off turn off the display (when off, any input from selected peripheral will turn it back on)
enable True default=True
label "Display off" default="Display off"
shortcut "o" default="o"
location shows or hides location information
enable False default=False
label "Location" default="Location"
shortcut "l" default="l"
exit exit PictureFrame
enable False default=False
label "Exit" default="Exit"
shortcut "e" default="e"
power_down power down the device, uses sudo
enable False default=False
label "Power down" default="Power down"
shortcut "p" default="p"