Package: pi3dpf-ns-pi3dpf-owm
Pre-requisitesRaspberry 3B+ or laterRaspberry Pi OS (32-bit)with desktop and recommended softwareOpenWeatherMapAPI key (free, registration required)InstallationDownload pi3d-pictureframe Debian package from hereInstall pi3d-pictureframe and its dependencies:sudo apt-get update && sudo apt-get full-upgrade # update OS
cd /var/tmp; wget download-url # download debian package to install picture-frame package
sudo apt-get -f install /var/tmp/pi3d-pictureframe_2020.0719.171252-20b0bf4_armhf.deb # install

sudo raspi-config # change raspberry graphic system configuration
1: set gpu_mem=128        (Option 7 > A3 > Enter 128 or 256)
2: enable FAKE KMS driver (Option 7 > A8 > G2)Basic Configuration/home/pi/.pf/pf.configThis is the main configuration file. You want to change the cities, language and units used to display  weather information provided by OpenWeatherMap.Edit the file:vi /home/pi/.pf/pf.config, then add:[DEFAULT]
#find your city ID: http://bulk.openweathermap.org/sample/city.list.json.gz
OWM_CITY_IDS : 2657896:de ; Zurich, Switzerland. Show weather description in German
OWM_UNITS : metric ; use 'metric' for °C or 'imperial' for °F

CEC_CONTROL_TV                 : no ; if you do not wish the TV turns on when picture frame starts
MQTT_SERVER_NAME               : egnor.nyx.net ; use your MQTT server name insteadNotes:on above 'vi' command, use 'i' to insert text, ':wq' the save pf.configpf.config parameter values can be assigned using colon (:) or equal sign (=)comments can be made using hash (#) or semi-colon (;). For in-line comments, always use (;)You may change arbitrary default values by perusing/opt/venvs/pi3d-pictureframe/lib/python3.7/site-packages/pi3dpf/cfg/pf.config, copy parameter names to/home/pi/.pf/pf.configand change their values.Beware using dns names (e.g. egnor.nyx.net) in MQTT_SERVER_NAME. If service does not start after reboot, use IP address instead./home/pi/.pf/pf_secretsThis file holdsyourAPI keys and passwords.pf.configparameters with their values prefixed with!SECRETwill retrieve their effective values frompf_secrets.Example:OWM_API_KEY                    : !SECRET owm_api_key ; origin: pf.configEdit the file:vi /home/pi/.pf/pf_secrets, then add:mqtt_password: mqtt-secret
owm_api_key: register-and-get-your-own-keyNotes:Above example demonstrates how thepf.configparameterOWM_API_KEYis configured to get the valueregister-and-get-your-own-key. All you need to do is adding your API key topf_secrets.you need to supply your ownowm_api_key.changes to/home/pi/.pf/pf.configand/home/pi/.pf/pf_secretstake effect upon application restart.More on mqtt clients and mqtt_password in MQTT section.Starting Picture Frame from the Command LineShould you prefer starting the picture frame using MQTT, skip to the next section.As userpi, onRPi3B+:pi@campero:~ $ source /opt/venvs/pi3d-pictureframe/bin/activate
(pi3d-pictureframe) pi@campero:~/pi3d_demos $ PictureFrame2020.py --help # show available options
(pi3d-pictureframe) pi@campero:~ $ pictureframe.sh -h # show available options from helper script
(pi3d-pictureframe) pi@campero:~ $ pictureframe.sh -a pic-start -r -d /path/to/picturesAs userpi, onRPi4:pi@durin:~ $ sudo su - 
 root@durin:~# source /opt/venvs/pi3d-pictureframe/bin/activate
 (pi3d-pictureframe) root@durin:~# pictureframe.sh -a pic-start -d /path/to/picturesNotes:you may place additional PictureFrame2020.py command line options into/home/pi/.pf/PictureFrame2020.cli_optspicture frame will be started in the background. Usetail -f /home/pi/.pf/logs/PictureFrame2020.logthe check for errors. On rare occasions, checktail -f /home/pi/.pf/logs/PictureFrame2020_mqtt.log.see more convenient means to control picture frame in MQTT sectionsMQTT BrokerFor MQTT to work, you need to connect above MQTT clients to a MQTT message broker. Home Automation software such as Home Assistant, openHAB and others will work but mind the learning curve...You may want to install the MQTT message brokermosquittoon your RPi using the commandsudo apt-get install mosquittoMQTT ClientsThe package pi3d-pictureframe comes with two MQTT clients:The one built intoPictureFrame2020.py, which is enabled by adding the options--mqtt_server MQTT_SERVER,--mqtt_port MQTT_PORT,--mqtt_login MQTT_LOGINand--mqtt_password MQTT_PASSWORDto/home/pi/.pf/PictureFrame2020.cli_opts.The one provided withmqtt-for-pi3dpf.py. This service allows you to control PictureFrame2020.py and additional components, e.g. Hyperion.Themqtt-for-pi3dpf.pyservice can be enabled as follows:sudo systemctl unmask mqtt-for-pi3dpf.service
sudo systemctl enable mqtt-for-pi3dpf.service
sudo systemctl start  mqtt-for-pi3dpf.service
sudo systemctl status mqtt-for-pi3dpf.serviceNote:Above systemctl commands need to be executed after reinstalling or upgrading pi3d-pictureframeIf you wish to always start mqtt-for-pi3dpf.service, executetouch /home/pi/.pf/start.mqtt-for-pi3dpf.service.mqtt-for-pi3dpf.pysubscribes to the following MQTT topics:start/stop the displaying of picturesstart/stop the normal desktopshow list ofstatus and helpChecking log file:tail -f /home/pi/.pf/logs/mqtt-for-pi3dpf.logFurther TopicsSoftwareConfiguration Options on a per Picture Folder Basis and more (not done yet)Home Assistant Integration (not done yet)Image Scrapers (not done yet)HardwareHyperion, Wake up lightPresence detection, temperature and humidity measurement, room brightness sensor (not done yet)CreditsWolfgang Männel for getting me started on pi3d pictureframe on hisweb siteThanks for Paddy Gaunt from the pi3d team for writing PictureFrame2020.py