Amcrest ASH21 PTZ Camera Plugin for Scrypted - Full PTZ control via DVRIP protocol
npm install scrypted-amcrest-ash21Full PTZ (Pan-Tilt-Zoom) control for Amcrest ASH21-B-V2 cameras in Scrypted using the DVRIP protocol.
- Full PTZ control (pan, tilt, zoom)
- Works with Frigate NVR via built-in ONVIF server
- Video streaming via Scrypted Rebroadcast
- HomeKit compatible
scrypted-amcrest-ash21``bashSSH into your Scrypted server
ssh user@your-server
Camera Setup
Important: The ASH21-B-V2 does not have a web interface. Initial setup requires the Amcrest Cloud app, then you can switch to local-only control.
$3
1. Connect the camera via ethernet or follow the camera's WiFi setup mode
2. Download the Amcrest Cloud app (iOS/Android) - this is required for initial setup
3. Create an account and add the camera through the cloud app
4. Set local credentials - In the camera settings, set a username and password for local access (e.g., username:
admin, password: your choice)
5. Remove the camera from the Amcrest Cloud app (optional - for privacy/local-only control)$3
Once local credentials are configured, add the camera to a local app:
- iOS/Android: Amcrest View Pro
- Mac: Amcrest Surveillance Pro
Add the camera using:
- IP Address: Find this from your router's DHCP list
- Username/Password: The local credentials you set in Step 1
- Port: 37777 (DVRIP)
$3
Fine-tune these settings in the app for optimal performance:
- Video Settings:
- Main Stream: H.264, 1080P, 30fps
- Sub Stream: H.264, VGA (640x480), 30fps (for detection)
- I-Frame Interval: 1 second (30 frames) for lower latency
Plugin Configuration
1. After installation, go to the plugin in Scrypted
2. Add a camera by entering its IP address
3. Configure the camera settings:
- IP Address: Your camera's IP
- Username: Local username you set during camera setup
- Password: Local password you set during camera setup
- RTSP Port: 554 (default)
- DVRIP Port: 37777 (default, used for PTZ)
- Enable ONVIF Server: Enable for Frigate PTZ integration
- ONVIF Server Port: Unique port for each camera (e.g., 8483, 8484)
- ONVIF Server IP: Your Scrypted server's IP address
Note: If adding multiple cameras, each must have a unique ONVIF port.
Frigate Integration
This plugin includes a built-in ONVIF server for PTZ control from Frigate.
$3
`yaml
frigate config.yml
cameras:
amcrest_ash21:
ffmpeg:
inputs:
- path: rtsp://SCRYPTED_IP:REBROADCAST_PORT/YOUR_STREAM_ID
roles: [record]
- path: rtsp://SCRYPTED_IP:REBROADCAST_PORT/YOUR_SUBSTREAM_ID
roles: [detect]
onvif:
host: SCRYPTED_IP
port: 8483
user: admin
password: ""
`Get the RTSP URLs from the Scrypted Rebroadcast plugin for your camera.
$3
For lower latency live view in Frigate, point go2rtc directly to the camera:
`yaml
go2rtc:
streams:
amcrest_ash21:
- rtsp://username:password@CAMERA_IP:554/cam/realmonitor?channel=1&subtype=0
- rtsp://username:password@CAMERA_IP:554/cam/realmonitor?channel=1&subtype=1
``- Amcrest ASH21-B-V2
- May work with other Amcrest/Dahua cameras using DVRIP protocol
MIT
Joshua Blasbalg