{"id":14977954,"url":"https://github.com/mimiflynn/rpi-timelapse","last_synced_at":"2025-10-28T07:31:18.954Z","repository":{"id":49682689,"uuid":"74580606","full_name":"mimiflynn/rpi-timelapse","owner":"mimiflynn","description":"Flask app for Raspberry Pi Camera Python API that can create time lapses ","archived":false,"fork":false,"pushed_at":"2023-05-01T20:15:13.000Z","size":23762,"stargazers_count":11,"open_issues_count":11,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T12:44:12.547Z","etag":null,"topics":["flask","python","raspberry-pi-3","raspberry-pi-camera"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mimiflynn.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":"2016-11-23T13:44:30.000Z","updated_at":"2023-04-16T13:20:25.000Z","dependencies_parsed_at":"2024-09-23T23:30:58.127Z","dependency_job_id":"6bd3de99-0f39-4f07-b38c-4d5e3885cfa5","html_url":"https://github.com/mimiflynn/rpi-timelapse","commit_stats":{"total_commits":111,"total_committers":3,"mean_commits":37.0,"dds":0.036036036036036,"last_synced_commit":"6e609d6be379614202de54cd4dd7c3c44d2dbc09"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiflynn%2Frpi-timelapse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiflynn%2Frpi-timelapse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiflynn%2Frpi-timelapse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimiflynn%2Frpi-timelapse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimiflynn","download_url":"https://codeload.github.com/mimiflynn/rpi-timelapse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238614432,"owners_count":19501458,"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","python","raspberry-pi-3","raspberry-pi-camera"],"created_at":"2024-09-24T13:56:35.956Z","updated_at":"2025-10-28T07:31:16.958Z","avatar_url":"https://github.com/mimiflynn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Zero Timelapse\n\n![timelapse](https://github.com/mimiflynn/rpi-timelapse/blob/master/result.gif)\n\n## Tech Stack\n\n- Python 3.4\n- Flask\n- ImageMagick\n- Raspberry Pi 3\n- Raspberry Pi Camera\n\n## Startup\n\nFor GIF making magic install ImageMagick with `sudo apt install imagemagick`.\n\n`python3 manage.py`\n\n## Objective\n\nTrigger timelapse capture from my phone via password protected website.\n\n## Deploy\n\n### Create directories\n\n```buildoutcfg\nmkdir picam/client/static/{archive,gifs,images,timelapse}\n```\n\n### systemd\n\n`/etc/systemd/system/photos.service`\n\n```buildoutcfg\n[Unit]\nDescription=Gunicorn instance to take timelapses\nAfter=network.target\n\n[Service]\nUser=pi\nGroup=www-data\nWorkingDirectory=/home/pi/Projects/Photos\nExecStart=/usr/local/bin/gunicorn --workers 3 --timeout 999 -k gevent --threads 12 --bind unix:photos.sock -m 007 wsgi:app\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```buildoutcfg\nsudo systemctl status photos.service\n\nsudo systemctl start photos.service\n\nsudo systemctl stop photos.service\n```\n\n\n### nginx\n\n`/etc/nginx/sites-available/default`\n\n```buildoutcfg\nupstream flask_server {\n        # swap the commented lines below to switch between socket and port\n        server unix:/home/pi/Projects/Photos/photos.sock fail_timeout=0;\n        # server 127.0.0.1:5000 fail_timeout=0;\n}\nserver {\n\tlisten 2002;\n\tserver_name domain-name-of-yours.com;\n\n\t# Set up proxy for app\n\tlocation / {\n\t    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header Host $http_host;\n            proxy_redirect off;\n\n\t    include proxy_params;\n\t    proxy_pass http://flask_server;\n\t}\n\t\n\t# Configure NGINX to deliver static content from the specified folder\n    location /static {\n       alias /home/pi/Projects/Photos/picam/client/static;\n    }\n}\n```\n\n\n## End Points\n\n`/` - takes a photo and displays it\n\n`/view` - view all single photos\n\n`/timelapse` - takes 50 photos with a 5 second delay\n\n`/gif` - create gif from last timelapse\n\n`/animations` - view all timelaps gifs\n\n`/archive` - contains list of zipped up timelapse images\n\n## References\n\n### Documentation\n\nhttp://picamera.readthedocs.io/en/release-1.11/fov.html\n\nhttp://flask.pocoo.org/docs/0.11/\n\n### Tutorials\n\nhttps://www.raspberrypi.org/learning/getting-started-with-picamera/worksheet/\n\nhttps://www.raspberrypi.org/learning/timelapse-setup/worksheet/\n\nhttps://www.raspberrypi.org/learning/python-web-server-with-flask/worksheet/\n\nhttp://stackoverflow.com/questions/10961378/how-to-generate-an-html-directory-list-using-python/10961991#10961991\n\n## Notes\n\nto make a gif from the timelapse images: `convert -delay 20 -loop 0 image*.jpg result.gif`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimiflynn%2Frpi-timelapse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimiflynn%2Frpi-timelapse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimiflynn%2Frpi-timelapse/lists"}