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

scrypted-amcrest-ash21

v1.3.0

Published

Amcrest ASH21 PTZ Camera Plugin for Scrypted - Full PTZ control via DVRIP protocol

Readme

Scrypted Amcrest ASH21 PTZ Plugin

Full PTZ (Pan-Tilt-Zoom) control for Amcrest ASH21-B-V2 cameras in Scrypted using the DVRIP protocol.

Features

  • Full PTZ control (pan, tilt, zoom)
  • Works with Frigate NVR via built-in ONVIF server
  • Video streaming via Scrypted Rebroadcast
  • HomeKit compatible

Installation

Method 1: Scrypted UI (if working)

  1. Go to Scrypted web interface
  2. Click "Install Plugin"
  3. Search for scrypted-amcrest-ash21
  4. Click Install

Method 2: Manual Installation

If the UI install fails, use manual installation:

# SSH into your Scrypted server
ssh user@your-server

# Download and install the plugin
docker exec -it scrypted sh -c "
  cd /tmp && \
  npm pack scrypted-amcrest-ash21 && \
  mkdir -p /server/volume/plugins/scrypted-amcrest-ash21 && \
  tar -xzf scrypted-amcrest-ash21-*.tgz && \
  cp -r package/* /server/volume/plugins/scrypted-amcrest-ash21/ && \
  rm -rf package scrypted-amcrest-ash21-*.tgz
"

# Restart Scrypted
docker restart scrypted

Camera Setup

Important: The ASH21-B-V2 does not have a web interface for configuration. All camera settings must be done through the Amcrest mobile app.

Initial Setup

  1. Connect via Ethernet first - Plug the camera into your network via ethernet cable
  2. Download Amcrest View Pro app (iOS/Android)
  3. Add the camera in the app and complete initial setup
  4. Configure WiFi (if desired) through the app settings
  5. Note the camera's IP address from your router or the app

Camera Settings (via Amcrest App)

You may need to fine-tune these settings in the Amcrest app for optimal performance:

  • Video Settings:
    • Main Stream: H.264, 1080P, 30fps recommended
    • Sub Stream: H.264, VGA (640x480), 30fps recommended for detection
  • I-Frame Interval: Set to 1 second (30 frames) for lower latency
  • Network Settings: Ensure RTSP is enabled

Plugin Configuration

  1. After installation, add a camera via the plugin's Add Camera setting (enter its IP)
  2. Open the new camera device and enter its details:
    • IP Address: Your camera's IP (e.g., 10.10.10.68)
    • Username: Camera username (default: admin)
    • Password: Camera password
    • Enable ONVIF Server: Turn this on if you want PTZ control from Frigate or another ONVIF client
    • ONVIF Server Port: Port for the ONVIF server (default: 8483, must be unique per camera)
    • PTZ Move Duration (ms): How long a relative PTZ nudge runs before auto-stopping (default: 300). Lower = finer steps, higher = bigger steps.

Frigate Integration

This plugin includes a built-in ONVIF server for PTZ control from Frigate:

# frigate config.yml
cameras:
  amcrest_ash21:
    onvif:
      host: YOUR_SCRYPTED_IP
      port: 8483
      user: admin
      password: ""

Multiple Cameras

Each camera runs its own ONVIF server inside Scrypted, so each camera needs its own ONVIF port. Add each camera through the plugin's Add Camera setting, then give every camera a distinct port in its settings.

Worked example — an office camera and a kitchen camera on the same Scrypted host:

| Camera | Camera IP | ONVIF Server Port | |---------|--------------|-------------------| | office | 10.10.10.68 | 8483 | | kitchen | 10.10.10.69 | 8484 |

# frigate config.yml
cameras:
  office:
    onvif:
      host: YOUR_SCRYPTED_IP
      port: 8483
      user: admin
      password: ""
  kitchen:
    onvif:
      host: YOUR_SCRYPTED_IP
      port: 8484
      user: admin
      password: ""

Notes:

  • The host is always your Scrypted server's IP (the plugin bridges to the camera), not the camera's IP.
  • Each camera is assigned a stable, unique MAC address derived from its IP, so ONVIF clients that identify devices by MAC won't confuse two cameras.
  • ONVIF WS-Discovery (UDP 3702) is shared best-effort between cameras; if discovery doesn't find a camera, add it manually by IP and port.

Troubleshooting

ONVIF server won't start

  • Port already in use: another camera or service is using the ONVIF port. Give each camera a unique port (see Multiple Cameras above). Check the device console for EADDRINUSE.
  • "Camera IP not configured": set the camera's IP Address in the device settings first.
  • After changing the ONVIF port or IP the server restarts automatically; check the device console for [ONVIF] Server started at ... and use that exact URL in your client.

PTZ not responding

  • Verify the DVRIP port (default 37777) is reachable from Scrypted: nc -vz CAMERA_IP 37777.
  • Check credentials — look for [DVRIP] Login failed in the device console.
  • Watch the device console while sending a PTZ command; you should see the ONVIF request and the DVRIP command. If a command fails once, the plugin automatically reconnects and retries before giving up.
  • If moves are too small/large, tune PTZ Move Duration (ms) in the camera settings.

Connection drops

  • The plugin keeps the DVRIP session alive with a keepalive every 25s. If the keepalive fails (camera reboot, WiFi drop), the connection is closed and automatically re-established on the next PTZ command — expect the first command after a drop to be slightly slower.
  • Frequent [DVRIP] Keepalive failed messages usually indicate an unstable network path to the camera (common on WiFi); consider ethernet.

Snapshots

  • The ONVIF GetSnapshotUri endpoint returns the RTSP stream URL (the camera has no HTTP snapshot endpoint). Clients that require an HTTP JPEG snapshot should grab frames from the RTSP stream instead; within Scrypted, snapshots are taken from the substream automatically.

Supported Cameras

  • Amcrest ASH21-B-V2
  • May work with other Amcrest/Dahua cameras using DVRIP protocol

License

MIT

Author

Joshua Blasbalg