{"id":22122739,"url":"https://github.com/timendus/pyro-player","last_synced_at":"2025-03-24T07:27:13.929Z","repository":{"id":55813118,"uuid":"202806719","full_name":"Timendus/pyro-player","owner":"Timendus","description":"Pyro Player is a quick'n'dirty piece of software to control a simple pyromusical this December 🎆 😄","archived":false,"fork":false,"pushed_at":"2022-12-04T14:44:06.000Z","size":7372,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-29T12:47:52.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://timendus.github.io/pyro-player/web-player/","language":"JavaScript","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/Timendus.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}},"created_at":"2019-08-16T22:27:45.000Z","updated_at":"2024-10-20T22:42:48.000Z","dependencies_parsed_at":"2023-01-24T00:45:15.633Z","dependency_job_id":null,"html_url":"https://github.com/Timendus/pyro-player","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/Timendus%2Fpyro-player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timendus%2Fpyro-player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timendus%2Fpyro-player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Timendus%2Fpyro-player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Timendus","download_url":"https://codeload.github.com/Timendus/pyro-player/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245226339,"owners_count":20580702,"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":[],"created_at":"2024-12-01T15:27:35.668Z","updated_at":"2025-03-24T07:27:13.891Z","avatar_url":"https://github.com/Timendus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pyro Player\n\nPyro Player is a quick'n'dirty piece of software to control a simple pyromusical\nthis December 🎆 😄\n\n## Concept\n\nWe use the DB04r firework firing system / receiver that gets its commands over\n433Mhz. We send commands to it through a Raspberry Pi, that we then in turn\ncontrol through WebSockets over WiFi. Assuming that there is no WiFi present\nwhere you wish to run your pyromusical, we set up the Raspberry Pi to act as an\naccess point. Because the sound card of the Pi is pretty crappy, we play the\nmusic on the client device (your phone or laptop).\n\n![DB04R receivers with a remote](DB04R.jpg)\n\n## Stuff that you need\n\n* Raspberry Pi\n* 433Mhz transmitter board like the FS1000A\n* (A couple of) DB04r receiver(s)\n* WiFi client device (your phone or laptop, for example)\n* Nice set of (wired) speakers\n* Fireworks!\n\n## Preparation\n\n### Hardware / software\n\nWarning: These steps assume that you know what you're doing 😉\n\n* Attach the transmitter to your Raspberry Pi ([as shown here](https://pypi.org/project/rpi-rf/#wiring-diagram-example). Don't know how? [See this](https://www.youtube.com/watch?v=Xe5Bj_N4Crw))\n* Install Raspbian on the Raspberry Pi\n* Install Pyro Player and its dependencies by running in a terminal:\n\n```bash\n/home/pi $ sudo apt-get install git nodejs npm python3-pip\n/home/pi $ pip3 install rpi-rf\n/home/pi $ git clone git@github.com:Timendus/pyro-player.git\n/home/pi $ cd pyro-player\n/home/pi/pyro-player $ npm install\n```\n\n* Test that you can successfully run `npm start`. This should start a webserver on port 80\n* Configure Pyro Player to start on boot:\n\n```bash\n/home/pi/pyro-player $ npm run install-service\n```\n\n* Configure your Pi as a WiFi access point. *Do this over a cabled connection as you will lose any previous WiFi connection!* You have been warned 😜\n\n```bash\n/home/pi/pyro-player $ npm run make-access-point\n```\n\n* Reboot the Raspberry Pi\n\nAfter a minute or so you should see a WiFi access point `PyroPlayer` show up.\nThe password is `PyroMusical`. The Pi is then at `192.168.4.1`.\n\nIt's probably a good idea to use your SD card read-only, because you will be\ntreating this Pi as a piece of dedicated hardware in the field, and you will\nprobably not be shutting it down properly. Instructions on how to do that\n[here](https://medium.com/swlh/make-your-raspberry-pi-file-system-read-only-raspbian-buster-c558694de79).\nI may add a script for that too at some point. We'll see.\n\n### Content\n\n* Most importantly: choose a nice song! 😉\n* Using an editor of your choice, create a `.srt` subtitle file for your music(video) with commands instead of subtitles\n* Those commands correspond to the queues on your firework receivers, available commands [listed here](https://github.com/Timendus/pyro-player/blob/master/shared/commands.js)\n* Some things to consider when writing your commands:\n  * It's safer to leave the first second of the `.srt` file empty, because the software currently can't compensate for the transmission delay there\n  * A safe interval between commands is currently 300 milliseconds or more. (The transmitting software probably needs some time to claim and release the hardware pins)\n  * You can test your files by doing a 'dry run' [here](https://timendus.github.io/pyro-player/web-player/)\n\n### Fireworks\n\n* Connect the right fireworks to the right queues on the igniter\n* Put them in the right spots and all that, in range of the Pi's transmitter (the range was ~200 meters in our first test 😮)\n\n## Execution\n\n* Power up the Raspberry Pi, wait for it to boot (tip: use a 2 ampere USB power bank)\n* Connect your WiFi client device to a nice set of (wired) speakers. Don't use Bluetooth because it introduces a delay\n* On your client device:\n  * Connect to the WiFi access point `PyroPlayer`, password `PyroMusical`\n  * Open a web browser and navigate to `pyro.com` (or whatever, the pi should catch any http request that isn't in your cache. If all else fails, go to `http://192.168.4.1`)\n  * You should see the Pyro Player interface\n  * Upload your music file and your `.srt` file\n  * Press play\n\nThe right queues should be lit at the right times, firing the fireworks in sync\nwith your music.\n\nMagic 🎆\n\n## Easter eggs of the DB04r\n\nOur set is supposed to go up to 12 queues, corresponding with the 12 buttons on\nthe remote. However, it turns out we can program the receivers with higher\nnumbers too. Put the receiver in programming mode and send the first number of\nthe set of four that you want the receiver to respond to. So if you want it to\nrespond to 17, 18, 19 and 20, you have to send it 17. You can use the Pyro\nPlayer for that, with a random music file and a `.srt` file that reads:\n\n```srt\n1\n00:00:00,000 ---\u003e 00:00:00,000\nfire 17\n```\n\nAnother Easter egg that we discovered is that some codes trigger \"special\nbehaviour\" in the receivers. For example, if you send the code 13, all the\nnumbers from 1 through 12 will fire at once. If you send the code 15, they will\nall fire in sequence, one after the other. And this goes for the higher numbers\ntoo, so sending the code 29 will trigger all of the queues 17 to 28 to fire at\nonce.\n\nBecause of this behaviour, there is no command `fire 13`, but instead there is\na command `fire 1 through 12 now`. See our [list of commands](https://github.com/Timendus/pyro-player/blob/master/shared/commands.js),\nwhere we have tried to document the magic codes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimendus%2Fpyro-player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimendus%2Fpyro-player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimendus%2Fpyro-player/lists"}