Skip to content

Add fart-finder: always-on flatulence detector for the DevKit - #378

Closed
rdyplayerB wants to merge 1 commit into
openhome-dev:devfrom
rdyplayerB:fart-finder
Closed

rdyplayerB wants to merge 1 commit into
openhome-dev:devfrom
rdyplayerB:fart-finder

Conversation

@rdyplayerB

Copy link
Copy Markdown

Fart Finder

Seismic-grade flatulence detection for the OpenHome DevKit. It listens to the room on the device microphone, recognises the sound with YAMNet (which has a literal Fart class), grades each event on a logarithmic "Ripter" scale, and warns everyone in range:

"Warning. Room-clearing event detected. Magnitude six point two. Duration one point four seconds. Open a window and be on smell lookout."

Audio never leaves the device; only event metadata reaches the cloud.

Trigger words: fart finder, fart detector, flatulence

Layout

  • main.py — voice skill: status, arm, disarm, sensitivity
  • background.py — cloud daemon: polls the device, interrupts, announces, runs hooks
  • devkit_functions.py — device side: listener daemon (mic thread, Unix socket) and the RPC functions
  • listener/ — pure signal processing plus the vendored YAMNet TFLite model (16 MB, Apache 2.0) and class map
  • pi/ — install script, systemd unit, ALSA shared-capture config

Testing

  • Verified end to end against the OpenHome cloud with a Mac standing in for the DevKit via Local Link: a clip fed to the listener is polled by the cloud daemon and announced by the agent in about two seconds.
  • Passes validate_ability.py and the server-side upload scan.
  • Not yet run on DevKit hardware. devkit_functions.py selftest reports mic, model and timing for anyone who has one.
  • Detector: 88% recall on public clips, zero false alarms so far, YAMNet alone. The optional verifier head ships disabled until there is hard-negative data for it.

Notes for review

  • Consent is recorded by the skill's "arm" intent rather than by the daemon, since a background daemon cannot await user input.
  • All OS, file, thread and socket code lives in devkit_functions.py; the other modules are pure, which is what the upload scan requires.

🤖 Generated with Claude Code

Always-on flatulence detector for the OpenHome DevKit. A device-side YAMNet
detector with a Ripter magnitude scale logs events; a cloud background daemon
polls it and announces each one in an emergency-broadcast voice. Includes a
voice skill for status, arm, disarm and sensitivity.

Verified end to end against the OpenHome cloud with a Mac standing in for the
DevKit. Not yet run on DevKit hardware.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rdyplayerB
rdyplayerB requested a review from a team as a code owner September 16, 2026 14:26
@github-actions

Copy link
Copy Markdown
Contributor

🔀 Branch Merge Check

PR direction: fart-finder → dev

✅ Passed — fart-finder → dev is a valid merge direction

@github-actions

Copy link
Copy Markdown
Contributor

✅ Community PR Path Check — Passed

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

@github-actions github-actions Bot added the community-ability Community-contributed ability label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Ability Validation Passed

📋 Validating: community/fart-finder
  ✅ All checks passed!

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Lint Results

🔧 Formatting fixes available

This PR is from a fork, so fixes could not be pushed automatically. Download the python-lint-results artifact from the workflow run for the patch file, then run:

git apply autofix.patch

❌ __init__.py Must Be Empty

The following __init__.py files must be completely empty:

community/fart-finder/listener/__init__.py

Files linted: community/fart-finder/background.py community/fart-finder/devkit_functions.py community/fart-finder/listener/classify.py community/fart-finder/listener/copy.py community/fart-finder/listener/gate.py community/fart-finder/listener/magnitude.py community/fart-finder/listener/pipeline.py community/fart-finder/main.py

✅ Flake8 — Passed

Fix the remaining issues and push again. The lint will re-run automatically.

@uzair401 uzair401 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Closing.

@uzair401 uzair401 closed this Sep 17, 2026
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.

2 participants