Skip to content

Latest commit

 

History

History
339 lines (304 loc) · 7.24 KB

MQTTEvents.md

File metadata and controls

339 lines (304 loc) · 7.24 KB

MQTT Message (Dahua VTO Event Payload)

Actions

Publish MQTT Message to perform action

Open door

TOPIC: [MQTT_BROKER_TOPIC_PREFIX]/Command/Open

Mute call

TOPIC: [MQTT_BROKER_TOPIC_PREFIX]/Command/Mute

Lock State

Topic [MQTT_BROKER_TOPIC_PREFIX]/MagneticLock/Status represents the locking status, Works only if the lock released by the DahuaVTO2MQTT

Since there is no real indication, it pulls from the configuration of the unit the interval allowed between unlocks (as defined in the Web Manager of the unit),

It will also protect duplicate attempts while the magnetic lock is in unlock interval

{
    "door":"Door ID",
    "isLocked":"true/false"
}

Events (With dedicated additional data)

Topic will be always [MQTT_BROKER_TOPIC_PREFIX]/[EVENT NAME]/Event Message represent an event

{
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

CallNoAnswered: Call from VTO

{
    "Action": "Start",
    "Data": {
        "CallID": "1",
        "IsEncryptedStream": false,
        "LocaleTime": "2020-03-02 20:11:13",
        "LockNum": 2,
        "SupportPaas": false,
        "TCPPort": 37777,
        "UTC": 1583172673
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

IgnoreInvite: VTH answered call from VTO

VideoMotion: Video motion detected

{
    "Action": "Start",
    "Data": {
      "LocaleTime": "2020-03-02 20:44:28",
      "UTC": 1583174668
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

RtspSessionDisconnect: Rtsp-Session connection connection state changed

Action: Represented whether event Start or Stop Data.Device: IP of the device connected / disconnected

BackKeyLight: BackKeyLight with State

{
    "Action": "Pulse",
    "Data": {
      "LocaleTime": "2020-03-02 20:24:07",
      "State": 8,
      "UTC": 1583173447
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

TimeChange: Time changed

{
    "Action": "Pulse",
    "Data": {
      "BeforeModifyTime": "02-03-2020 21:41:40",
      "LocaleTime": "2020-03-02 21:41:40",
      "ModifiedTime": "02-03-2020 21:41:39",
      "UTC": 1583178100
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

NTPAdjustTime: NTP Adjusted time

{
    "Action": "Pulse",
    "Data": {
        "Address": "time.windows.com",
        "Before": "02-03-2020 21:41:38",
        "LocaleTime": "2020-03-02 21:41:40",
        "UTC": 1583178100,
        "result": true
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

KeepLightOn: Keep light state changed

Data.Status: Repesents whether the state changed to On or Off

VideoBlind: Video got blind state changed

Action: Represents whether event Start or Stop

FingerPrintCheck: Finger print check status

Data.FingerPrintID: Finger print ID, if 0, check failed

SIPRegisterResult: SIP Device registration status

{
    "Action": "Pulse",
    "Data": {
        "Date": "02-03-2020 21:42:59",
        "LocaleTime": "2020-03-02 21:42:59",
        "Success": true,
        "UTC": 1583178179
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

AccessControl: Someone opened the door

{
    "Action": "Pulse",
    "Data": {
        "CardNo": "",
        "CardType": null,
        "LocaleTime": "2020-03-02 20:24:08",
        "Method": 4,			// 4=Remote/WebIf/SIPext | 6=FingerPrint
        "Name": "OpenDoor",		// Access control action name
        "Password": "",
        "ReaderID": "1",
        "RecNo": 691,
        "SnapURL": "",
        "Status": 1,
        "Type": "Entry",
        "UTC": 1583173448,
        "UserID": "" 			// By FingerprintManager / Room Number / SIPext
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

CallSnap: Call

{
    "Action": "Pulse",
    "Data": {
        "DeviceType": "Which device type",
        "RemoteID": "UserID",
        "RemoteIP": "IP of VTH / SIP device",
        "ChannelStates": "Status"
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

Invite: Invite for a call (calling)

{
    "Action": "Pulse",
    "Data": {
        "CallID": "1",
        "IsEncryptedStream": false,
        "LocaleTime": "2020-03-02 20:11:13",
        "LockNum": 2,
        "SupportPaas": false,
        "TCPPort": 37777,
        "UTC": 1583172673
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

AccessSnap: ?

{
    "Action": "?",
    "Data": {
        "FtpUrl": "FTP uploaded to"
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

RequestCallState: ?

{
    "Action": "?",
    "Data": {
        "LocaleTime": "2020-03-02 20:24:07",
        "Index": 1
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

PassiveHungup: Call was dropped

{
    "Action": "?",
    "Data": {
        "LocaleTime": "2020-03-02 20:24:07",
        "Index": 1
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

ProfileAlarmTransmit: Alarm triggered

{
    "Action": "?",
    "Data": {
        "AlarmType": "ALARM TYPE",
        "SenseMethod": "What triggered the alarm",
        "DevSrcType": "Device triggered the alarm"
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

BackLightOn: Back light turned-on

{
    "Action": "Pulse",
    "Data": {
        "LocaleTime": "2020-03-02 20:24:07",
        "UTC": 1583173447
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

BackLightOff: Back light turned-on

{
    "Action": "Pulse",
    "Data": {
      "LocaleTime": "2020-03-02 20:23:39",
      "UTC": 1583173419
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

AlarmLocal: Alarm triggered by the VTO unit

{
    "Action": "Stop",		//Represents whether event for Start or Stop
    "Data": {
      "LocaleTime": "2020-03-02 20:11:16",
      "UTC": 1583172676
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

APConnect: AccessPoint got connected (Stop) or disconnected (Start)

{
    "Action": "Stop",
    "Data": {
        "Error": "SSIDNotValid",
        "LocaleTime": "2020-03-02 19:20:07",
        "Result": false,
        "Type": "Timerconnect",
        "UTC": 1583158807
    },
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}

Generic structure

{
    "id": "MESSAGE ID",
    "method":"client.notifyEventStream",
    "params":{
        "SID":513,
        "eventList": [
            {
                "Action":"[EVENT ACTION]",
                "Code":"[EVENT NAME]",
                "Data":{
                    "LocaleTime":"YYYY-MM-DD HH:mm:SS",
                    "UTC": "EPOCH TIMESTAMP"
                },
                "Index": "EVENT ID IN MESSAGE",
                "Param":[]
            }
        ]
    },
    "session": "SESSION IDENTIFIER",
    "deviceType":"Device Model",
    "serialNumber":"Device Serial Number"
}