Skip to content

Kortexa Radio#222

Merged
Rizwan-095 merged 6 commits intoopenhome-dev:devfrom
kortexa-ai:kortexa/radio
Apr 1, 2026
Merged

Kortexa Radio#222
Rizwan-095 merged 6 commits intoopenhome-dev:devfrom
kortexa-ai:kortexa/radio

Conversation

@francip
Copy link
Copy Markdown
Contributor

@francip francip commented Mar 19, 2026

What does this Ability do?

Stream KRTX-AI - the AI radio from kortexa.ai

Suggested Trigger Words

  • start radio
  • stop radio

Type

  • New community Ability
  • Improvement to existing Ability
  • Bug fix
  • Documentation update

External APIs

Testing

  • Tested in OpenHome Live Editor
  • All exit paths tested (said "stop", "exit", etc.)
  • Error scenarios tested (API down, bad input, etc.)

Checklist

  • Files are in community/my-ability-name/
  • main.py follows SDK pattern (extends MatchingCapability, has register_capability + call)
  • README.md included with description, suggested triggers, and setup
  • resume_normal_flow() called on every exit path
  • No print() — using editor_logging_handler
  • No hardcoded API keys — using placeholders
  • No blocked imports (redis, connection_manager, user_config)
  • No asyncio.sleep() or asyncio.create_task() — using session_tasks
  • Error handling on all external calls
  • Tested in OpenHome Live Editor

Anything else?

@francip francip requested a review from a team as a code owner March 19, 2026 07:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

🔀 Branch Merge Check

PR direction: kortexa/radiodev

Passedkortexa/radiodev is a valid merge direction

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

✅ Ability Validation Passed

📋 Validating: community/kortexa-radio
  ✅ All checks passed!

@github-actions github-actions bot added the community-ability Community-contributed ability label Mar 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2026

🔍 Lint Results

🔧 Auto-formatted

Some files were automatically cleaned and formatted with autoflake + autopep8 and committed.

  • Unused imports removed (autoflake)
  • Unused variables removed (autoflake)
  • PEP8 formatting applied (autopep8)

__init__.py — Empty as expected

Files linted: community/kortexa-radio/main.py

✅ Flake8 — Passed

✅ All checks passed!

@uzair401
Copy link
Copy Markdown
Contributor

Hey @francip, thanks for the submission! I reviewed the code and SDK compliance and everything looks good on that front. One thing holding us back from a full sign-off is that api.kortexa.ai isn't reachable right now. Connections are timing out on both /radio/stream and /radio/events, so we're not able to do an end-to-end verify just yet. No action needed on your side for now. Once the server is back up we'll pick up testing and move forward from there. Appreciate your patience!

@francip
Copy link
Copy Markdown
Contributor Author

francip commented Mar 27, 2026

that's my bad, I traveled, and had to take the mini with me. the machine is back up, the two streams should be reachable. I'll move this on a different machine that never leaves my desk in the next day or so to avoid disruptions like this.

@francip francip force-pushed the kortexa/radio branch 2 times, most recently from 2c9dda1 to 3e0dde9 Compare March 30, 2026 16:18
Copy link
Copy Markdown
Contributor

@uzair401 uzair401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @francip , there’s an issue in the current implementation where await self._stream() blocks the entire run() method, so the command loop never listens for a “stop” command. Even if _stream() is moved to a task, user_response() still blocks while waiting for input, which prevents the loop from detecting stop events triggered externally (e.g., stream disconnect).

Please update this by running the stream as a background task using self.worker.session_tasks.create(self._stream()) so the loop remains responsive. Also ensure the stop event is checked at multiple points: before waiting for user input, immediately after user_response() returns, and within the user’s spoken command (e.g., “stop”, “off”, “exit”, “turn it off”).

Additionally, simplify the flow to auto-start on trigger, wait for a stop command, and exit cleanly without restart logic.

I don't have edit access otherwise i would have implemented the changes myself.

@francip
Copy link
Copy Markdown
Contributor Author

francip commented Apr 1, 2026

Good suggestion. I think I got it now.

Copy link
Copy Markdown
Contributor

@uzair401 uzair401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this @francip, I am approving it for the community.

As part of our process, abilities go through a 30-day evaluation period where we monitor performance, identify any issues, and make necessary improvements. Once everything meets our quality standards, we proceed with publishing to the marketplace with full credit to the original author.

We truly appreciate your effort and encourage you to keep building and submitting more abilities. Contributions like yours help strengthen the ecosystem, and we look forward to seeing more of your work.

@francip
Copy link
Copy Markdown
Contributor Author

francip commented Apr 1, 2026

@uzair401 I assume someone else will merge it?

@Rizwan-095 Rizwan-095 merged commit f8a1a8b into openhome-dev:dev Apr 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants