Skip to main content
Skip table of contents

Watchdog Event Provider via STMP (WDEventProviderSMTP.xml)

With this please do not use System Manager own Watchdog alarm sending.

This feature can be used example to delay Camera No Signal events when camera is coming online shortly after this event.

Requirements

  • License feature SMTP Watchdog health provider

    • On default latest VMS V9 and V8 VMS licenses includes this feature

Configuring email settings

  • Open System Manager.

  • Open on first tab Email settings.

  • This open new window where you can fill the email settings to this system.

    • If there is multiple servers on system, this is needed to do each server separately.

  • To test email sending you need to add at least one email address to Email addresses list.

  • Then click this email address active and click Send test email button

    • This send test email to wanted email address and give status if email sending works or not

  • Now you can save settings.

  • After this there is needed to open Watchdog settings and temporally add email address to event.

  • When saving Watchdog settings with event, this store details to C:\Program Files\DVMS\DVR folder, which allow you use authenticated SMTP.

    • This is not needed if there is no need to use authentication to SMTP.

If there is not needed to use authenticated SMTP, then you can only edit wanted lines in WDEventProviderSMTP.xml file. This use only 25 port.

CODE
<Address value="smtp.company.com" />
CODE
<Sender value="wd@company.com" />
CODE
<TargetAddresses>
  <TargetAddress value="firstname.lastname@company.com" />
</TargetAddresses>

How to modify WDEventProviderSMTP.xml file

  • Go to folder default location C:\Program Files\DVMS\DVR\WDEventProviders

  • Make copy of WDEventProviderSMTP.xml file to example Desktop

  • Open this file using example Notepad++

  • To enable this feature, you need to change line

    CODE
    <Enabled value="false" />

    To

    CODE
    <Enabled value="true" />
  • DelaySendEvents section is section where you can make changes to delay Camera No Signal event sending.

    • This is helpful if there is IP camera which is working but not behind stable connection.

  • Default DelaySendEvents

    • <!-- text --> means comment in XML file

      CODE
        <DelaySendEvents>
          <!-- Wait 60 seconds for video channel 2 for VideoChannelOK event after VideoChannelNotStarted has received 
          <DelaySendEvent seconds="60" channel="2" triggerEvent="15" cancelEvent="13" />
          -->
          <!-- Wait 30 seconds for video channel 2 for VideoChannelOK event after VideoChannelNoSignal has received 
          <DelaySendEvent seconds="30" channel="2" triggerEvent="14" cancelEvent="13" />
          -->
        </DelaySendEvents>
  • To change this section you need to add new lines under comments example

    CODE
    <DelaySendEvents>
        <!-- Wait 60 seconds for video channel 2 for VideoChannelOK event after VideoChannelNotStarted has received 
        <DelaySendEvent seconds="60" channel="2" triggerEvent="15" cancelEvent="13" />
        -->
        <!-- Wait 30 seconds for video channel 2 for VideoChannelOK event after VideoChannelNoSignal has received 
        <DelaySendEvent seconds="30" channel="2" triggerEvent="14" cancelEvent="13" />
        -->
        
        <DelaySendEvent seconds="60" channel="1" triggerEvent="15" cancelEvent="13" />
        <DelaySendEvent seconds="30" channel="1" triggerEvent="14" cancelEvent="13" />
      </DelaySendEvents>
  • Now there is add two lines

    CODE
    <DelaySendEvent seconds="60" channel="1" triggerEvent="15" cancelEvent="13" />
    <DelaySendEvent seconds="30" channel="1" triggerEvent="14" cancelEvent="13" />
    • First line mean that we have delayed event “VideoChannelNotStarted” at 60 seconds and if system get in 60 seconds event “VideoChannelOK”, system not send email out but if that is more than 60s, then email is sent out.

    • Second line ean that we have delayed event “VideoChannelNoSignal” at 30 seconds and if system get in 30 seconds event “VideoChannelOK”, system not send email out but if that is more than 30s, then email is sent out.

  • Now save this WDEventProviderSMTP.xml file and copy this to default location C:\Program Files\DVMS\DVR\WDEventProviders

  • When this is done, restart WDServer service in Windows Services.

  • Now when there is happening event where is made made changes, system send or not send email out based on these settings in XML file.

Filtering events

XML also provide option to filter events in Filters section.

CODE
  <Filters>
    <!-- if minutes is 0, event won't be sent at all -->
    <!-- sample filter: never send event 28
    <Filter event="28" minutes="0" /> -->
    <!-- sample filter: send event 4 once/hour maximum
    <Filter event="4" minutes="60" /> -->
  </Filters>

In this section you can example disable wanted event sending or send event once in hour.

Changing time format

In XML has two lines where you can change time format.

CODE
  <!-- The format used in UTC timestamp. See format description in http://msdn.microsoft.com/en-us/library/az4se3k1.aspx -->
  <UtcTimeFormat value="yyyy-MM-dd hh-mm-ss-fff" />

  <!-- The format used in local timestamp. See format description in http://msdn.microsoft.com/en-us/library/az4se3k1.aspx -->
  <LocalTimeFormat value="yyyy-MM-dd hh-mm-ss-fff zzz" />

Software use standard date and time format strings from Microsoft code.

Here links to supported strings.

https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings

https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

Example you want to change Local time format to 27.7.2023 and time 16.39 you need edit line

CODE
<LocalTimeFormat value="yyyy-MM-dd hh-mm-ss-fff zzz" />

Change this line to this

CODE
<LocalTimeFormat value="dd-MM-yyyy HH-mm-ss-fff zzz" />

Then save these changes to WDEventProviderSMTP.xml file and restart WDServer in Windows Services.

Supported WD Events

End of WDEventProviderSMTP.xml file has all current supported WD Events codes.

CODE
  <!-- Current WD events
  // Service states
  SmServerDown = 0
  SmServerUp = 1
  DvrServerDown = 2
  DvrServerUp = 3

  // Network status
  NetworkDown = 4
  NetworkUp = 5

  // DVR core state
  DvrStatusOK = 6
  DvrRefreshing = 7
  DvrVideoCaptureLoadFailure = 8
  DvrAudioCaptureLoadFailure = 9
  DvrDataCaptureLoadFailure = 10
  DvrNoFileSystem = 11
  DvrDiskFailure = 12

  // Video channel status
  VideoChannelOK = 13
  VideoChannelNoSignal = 14
  VideoChannelNotStarted = 15
  VideoChannelNoCapture = 16

  // Audio channel status
  AudioChannelOK = 17
  AudioChannelNoSignal = 18
  AudioChannelNotStarted = 19
  AudioChannelNoCapture = 20

  // Data channel status
  DataChannelOK = 21
  DataChannelNoSignal = 22
  DataChannelNotStarted = 23
  DataChannelNoCapture = 24

  // Watchdog connection
  WDConnectionDown = 25
  WDConnectionUp = 26

  // Additional dvr core states
  DvrSecurityFailure = 27
  DvrOtherInitFailure = 28

  // Archiving failures
  DvrArchiveFailed = 29
  DvrMapNetworkDriveFailed = 30

  // Insuficient disk space
  DvrInsufficientDiskSpace = 31

  // NAS failures
  DvrNASDiskConnectionLostFailure = 32
  DvrNASDiskInitializationFailure = 33

  // Database events
  SMServerDBConnectionLost = 34
  SMServerDBConnectionRestored = 35
  SMServerAuditTrailCacheFull = 36

  // Temperature events
  DvrTemperatureLpcOk = 37
  DvrTemperatureLpcWarning = 38
  DvrTemperatureLpcFailure = 39
  DvrTemperatureCpuOk = 40
  DvrTemperatureCpuWarning = 41
  DvrTemperatureCpuFailure = 42
  DvrTemperatureHddOk = 43
  DvrTemperatureHddWarning = 44
  DvrTemperatureHddFailure = 45
  DvrTemperatureDisplayAdapterOk = 46
  DvrTemperatureDisplayAdapterWarning = 47
  DvrTemperatureDisplayAdapterFailure = 48
  DvrTemperaturePsuOk = 49
  DvrTemperaturePsuWarning = 50
  DvrTemperaturePsuFailure = 51
  DvrTemperatureAcpiOk = 52
  DvrTemperatureAcpiWarning = 53
  DvrTemperatureAcpiFailure = 54
  DvrTemperatureRamOk = 55
  DvrTemperatureRamWarning = 56
  DvrTemperatureRamFailure = 57

  DvrMetadataDatabaseConnectionError = 58

  GatewayUp = 59
  GatewayDown = 60

  DvrFatalRuntimeError = 61

  SMSServerUp = 62
  SMSServerDown = 63
  
  LicenseIsAboutToExpire = 64
  LicenseHasExpired = 65
  
  AutomaticBackupFailed = 66
  -->
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.