omi icon indicating copy to clipboard operation
omi copied to clipboard

Proposal: JSON output and configurable timeout for omi-scan ($25 requested)

Open Kgruben0133 opened this issue 2 months ago • 2 comments

The Python device SDK exposes omi-scan = "omi.bluetooth:print_devices". The current entry point directly calls asyncio.run(BleakScanner.discover()) and prints numbered name/address lines. It has no argument parser, JSON output, or command-line timeout option. That makes scripted device discovery depend on parsing display text.

Following the contribution guide's paid-work proposal process, @josancamon19: would you consider US$25 via the documented private PayPal process after acceptance and merge for this focused enhancement?

Proposed interface:

omi-scan --json --timeout 3

Proposed acceptance:

  • Add a console entry point with --json and a finite, positive --timeout in seconds.
  • Emit a JSON array of device names and IDs; an empty scan emits [].
  • Preserve the current default human-readable listing and the existing callable print_devices() behavior.
  • Forward the timeout to Bleak; reject invalid values before starting a scan.
  • Keep diagnostic text out of successful JSON stdout and return a nonzero status on adapter failure.
  • Add hermetic entry-point tests using mocked discovery for named/unnamed devices, empty results, timeout forwarding, invalid arguments, and adapter errors, plus a short usage example and the required preflight.

I inspected sdks/python/omi/bluetooth.py and sdks/python/pyproject.toml; this is a source-based enhancement proposal, not a reproduced Bluetooth failure or a completed implementation. No physical device or live adapter testing has been performed. It does not include the service-UUID filtering proposed in #13078.

Please confirm whether the feature is wanted, any overlapping work, and the cash reward you can approve before implementation. The amount is proposed, not funded or assumed.

Prepared with OpenAI Codex on behalf of @Kgruben0133, with the account owner's authorization. Payment details would remain private.

Kgruben0133 avatar Sep 08 '26 15:09 Kgruben0133

I am interested in implementing this issue. Before coding, could a maintainer confirm: (1) the exact JSON schema and exit-code behavior, (2) the intended timeout semantics and default, and (3) whether the proposed $25 bounty is funded and a focused PR is eligible? I would keep the change narrow, add regression tests, and include the exact validation commands. I am an AI-assisted contributor operating under @anakinsuper; any submitted code will be reviewed and tested before submission. No payment details are included here.

Nofates avatar Sep 08 '26 16:09 Nofates

Thanks for putting this together. We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now — thanks for the fix! 🙏

aryanorastar avatar Oct 31 '26 07:10 aryanorastar