homebridge-dahua-alerts

1.2.0 • Public • Published

homebridge-dahua-alerts

verified-by-homebridge npm version npm total downloads

Routes motion alerts for Dahua, Alhua and Lorex camera streams to homebridge-camera-ffmpeg

This plugin only supports VideoMotion alerts, not any SmartMotion detection. You must disable those features in order for this plugin to work correctly. Please check issue #15 if you have compatible hardware and would like to contribute SmartMotion dectection

-- Confirmed working with:

Dahua DVR Dahua Standalone Camera Lorex DVR
- - LHV1004 DHV
DHI-HCVR4116HS-S3 - -
DH-XVR5116HS-X - -
- DH-IPC-HDBW4631R-S -
DHI-NVR4104HS-P-4Ks2 - -
- - Lorex NR818
- N43AJ52-B -

but lots of Dahua/Lorex NVRs and standalone cameras share this VideoMotion api.

Like this plugin? -> Buy me a coffee

Installation

  1. Install Homebridge using the official instructions.
  2. Install homebridge-camera-ffmpeg
  3. Configure your RTSP streams in homebridge-camera-ffmpeg and configure Http-based Automation for the camera streams you want motion detection. Make sure to set motionTimeout to 0 and set HTTP Localhost Only to true.
  4. Install homebridge-dahua-alerts.
  5. Configure your NVR and camera settings.
    • Ensure you have enabled https or port 443 on your device if you're getting ECONNREFUSED in the debug logs. Not required by all.

Sample config.json

  • Configuration for one NVR with multiple cameras

homebridge-camera-ffmpeg

{
    "name": "Camera FFmpeg",
    "porthttp": 8088,
    "localhttp": true,
    "cameras": [
        {
            "name": "Driveway",
            "motion": true,
            "motionTimeout": 0,
            "videoConfig": {
                "source": "-i rtsp://admin:<snip>@192.168.1.XX:554/cam/realmonitor?channel=1&subtype=1"
            }
        },
        {
            "name": "Porch",
            "motion": true,
            "motionTimeout": 0,
            "videoConfig": {
                "source": "-i rtsp://admin:<snip>@192.168.1.XX:554/cam/realmonitor?channel=2&subtype=1"
            }
        },
        {
            "name": "Backdoor",
            "motion": true,
            "motionTimeout": 0,
            "videoConfig": {
                "source": "-i rtsp://admin:<snip>@192.168.1.XX:554/cam/realmonitor?channel=4&subtype=1"
            }
        }
    ],
    "platform": "Camera-ffmpeg"
}

homebridge-dahua-alerts

{
    "cameras": [
        {
            "index": 0,
            "cameraName": "Driveway"
        },
        {
            "index": 1,
            "cameraName": "Porch"
        },
        {
            "index": 3,
            "cameraName": "Backdoor"
        }
    ],
    "homebridgeCameraFfmpegHttpPort": 8088,
    "platform": "dahua-alerts",
    "host": "XX.XX.XX.XX",
    "user": "admin",
    "pass": "XX"
}

Override Camera Connection Credentials

This is useful if you have standalone IP Camera(s) (not going through an NVR), a mix of IP Cameras and NVR(s), or multiple NVRs.

To define a host/user/pass on a camera simply add the cameraCredentials object. If you have a top level host/user/pass defined, this object will override it.

    "cameras": [
        {
            "index": 0,
            "cameraName": "Driveway"
            "cameraCredentials": {
                    "host": "XX.XX.XX.XX",
                    "user": "admin",
                    "pass": "XX"
            }
        },
  • If using a standalone camera, the index will always be 0

Local development

  • npm run build to get JS output in dist

Credits

Referenced nayrnet/node-dahua-api for the Dahua/Lorex motion alerts API.

Package Sidebar

Install

npm i homebridge-dahua-alerts

Weekly Downloads

15

Version

1.2.0

License

MIT

Unpacked Size

58.2 kB

Total Files

13

Last publish

Collaborators

  • kushagharahi