paulhoule / tentacruel

MIT License
0 stars 0 forks source link

Cron job script #7

Open paulhoule opened 5 years ago

paulhoule commented 5 years ago

The scenario here is that we are simulating what happens on a navy ship.

sunrise -15 minutes:

"First Call"

sunrise - 0 minutes:

"Reveille"

these songs are stored on a usb stick attached to one of the Heos devices, we want to have a simple cron job to call each one.

Things are a little complicated for the receiver because it might be set up to get input from the Xbox (or something similar) and ideally we would put it back to where it was when playback is done.

paulhoule commented 5 years ago

I am going to claim that this breaks down into a few subfeatures:

  1. a "tentacruel.cli.run" program that can, at the very least, play a music file or stop it. Ideally this would interrupt what the player is doing, play the new material, then put the player back where it was.
  2. easy to use API to do the same from Python code
  3. sane configuration of the application, including a. Which server to connect to b. Aliases for content (e.g. "FirstCall" to sid=...,cid=...,mid=...

Very short term we could aim at two command-line cron jobs, then we could maybe add tentacruel as a bellsprout dependency and add this as another bellsprout cron job.

paulhoule commented 5 years ago

Here is some analysis of what goes into a "minimum viable product".

The parameters to play a particular track look like this:

Player Id

pid=-527850911

--------

Pointer to track

sid=277499542
cid=m-2e55f82f-9be3-4d01-3588-b93ff4e254ec/fol/danganronpa_ost
mid=m-2e55f82f-9be3-4d01-3588-b93ff4e254ec/fol/danganronpa_ost/203 Mr. Monokuma's Lesson.mp3

Boy this would be annoying to put on the command line. I think I am going to put named players and tracks in the configuration file!