Smartdisplay is a personal DIY project aimed at creating a smart display that showcases pictures from a network storage. The project consists of a server component, which provides an endpoint to serve pictures, and a client component, which displays these pictures on a screen.
The server component is responsible for serving pictures from a network storage. It provides an endpoint that the client can use to fetch the pictures. The server is built using Python and can be set up using Ansible scripts provided in the repository.
The Godot client is a graphical application that displays the pictures fetched from the server. It is built using the Godot game engine and includes various scenes and scripts to manage slide transitions, animations and user input. The client can be configured to connect to the server and display the pictures on a screen.
In my personal setup, the Godot Client is running on a Raspberry Pi with Touchscreen.
Please note there is no kind of authentication implemented in Python Server, furtermore it's running with Flask internal Development Server without using an external Application Server. Ensure to only run this in a secure environment.
Due to licensing issues, I didn't add any assets to the repository. Most of used assets are created by LimeZu.
To run this project, you will need the following:
- Python 3
- Ansible
- A bunch of picture to show
- Godot Engine 4.3 or higher
- Existing Ansible setup with inventory
- A device to run the client (e.g. Raspberry Pi with Touchscreen)
-
Clone this repository and cd into it.
-
Add server or group with name
smartdisplay_server
for target server andsmartdisplay_godot_client
for target client.
-
Open the project in the Godot editor.
-
Go to
Project
->Export...
. -
Click on
Add...
to create a new export preset if needed. -
Configure the export settings for your target platform (e.g., Linux, Windows, etc.).
-
Set the necessary options for the export preset, such as the output path and executable name. Output path must be
ansible/roles/install-godot-client/files/smartdisplay.arm32
to export the binary to the correct folder. -
Click on
Export Project
to build the client.
-
Edit
ansible/roles/install-server/vars/main.yml
and adaptsmartdisplay_client_path
if you would like to change installation directory. -
Copy and edit the sample configuration files:
cp ansible/roles/install-server/vars/main_sample.yml ansible/roles/install-server/vars/main.yml cp ansible/roles/install-server/files/picture_paths_sample.txt ansible/roles/install-server/files/picture_paths.txt
-
Edit
main.yml
andpicture_paths.txt
to match your setup. -
Run the Ansible playbook to set up the server and client:
ansible-playbook -i /path/to/your/ansible/inventory ansible/ansible_playbook.yml
-
cd into your installation directory.
-
Create a virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
source .venv/bin/activate
-
Install the required Python packages:
pip3 install -r requirements.txt
-
Start the server:
python3 server.py
-
Run the binary (default: /usr/local/bin/smartdisplay.arm32) once and close it again using ESC.
-
This will create default config file in Godot app userdata directory. See Godot docs for details, in my case it's located at
~/.local/share/godot/app_userdata/smartdisplay-godot-client/smartdisplay.cfg
-
Open
smartdisplay.cfg
and updatepicture_provider_url
in section[Smartdisplay]
. -
That's it! Run the application and enjoy your pictures.
- archive/version2: This version is basically just a python script which provides an endpoint to provide pictures and an HTML file which is using this endpoint to show pictures.
- archive/version1: This version is using quite a lot of technologie to implement such a simple thing like a smart display. I'm not using it anymore, but it was fun to create it and learn all those things.
- There were earlier versions available but those have never been published.