npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@andygev35/smart-detection-relay

v0.3.1

Published

Routes Scrypted NVR's object-detection events to **Android TV overlays** and **phone push notifications** — with cropped thumbnails, snooze buttons, and tap-to-timeline deep links. Notifications are delivered through the native Scrypted SDK by default, wi

Downloads

2,434

Readme

Smart Detection Relay

Routes Scrypted NVR's object-detection events to Android TV overlays and phone push notifications — with cropped thumbnails, snooze buttons, and tap-to-timeline deep links. Notifications are delivered through the native Scrypted SDK by default, with no third-party credentials required. Home Assistant is available as an additional, fully optional notifier — enabling it lets you use HA-specific notification options (categories, icons, and a tap destination that opens Home Assistant's own Scrypted NVR timeline), and is the only case where this plugin stores any third-party credentials (a Home Assistant URL and Long-Lived Access Token, used solely to power snooze buttons on HA notifications).

npm version

Source & issues: github.com/andygev35/smart-detection-relay — found a bug or have a feature request? Open an issue.

Requirements

  • A Scrypted NVR license/subscription active on your Scrypted server. This plugin relies entirely on Scrypted NVR's own object detection (bounding boxes, classes, scores) — it does not run its own detection model.
  • Zones already defined on each camera you want to use, via Scrypted's object detection settings for that camera. The plugin reads zone names directly from the camera; a rule can't match a zone that doesn't exist yet.
  • TvOverlay installed and running on any Android/Google TV device(s) you want overlays to appear on — only required if you use the TV overlay feature (it can be turned off entirely if you only want phone push). Install it from the Google Play Store on the TV itself; see the TvOverlay GitHub repo for its full REST API and setup docs.
  • At least one Scrypted device implementing the Notifier interface, for phone push — e.g. the native Scrypted app on your phone, linked via Scrypted Cloud. Only required if you use phone push (leave Notify Services empty if you only want TV overlays).
  • Optional: Home Assistant, if you want to use it as an additional notifier. Requires the Scrypted Home Assistant plugin installed and configured (this syncs your HA notify. targets into Scrypted). For the "Home Assistant" tap destination and for snooze buttons on HA notifications, you'll also need a Scrypted Integration Token (from Home Assistant's own Scrypted custom component) and a Home Assistant URL + Long-Lived Access Token, respectively — see the Home Assistant Notifier section below. None of this is required if you only use the native Scrypted notifier.

Setup

  1. Install the plugin and open its settings.
  2. Under the Cameras tab, add a camera by picking it from the Cameras field - it appears as a chip, and a new tab named after that camera appears below.
  3. In that camera's tab, add a rule under Rules: type a name (e.g. "Frontyard Person") and press enter - it appears as a chip, and a settings section with that name appears below it.
  4. In that rule's section, pick a Class Name and Zone (zones populate automatically once the camera is selected), then set a Score Threshold. Optional filters (Min Width/Height, Max X/Y, Fixed Crop, Critical Alert) are available per rule.
  5. Repeat for each camera/rule you want. Remove a camera or rule at any time by removing its chip - this clears its settings. Each camera also has its own Camera Enabled switch, for turning detection off for just that camera without deleting its rules.
  6. Under the Notifiers tab, pick Scrypted for the native Scrypted app path (select which Notifier device(s) should receive phone push notifications), and/or Home Assistant for the optional HA path - see the Home Assistant Notifier section below for what that adds.
  7. Under the TV Overlay tab, enter the base URL(s) of your TvOverlay instance(s), comma-separated (e.g. http://192.168.1.50:5001).
  8. Adjust global options as needed — debounce, snooze durations (Android only, see below), bounding-box padding/crop ratio. Under the Location tab, Latitude/Longitude (used only for night-mode sunrise/sunset) are auto-detected from your server's public IP address on first install; use Detect Location to re-run that lookup anytime, or enter coordinates manually for more precision. Clear Location wipes both fields (night-mode-only cameras simply stop suppressing notifications until a location is set again).

Plugin Enabled and TV Overlay Enabled are independent switches, both on by default: the former is a master kill switch for all detection processing, the latter only gates TV overlay delivery and can be left off if you're not using TvOverlay at all.

Home Assistant Notifier (optional)

Home Assistant is not required, but can be enabled as an additional notifier under Notifiers > Home Assistant:

  • HA Notifier — pick the HA-exposed notify. target (e.g. mobile_app_yourphone) to also receive phone push.
  • Notification Category / Icon — once an HA Notifier is selected, every detection rule (under that camera's own tab) gains optional HA Notification Category and HA Notification Icon fields, letting you assign a distinct notification channel/sound or a Material Design status-bar icon per rule.
  • Tap Destination — choose whether tapping an HA notification opens the Scrypted app (nvr.scrypted.app, the default) or Home Assistant's own Scrypted NVR timeline instead. The latter requires a Scrypted Integration Token (found in Home Assistant: open a camera's playback view, click the settings icon, and copy the token from the "Integration URL" shown there).
  • Snooze buttons on HA notifications require a Home Assistant URL and Long-Lived Access Token (generated from your HA profile → Security → Long-Lived Access Tokens). These power a direct connection this plugin opens to Home Assistant's own event stream so snooze taps are picked up immediately — no Home Assistant automation authoring, no MQTT broker.

None of these credentials are requested or stored unless you actually fill them in - the plugin works entirely without Home Assistant if you don't need it.

Features

  • Chip-based settings UI — add/remove cameras and rules as removable chips (the same pattern Scrypted's own built-in object detection settings use for zones); each addition reveals its own settings section automatically, no raw JSON editing.
  • Organized settings tabs — General, TV Overlay, Location, and Notifiers (with sub-tabs per notifier type) keep global options grouped by what they affect, instead of one long list.
  • Optional Home Assistant notifier — send to an HA notify. target alongside or instead of the native Scrypted app, with per-rule notification category/icon, a choice of tap destination (Scrypted app or Home Assistant's own NVR timeline), and working snooze buttons via a direct connection to HA's event stream. Entirely opt-in; no HA credentials are requested unless you configure it.
  • Per-camera enable/disable — each camera has its own Camera Enabled switch, independent of the global Plugin Enabled switch, for turning off just one camera's detections temporarily without losing its configured rules.
  • Smart thumbnail cropping — crops are centered on the detected subject and fit to a configurable aspect ratio (square by default), always growing to fully contain the subject rather than cropping into it.
  • Snooze buttons (Android only) — configurable durations, delivered as native notification actions; tapping one suppresses further notifications for that camera/class. On iOS, the Scrypted app uses its own fixed, built-in snooze action instead of these custom buttons - see Notes below.
  • Tap-to-timeline — tapping a notification opens directly to that detection's event in the Scrypted app.
  • Per-rule critical alerts — flag specific rules (e.g. a person at the front door) to send with a higher-priority alert tier.
  • Night-mode-only cameras — suppress notifications during the day for cameras where you only care about after-dark activity, based on sunrise/sunset for your configured location. Location is auto-detected from your server's public IP on first install (city-level accuracy), with a Detect Location button to re-run it and a Clear Location button to reset it.
  • Debounce & duplicate suppression — configurable per-camera/class cooldown, plus detection-ID deduplication.
  • Multiple notify targets — select any number of Notifier devices to push to simultaneously.

Notes

  • This plugin does not perform its own image analysis — it relies entirely on detection results and zone definitions already configured in Scrypted NVR.
  • If you rename a Notifier device in Scrypted, you'll need to reselect it under Notify Services — the dropdown is keyed on the device's display name for readability.
  • Plugin restarts reset in-memory debounce and snooze state.
  • Snooze duration configuration only applies on Android. The Scrypted iOS app doesn't render this plugin's custom snooze buttons at all - it substitutes its own fixed, built-in snooze action instead. Snoozing still works on iOS, but at whatever duration the Scrypted app itself hardcodes, not the Snooze Durations setting.
  • Home Assistant credentials are opt-in. The Scrypted Integration Token and Home Assistant URL/Long-Lived Access Token are only requested if you actually configure the Home Assistant Tap Destination or want HA snooze buttons - the plugin never asks for or stores them otherwise.

Issues & Contributing

Found a bug, have a feature request, or hit unexpected behavior? Please open an issue on GitHub rather than leaving an npm review — it's much easier to track and follow up on there. Include your Scrypted server version, camera/device type, and any relevant log output if you can.

The full source is available at github.com/andygev35/smart-detection-relay. Pull requests are welcome, but please open an issue first to discuss any non-trivial change before putting in the work.