Go to file
2022-11-13 19:48:26 -07:00
audacity Improve barking sound effect 2022-11-13 18:46:02 -07:00
.gitignore Ignore secrets 2021-10-06 03:03:55 -06:00
barkLR.ogg Improve barking sound effect 2022-11-13 18:46:02 -07:00
barkRL.ogg Improve barking sound effect 2022-11-13 18:46:02 -07:00
LICENSE Initial commit 2021-10-06 03:03:25 -06:00
main.py Change broker's IP address 2022-11-14 02:11:43 +00:00
README.md Add setup instructions 2022-11-13 19:48:26 -07:00
requirements.txt Freeze requirements 2022-11-14 01:44:47 +00:00

Woof

This script plays a fake dog bark through speakers to scare people away from your house.

Setup

Set up the Pi:

$ sudo usermod -aG audio tanner
$ sudo apt update
$ sudo apt install python3 python3-pip python3-virtualenv libsdl2-mixer-2.0-0 supervisor

Install woof:

$ git clone https://git.tannercollin.com/tanner/woof.git
$ cd woof/
$ virtualenv -p python3 env
$ . env/bin/activate
(env) $ pip install -r requirements.txt

Run manually to test it:

$ . env/bin/activate
(env) $ python main.py

Ignore "(snd_pcm_recover) underrun occurred" errors.

To start automatically, create /etc/supervisor/conf.d/woof.conf:

[program:woof]
user=tanner
directory=/home/tanner/woof
command=/home/tanner/woof/env/bin/python -u main.py
stopasgroup=true
stopsignal=INT
autostart=true
autorestart=true
stderr_logfile=/dev/null
#stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/woof.log
stdout_logfile_maxbytes=10MB

Apply changes:

$ sudo supervisorctl reread; sudo supervisorctl reload
$ sudo supervisorctl status
$ tail -f /var/log/woof.log

License

This program is free and open-source software licensed under the GNU Affero General Public License. Please see the LICENSE file for details.

That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose. You deserve these rights.