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

@bolagnaise/scrypted-reolink-battery

v0.0.6

Published

Battery-friendly Reolink camera plugin for Scrypted with HKSV support. Uses PIR events to trigger recording without draining battery.

Readme

Scrypted Reolink Battery Camera Plugin

Battery-friendly Reolink camera plugin for Scrypted with HomeKit Secure Video (HKSV) support.

Designed specifically for battery-powered Reolink cameras (Argus series, etc.) that need to sleep to conserve battery. Unlike the standard Reolink/rebroadcast plugins that maintain constant RTSP connections (draining battery in hours), this plugin only connects when needed.

How It Works

Reolink Battery Camera (sleeping)
     |
     | PIR triggers → camera wakes → connects WiFi
     |
     |── Webhook HTTP POST ──────────────→ Scrypted Plugin
     |                                          |
     |                                   MotionSensor event
     |                                          |
     |                                   HKSV starts recording
     |                                          |
     |←── RTSP connect (brief) ────────────────|
     |──→ H264 stream ───────────────────────→ |──→ HomeKit
     |                                          |
     |    (recording done, ~30s)                |
     |←── RTSP disconnect ─────────────────────|
     |                                          |
     | 💤 camera sleeps                         |

Key Features

  • Zero battery drain — No persistent connections. Camera sleeps freely.
  • PIR motion events via Reolink webhook (camera pushes to plugin)
  • HKSV recording — Records only on motion, just like native HomeKit cameras
  • On-demand RTSP — Video stream connects only when recording or live viewing
  • Snapshot caching — Serves cached snapshots when camera is sleeping
  • Battery monitoring — Reports battery level and charging state to HomeKit
  • No rebroadcast needed — Replaces the rebroadcast plugin for battery cameras

Setup

1. Install the Plugin

Install via Scrypted's plugin management, or deploy manually:

npm install
npm run build
npx scrypted login <scrypted-ip>
npm run scrypted-deploy <scrypted-ip>

2. Add Cameras

  1. Open the plugin settings in Scrypted
  2. Click "Add Camera" for each battery camera
  3. Configure each camera with:
    • Camera IP Address — The camera's IP on your network
    • Username — Usually admin
    • Password — Camera password

3. Configure Webhooks (Recommended)

For instant motion detection without polling:

  1. Note the Webhook URL shown in the plugin settings
  2. In the Reolink App:
    • Go to Device Settings → Surveillance → Push
    • Set the webhook URL to the one shown in the plugin
  3. The camera will now POST motion events directly to the plugin

4. Enable HKSV

  1. Install the HomeKit plugin in Scrypted
  2. The camera will appear in the Home app
  3. Enable HomeKit Secure Video recording in the Home app
  4. Recording is triggered by PIR motion events — no constant stream needed

Motion Detection Methods

The plugin supports multiple event sources, configured per-camera via the Motion event source setting:

| Method | Battery Impact | Setup | Best For | |---|---|---|---| | ONVIF PullPoint | Low — long-poll, no constant stream | Set event source to onvif or auto | Cameras with ONVIF support | | Webhook | None — camera pushes events | Configure URL in Reolink App | Battery cameras without ONVIF | | Auto (default) | Varies | No setup needed | Tries ONVIF first, falls back to webhook |

ONVIF Events

For cameras that support ONVIF (most wired Reolink models and some newer battery models):

  • The plugin subscribes to the camera's ONVIF PullPoint event service
  • Uses long-polling (30s intervals) — only receives data when motion occurs
  • Automatically re-subscribes if the subscription expires
  • Configure the ONVIF port in camera settings (usually 8000)

Webhook Events

For cameras without ONVIF (most battery/Baichuan models):

Settings

Plugin Settings

| Setting | Default | Description | |---|---|---| | Webhook listen port | 18080 | Port for receiving motion push events |

Per-Camera Settings

| Setting | Default | Description | |---|---|---| | Camera IP Address | — | IP address of the camera | | Username | admin | Camera login username | | Password | — | Camera login password | | Channel | 0 | Camera channel | | Motion timeout | 30 | Seconds to keep motion active after PIR trigger | | Snapshot cache | 60 | Seconds to cache snapshots (avoids waking camera) | | Motion event source | auto | auto, onvif, or webhook | | ONVIF port | 8000 | ONVIF service port (for ONVIF event source) |

Compatible Cameras

Any Reolink battery-powered camera should work, including:

  • Reolink Argus 3 / 3 Pro
  • Reolink Argus 4 / 4 Pro
  • Reolink Argus Eco
  • Reolink Argus PT
  • Reolink Go / Go Plus (4G models)
  • Reolink E1 Outdoor (battery version)
  • Reolink TrackMix (battery version)

Architecture

The plugin implements Scrypted's DeviceProvider interface:

  • ReolinkBatteryPlugin — Main plugin, manages cameras and webhook receiver
  • ReolinkBatteryCamera — Individual camera device implementing Camera, VideoCamera, MotionSensor, Battery
  • ReolinkApi — HTTP API client for snapshots, battery status, device info
  • OnvifEventClient — ONVIF PullPoint subscription client for motion events
  • EventReceiver — HTTP server receiving webhook motion push notifications

Development

npm install
npm run build
npx scrypted login <scrypted-ip>
npm run scrypted-deploy <scrypted-ip>

License

MIT