{"definition_raw":"---\nid: home-radio-live\ntitle: Home Radio Live \u2014 hourly bucket swap on rolling playlist\nschedule: \"1 * * * *\"\ntimeout: 300\nretry: false\nenabled: true\nnotify_on: failure\nrun_as: shell\ncommand: \"cd /home/lucienne/workspace/projects/home-radio && python3 live_playlist.py refresh 2>&1 | tail -20\"\ntags: [home-radio, spotify, live, hourly]\nruntime_profile: direct_spotify\nnotify_to: general\n---\n\n**OVERRIDES runtime profile:** uses Spotify Web API directly, does not invoke the `claude` CLI.\n\nHourly at HH:01 SAST. Rebuilds the contents of the single public Spotify playlist \"Home Radio - Live\" (owned by econ, made public so HEOS conrelma can play it without playlist-modify scope) with the tracks from whichever day-part bucket is active right now.\n\nBucket selection (SAST hour \u2192 bucket):\n| 00\u201305 | late      |\n| 05\u201311 | morning   |\n| 11\u201314 | midday    |\n| 14\u201318 | afternoon |\n| 18\u201322 | evening   |\n| 22\u201324 | night     |\n\nDay group = weekday/sat/sun by current SAST date.\n\nSpotify Connect tolerates content swaps mid-playback: the currently-playing track finishes, the rebuilt lookahead queue takes over within ~30s. Speaker keeps playing through bucket boundaries without a stop/restart, like a real radio station rotation.\n\nOperator log entries written under `live.<day_group>.<day_part>` for visibility into freshness across rebuilds.\n\nPhase 3 of the Home Radio project. The HA automation `home_radio_live_morning_kick` (in /config/automations.yaml) starts playback of \"Home Radio - Live\" on Kitchen Heos every morning; from there the hourly content swap handles the rest.\n\nPlayback guard: hourly refresh may update playlist contents at any hour, but it must not auto-replay Kitchen/House during quiet hours (21:00-04:59 SAST) or while HA `input_boolean.presence` is `off`. This prevents the scheduler from restarting music after the 20:00/no-presence night-off automation intentionally stopped it.\n","id":"home-radio-live","last_run":{"duration_s":83.898189,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413849.log","output":"[live] active bucket: sat.morning\n[live] 870 candidates\n[live] recently-played cache: 27 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (presence=off); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T06:01:17.023936+02:00","status":"completed"},"next_run":"2026-06-13 07:01","next_run_iso":"2026-06-13T07:01:00+02:00","runs":[{"duration_s":83.898189,"finished_at":"2026-06-13T06:02:40.925149+02:00","id":413849,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413849.log","output":"[live] active bucket: sat.morning\n[live] 870 candidates\n[live] recently-played cache: 27 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (presence=off); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T06:01:17.023936+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":85.041665,"finished_at":"2026-06-13T05:06:04.522770+02:00","id":413681,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413681.log","output":"[live] active bucket: sat.morning\n[live] 870 candidates\n[live] recently-played cache: 42 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (presence=off); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T05:04:39.478507+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":37.37101,"finished_at":"2026-06-13T04:05:27.550687+02:00","id":413504,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413504.log","output":"[live] active bucket: sat.late\n[live] 619 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T04:04:50.177195+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":37.876877,"finished_at":"2026-06-13T03:01:38.987513+02:00","id":413322,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413322.log","output":"[live] active bucket: sat.late\n[live] 619 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T03:01:01.107866+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":38.017965,"finished_at":"2026-06-13T02:03:21.167139+02:00","id":413148,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/413148.log","output":"[live] active bucket: sat.late\n[live] 619 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T02:02:43.146508+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":36.491945,"finished_at":"2026-06-13T01:01:37.463501+02:00","id":412971,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412971.log","output":"[live] active bucket: sat.late\n[live] 618 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T01:01:00.968753+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":36.768155,"finished_at":"2026-06-13T00:01:37.725421+02:00","id":412795,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412795.log","output":"[live] active bucket: sat.late\n[live] 618 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-13T00:01:00.955060+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":42.439734,"finished_at":"2026-06-12T23:02:41.982331+02:00","id":412620,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412620.log","output":"[live] active bucket: weekday.night\n[live] 1851 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-12T23:01:59.539953+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":43.097946,"finished_at":"2026-06-12T22:01:44.102609+02:00","id":412445,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412445.log","output":"[live] active bucket: weekday.night\n[live] 1851 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-12T22:01:01.001019+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":75.095536,"finished_at":"2026-06-12T21:02:16.035922+02:00","id":412272,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412272.log","output":"[live] active bucket: weekday.evening\n[live] 2444 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] replay suppressed (quiet-hours); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-12T21:01:00.937616+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":73.080641,"finished_at":"2026-06-12T20:02:14.278664+02:00","id":412097,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/412097.log","output":"[live] active bucket: weekday.evening\n[live] 2444 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] replay suppressed (presence=off); playlist refresh only\n[live] kitchen_2=paused, no replay needed\n","started_at":"2026-06-12T20:01:01.196135+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":74.639137,"finished_at":"2026-06-12T19:05:33.300501+02:00","id":411929,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411929.log","output":"[live] active bucket: weekday.evening\n[live] 2444 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T19:04:18.659348+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":75.929279,"finished_at":"2026-06-12T18:02:46.356199+02:00","id":411754,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411754.log","output":"[live] active bucket: weekday.evening\n[live] 2444 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] bucket-change, replayed via conrelma\u2192Kitchen + Office\n","started_at":"2026-06-12T18:01:30.424922+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":76.623501,"finished_at":"2026-06-12T17:04:39.661661+02:00","id":411581,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411581.log","output":"[live] active bucket: weekday.afternoon\n[live] 1362 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T17:03:23.034736+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":77.227458,"finished_at":"2026-06-12T16:03:32.217633+02:00","id":411408,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411408.log","output":"[live] active bucket: weekday.afternoon\n[live] 1362 candidates\n[live] recently-played cache: 51 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T16:02:14.987630+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":76.055581,"finished_at":"2026-06-12T15:02:17.087072+02:00","id":411233,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411233.log","output":"[live] active bucket: weekday.afternoon\n[live] 1362 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T15:01:01.028548+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":77.820566,"finished_at":"2026-06-12T14:02:18.876442+02:00","id":411060,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/411060.log","output":"[live] active bucket: weekday.afternoon\n[live] 1362 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] bucket-change, replayed via conrelma\u2192Kitchen + Office\n","started_at":"2026-06-12T14:01:01.049196+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":38.564938,"finished_at":"2026-06-12T13:01:39.550413+02:00","id":410886,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/410886.log","output":"[live] active bucket: weekday.midday\n[live] 896 candidates\n[live] recently-played cache: 50 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T13:01:00.980585+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":38.255027,"finished_at":"2026-06-12T12:10:09.328449+02:00","id":410729,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/410729.log","output":"[live] active bucket: weekday.midday\n[live] 896 candidates\n[live] recently-played cache: 47 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] kitchen_2=playing, no replay needed\n","started_at":"2026-06-12T12:09:31.068374+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"},{"duration_s":39.431033,"finished_at":"2026-06-12T11:01:40.178429+02:00","id":410550,"log_path":"/home/lucienne/workspace/logs/task-runs/home-radio-live/410550.log","output":"[live] active bucket: weekday.midday\n[live] 896 candidates\n[live] recently-played cache: 31 URIs\n[live] wrote 80 (+80 -80 =0) \u2192 7BOiak2NJkIBrXRvHTAscS\n[live] bucket changed/first run \u2014 forcing Spotify Connect replay\n[live] bucket-change, replayed via conrelma\u2192Kitchen + Office\n","started_at":"2026-06-12T11:01:00.744844+02:00","status":"completed","task_id":"home-radio-live","task_name":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"}],"runs_limit":20,"schedule":"1 * * * *","schedule_label":{"description":"Every hour at :01","is_custom":false,"label":"Hourly","sort":2,"sort_time":""},"stats":{"avg_duration":57.396098325714284,"completed":175,"failed":0,"timeout":0,"total":175},"task":{"_description":"**OVERRIDES runtime profile:** uses Spotify Web API directly, does not invoke the `claude` CLI.\n\nHourly at HH:01 SAST. Rebuilds the contents of the single public Spotify playlist \"Home Radio - Live\" (owned by econ, made public so HEOS conrelma can play it without playlist-modify scope) with the tracks from whichever day-part bucket is active right now.\n\nBucket selection (SAST hour \u2192 bucket):\n| 00\u201305 | late      |\n| 05\u201311 | morning   |\n| 11\u201314 | midday    |\n| 14\u201318 | afternoon |\n| 18\u201322 | evening   |\n| 22\u201324 | night     |\n\nDay group = weekday/sat/sun by current SAST date.\n\nSpotify Connect tolerates content swaps mid-playback: the currently-playing track finishes, the rebuilt lookahead queue takes over within ~30s. Speaker keeps playing through bucket boundaries without a stop/restart, like a real radio station rotation.\n\nOperator log entries written under `live.<day_group>.<day_part>` for visibility into freshness across rebuilds.\n\nPhase 3 of the Home Radio project. The HA automation `home_radio_live_morning_kick` (in /config/automations.yaml) starts playback of \"Home Radio - Live\" on Kitchen Heos every morning; from there the hourly content swap handles the rest.\n\nPlayback guard: hourly refresh may update playlist contents at any hour, but it must not auto-replay Kitchen/House during quiet hours (21:00-04:59 SAST) or while HA `input_boolean.presence` is `off`. This prevents the scheduler from restarting music after the 20:00/no-presence night-off automation intentionally stopped it.","_file":"home-radio-live.md","_path":"/home/lucienne/workspace/tasks/home-radio-live.md","command":"cd /home/lucienne/workspace/projects/home-radio && python3 live_playlist.py refresh 2>&1 | tail -20","enabled":true,"id":"home-radio-live","notify_on":"failure","notify_to":"general","retry":false,"run_as":"shell","runtime_profile":"direct_spotify","schedule":"1 * * * *","tags":["home-radio","spotify","live","hourly"],"timeout":300,"title":"Home Radio Live \u2014 hourly bucket swap on rolling playlist"}}
