Skip to content

How DMS3 Works

Rich edited this page Mar 13, 2025 · 3 revisions

DMS3Server Operation

The DMS3Server component is responsible for signaling the logic of enabling/disabling the video surveillance system to all device client endpoints. That is, the DMS3Server sends either a Start or a Stop message to all DMS3 device clients configured with a DMS3Client component, listening on the network.

DMS3Server does this by periodically scanning the network for the existence of one or more registered user proxies. These proxy devices can be anything that exposes their MAC address on the network (e.g., a mobile phone on a home LAN). If that device is found on the network, it's assumed that "someone is home" and so DMS3Server sends out a Stop message to all participating device clients, and their respective motion detection application is subsequently stopped (if currently running).

If that user proxy (or multiple proxies) is then no longer found on the network, it's assumed that "nobody is home", and the DMS3Server sends out a Start message to all participating device clients, and the motion detection application on that client is started (if currently stopped). Similar logic is used in the reverse case: when a user proxy is once again "back home," the motion detection application of each device client is signalled to Stop.

Alternatively, the Always On feature instead uses the time of day to enable/disable the surveillance system (effectively overriding the presence/absence of user proxies). The DMS3Server will look at the time range specified, and if the current time falls between the time range, the motion detection application of all client devices will be started. Once the current time falls outside of the specified time range, the motion detection application for each device client is then stopped.

DMS3Client Operation

Running on Smart Device Clients (SDCs)

The DMS3Client component runs on each configured smart device client endpoint, and is responsible for starting/stopping its locally installed motion detection application. The DMS3Client does this by periodically listening to the configured DMS3Server at the pre-configured IP address and port (network socket address). When the DMS3Client receives a change in motion detection application state, it either starts or stops its locally-installed motion detection application.

Running with Less Smart Device Clients (LSDCs)

In instances where the device client is "less smart" and unable to process motion detection in local video streams, an LSDC instead passes motion detection processing to a DMS3Client proxy. Multiple LSDCs can be served by a single DMS3Client proxy. This proxy is then responsible for the operations of a typical DMS3Client.

DMS3Client / DMS3Server Work Flow

Operationally, the DMS3Server and all DMS3Client device clients work together to establish a synchronized security surveillance state across all endpoints:

  • DMS3Server: usually configured as a daemon running on a central server, walks a logic tree whenever a client connects (or re-connects) to the server. DMS3Server is responsible for answering the question "should the surveillance system be enabled or disabled right now?"
  • DMS3Client: usually configured as a daemon that runs on each of the participating smart device clients, a DMS3Client regularly polls (at a configurable interval) the DMS3Server, and receives from the DMS3Server the current motion detection application state (called MotionDetectorState), that is, whether the locally installed motion detection application should be started or stopped

The activity diagram below shows the work flow of these two components:

DMS3 Activity Diagram

DMS3Mail Operation

When using Motion, DMS3Mail is a feature written for DMS3 that allows for the creation and sending an email whenever a valid capture event is triggered in Motion. DMS3Mail is very tightly integrated into Motion, where image and video capture events are identified, analyzed, and processed. DMS3Mail is triggered by the on_picture_save and the on_movie_end commands in Motion.

Note: the optional DMS3Mail component is called by neither DMS3Client nor DMS3Server. Instead, DMS3Mail is called directly by the Motion motion detection application.

The syntax for these Motion commands are:

<on_picture_save|on_movie_end> <absolute path to dms3mail> -pixels=%D -filename=%f

Once configured, DMS3Mail will respond to these two Motion event hooks, and an email will be generated and sent out with an image file or video clip capturing the surveillance event of interest.

Clone this wiki locally