{"id":23672072,"url":"https://github.com/alpoktem/ritaframe","last_synced_at":"2026-05-08T13:14:54.578Z","repository":{"id":230630231,"uuid":"667023318","full_name":"alpoktem/RitaFrame","owner":"alpoktem","description":"Cloud-based photo frame using Raspberry Pi, Python Flask, PIR motion sensor and Google Photos API","archived":false,"fork":false,"pushed_at":"2024-07-21T14:04:57.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T10:37:29.478Z","etag":null,"topics":["flask","google-photos-api","hobby-project","photo-frame","pir-sensor","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpoktem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-16T11:41:34.000Z","updated_at":"2024-07-21T14:05:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9796f2e-48a1-485f-8664-f60afc10747e","html_url":"https://github.com/alpoktem/RitaFrame","commit_stats":null,"previous_names":["alpoktem/ritaframe"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpoktem%2FRitaFrame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpoktem%2FRitaFrame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpoktem%2FRitaFrame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpoktem%2FRitaFrame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpoktem","download_url":"https://codeload.github.com/alpoktem/RitaFrame/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239693530,"owners_count":19681678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","google-photos-api","hobby-project","photo-frame","pir-sensor","python","raspberry-pi"],"created_at":"2024-12-29T10:38:01.208Z","updated_at":"2025-12-18T10:30:19.689Z","avatar_url":"https://github.com/alpoktem.png","language":"Python","funding_links":["https://www.buymeacoffee.com/alpoktem"],"categories":[],"sub_categories":[],"readme":"\n# RitaFrame - Cloud-based Photo Frame for Raspberry Pi\n\nThis project turns a Raspberry Pi into a dynamic digital photo frame, capable of displaying images live from a Google Photos album on the browser with a Flask-based app. Optionally, it utilizes motion detection to conserve energy, turning the display off when no activity is detected and on when someone is nearby. \n\n### Why RitaFrame?\n\nI created this during my paternity leave so that my parents who live abroad can see the latest photos of their granddaughter on a frame in the living room. I especially wanted to be the one managing the photos, uploading new ones and removing the old ones. To avoid burning the LCD running all day, I attached a motion sensor and a timer module which controls the screen so that the moment my parents walk in the room, the frame gets activated. \n\n## Hardware Setup\n\n- Raspberry Pi (any model with network connectivity)\n- MicroSD card (8 GB or more recommended) with Raspberry Pi OS\n- Power supply for the Raspberry Pi\n- HDMI-compatible display monitor\n- PIR motion sensor\n- Jumper wires (for connecting the PIR sensor to the Raspberry Pi)\n\n### PIR motion sensor setup\n\nPIR sensors come with three pins: GND, OUT and VIN. Use the jumper wires to connect GND to a ground pin (e.g. 6), VIN to a power pin (e.g. 2) and OUT to a GPIO pin (e.g. 11, which is GPIO 17). For further information on GPIO pins [check here](https://randomnerdtutorials.com/raspberry-pi-pinout-gpios/).\n\n## Software Setup\n\n1. **Prepare Raspberry Pi OS**: Flash Raspberry Pi OS onto your microSD card using the [Raspberry Pi Imager](https://www.raspberrypi.org/software/) and boot up your Raspberry Pi.\n\n2. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/alpoktem/RitaFrame.git\n    cd RitaFrame\n    ```\n\n3. **Install Required Packages**:\n\n    Raspberry Pi OS should come with Python3 installed. If not:\n    ```bash\n    sudo apt-get update\n    sudo apt-get install -y python3-pip\n    ```\n\n    To install required Python libraries:\n    ```bash\n    pip3 install -r requirements.txt\n    ```\n4. **Get a Google Photos client secret file**:\n    The photos are pulled from the cloud using Google's [Photos Library API](https://developers.google.com/photos/library/reference/rest). To enable the app accessing your photos, you need to download a credentials file from Google Cloud console. There's a good tutorial to do that [here](https://github.com/polzerdo55862/google-photos-api/blob/main/Google_API.ipynb). \n\n5. **Configure Application**:\n\n    Edit the `config.py` file to set up the path to your Google Photos API credentials, album name, and other configurations like display and transition times. You can also enable and disable the motion detection here. \n\n6. **Run the Application**:\n        For development with debugging:\n    ```bash\n    python3 app.py\n    ```\n     For production:\n     ```bash\n     ./run.sh\n   ```\n    \n    You might need to give run access to run.sh by: \n    ```bash\n    chmod +x run.sh\n    ```\n    \n7. **View the app on browser**:\n\n    Open your browser and direct it to [localhost:8000](http://localhost:8000) to start viewing the photos on loop. \n\n## Autostart Setup\n\nTo have your Raspberry Pi photo frame application start automatically on boot, copy the `autostart` file to `~/.config/lxsession/LXDE-pi`:\n\n```bash\nsudo cp etc/lxboot/chromium/autostart ~/.config/lxsession/LXDE-pi\n   ```\n\nNow, when Raspberry Pi boots up, it will open up Chromium browser on kiosk-mode showing the Flask web app.\n\n## Raspberry Pi Zero setup\n\nI wanted to run this on a Zero but it turned out that it's not able to support Chromium. Looking for a lightweight browser alternative, I found [surf](https://surf.suckless.org/). \n\nTo install:\n\n```bash\nsudo apt-get update\nsudo apt-get install surf\n```\n\nSurf unfortunately doesn't have a kiosk mode like Chromium. But you can put it to full screen using the F11 key. There are two additional files under `etc/surf` to make it boot up smoothly, first running surf once the web app is ready and then putting it on full screen. The autostart script to automate all this can be installed with the command:\n\n\n```bash\nsudo cp etc/lxboot/surf/autostart ~/.config/lxsession/LXDE-pi/autostart\n```\n\n## References\nI got inspired and built on top of the work below:\n\n- [samuelclay/Raspberry-Pi-Photo-Frame](https://github.com/samuelclay/Raspberry-Pi-Photo-Frame)\n- [polzerdo55862/google-photos-api](https://github.com/polzerdo55862/google-photos-api)\n- [Google Photos Library API](https://developers.google.com/photos/library/reference/rest)\n\n## If you like this project\n\n\u003ca href=\"https://www.buymeacoffee.com/alpoktem\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"60\" width=\"220\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpoktem%2Fritaframe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpoktem%2Fritaframe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpoktem%2Fritaframe/lists"}