@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.
Maintainers
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
- Open the plugin settings in Scrypted
- Click "Add Camera" for each battery camera
- 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:
- Note the Webhook URL shown in the plugin settings
- In the Reolink App:
- Go to Device Settings → Surveillance → Push
- Set the webhook URL to the one shown in the plugin
- The camera will now POST motion events directly to the plugin
4. Enable HKSV
- Install the HomeKit plugin in Scrypted
- The camera will appear in the Home app
- Enable HomeKit Secure Video recording in the Home app
- 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
