{"id":16677856,"url":"https://github.com/jaemk/booo","last_synced_at":"2026-04-05T22:03:35.893Z","repository":{"id":66210361,"uuid":"108493828","full_name":"jaemk/booo","owner":"jaemk","description":"motion activated spooky actions","archived":false,"fork":false,"pushed_at":"2017-10-31T03:00:15.000Z","size":165,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T00:47:51.417Z","etag":null,"topics":["gpio","halloween","motion","opencv","python","raspberry-pi","webcam"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaemk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-27T03:15:05.000Z","updated_at":"2017-10-31T03:02:34.000Z","dependencies_parsed_at":"2023-02-23T23:15:19.968Z","dependency_job_id":null,"html_url":"https://github.com/jaemk/booo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fbooo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fbooo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fbooo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaemk%2Fbooo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaemk","download_url":"https://codeload.github.com/jaemk/booo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243358212,"owners_count":20277991,"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":["gpio","halloween","motion","opencv","python","raspberry-pi","webcam"],"created_at":"2024-10-12T13:27:43.104Z","updated_at":"2025-12-29T22:07:51.856Z","avatar_url":"https://github.com/jaemk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BOOO\n\n\u003e motion activated spooky actions\n\nThe goal of this project is to use motion detection to activate spooky things.\nThe assumed target environment is a Raspberry Pi 2 running rasbian jessie, a PS Eye webcam, and a PowerSwitchTail 2.\n\nThere are several outputs (with the gpio pins configured in gpio.BOARD mode):\n\n1. Set and keep pin 11 HIGH while program runs.\n2. When motion is detected and lasts for at least `MIN_DELAY_SECS_AFTER_MOTION`, while motion exists set pin 16 HIGH.\n3. When motion is detected and lasts for at least `MIN_DELAY_SECS_AFTER_MOTION`, pulse pin 18 twice and then wait until motion is\n   detected again.\n\n\n## Setup\n\n**Option 1 (python2, opencv2, easier option):**\n\n- `apt install opencv-python`\n- Unfortunately, this requires using the system python2\n\n**Option 2 (python3, opencv3, compiling opencv takes a while, pyhon linking problems on rpi):**\n\n- Setup a virtualenv:\n    - `python3 -m virtualenv env`\n    - `source env/bin/activate`\n- Install [`opencv`](https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/)\n    - Install dependencies\n    - `mkdir vendor \u0026\u0026 cd vendor` -- download opencv source here\n\n\n## Running\n\nNote, `sudo` is required to access the webcam and gpio pins when running on an RPi.\nIf you're running locally, you can probably run without root depending on how your webcam works.\n\nIf you installed with a virtual environment:\n\n```\n$ sudo env/bin/python boo.py motion\n```\n\n----\n\n\n```\n$ sudo ./boo.py motion\n```\n\n----\n\nRunning with `--display` will show the current captured frames.\n\nRunning with `--save` will hold onto the last `MAX_FRAME_BUF` frames in a rolling frame-buffer.\nAfter motion is detected for `VIDEO_MOTION_DELAY_SECS`, the frame-buffer will be dumped to a new video and then\nall subsequent frames will be appended to the video. Note: this will use a lot of memory, fast.\nVideos are saved in `VIDEO_DIR`.\n\n**Auto run on startup**\n\n- `sudo cp boo.service.sample /lib/systemd/system/boo.service`\n- Update the path to your project dir in `/lib/systemd/system/boo.service`\n- `sudo systemctl daemon-reload`\n- `sudo systemctl enable boo.service`\n- `sudo systemctl start boo`\n- `sudo systemctl status boo`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaemk%2Fbooo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaemk%2Fbooo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaemk%2Fbooo/lists"}