Skip to content

5. Run the DMS3 Components

Rich edited this page Mar 13, 2025 · 2 revisions

With all the DMS3 components properly configured and redistributed across various server and client devices, it's now possible to run DMS3.

5a. Run DMS3 Components as Executables

Run the DMS3Server Component

On the server, run DMS3Server by typing dms3server. The component should now be started, and if configured correctly, generating logging information either to the display or to a log file.

An example of DMS3Server logging output is displayed below:

INFO: 2022/01/25 19:27:11 lib_log.go:81: dms3server started
 INFO: 2022/01/25 19:27:11 lib_log.go:81: server started
 INFO: 2022/01/25 19:27:39 lib_log.go:81: OPEN connection from: 10.10.10.183:52624
 INFO: 2022/01/25 19:27:39 lib_log.go:81: Sent dashboard enable state as: 0
 INFO: 2022/01/25 19:27:41 lib_log.go:81: /usr/sbin/ip command: no device mac address found
 INFO: 2022/01/25 19:27:41 lib_log.go:81: Sent motion detector state as: 1
 INFO: 2022/01/25 19:27:41 lib_log.go:81: CLOSE connection from: 10.10.10.183:52624
 INFO: 2022/01/25 19:27:49 lib_log.go:81: OPEN connection from: 10.10.10.183:52626
 INFO: 2022/01/25 19:27:49 lib_log.go:81: Sent dashboard enable state as: 1
 INFO: 2022/01/25 19:27:50 lib_log.go:81: /usr/sbin/ip command: no device mac address found
 INFO: 2022/01/25 19:27:50 lib_log.go:81: Sent motion detector state as: 1
 INFO: 2022/01/25 19:27:50 lib_log.go:81: CLOSE connection from: 10.10.10.183:52626

In this example, logging is set to the INFO level and is reporting that DMS3Server is sending out to all participating DMS3Client components an initial motion detector state of 0 (disabled). Shortly thereafter, and after not detecting the presence of a user proxy (e.g., the end user's smartphone MAC address), the motion detector state is set to 1 (enabled).

Run the DMS3Client Component

On each of the smart clients, run DMS3Client by typing dms3client. The component should now be started, and if configured correctly, generating logging information either to the display or to a log file.

An example of DMS3Client logging output is displayed below:

INFO: 2022/01/25 19:28:24 lib_log.go:81: dms3client started
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3client.configDashboardClientMetrics
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3dashboard.InitDashboardClient
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3dashboard.(*DeviceMetrics).checkImagesFolder
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3client.startClient
 INFO: 2022/01/25 19:28:24 lib_log.go:81: OPEN connection from: 10.10.10.183:49300
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3client.processClientRequest
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3dashboard.ReceiveDashboardRequest
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3dashboard.receiveDashboardEnableState
 INFO: 2022/01/25 19:28:24 lib_log.go:81: Received dashboard enable state as: 1
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3dashboard.sendDashboardData
 INFO: 2022/01/25 19:28:24 lib_log.go:81: Sent client dashboard data
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3client.receiveMotionDetectorState
 DEBUG: 2022/01/25 19:28:24 lib_log.go:90: dms3client.ProcessMotionDetectorState
 INFO: 2022/01/25 19:28:24 lib_log.go:81: Process not found when running '/usr/bin/pgrep -i motion'
 INFO: 2022/01/25 19:28:24 lib_log.go:81: Received motion detector state as: 0
 INFO: 2022/01/25 19:28:24 lib_log.go:81: CLOSE connection from: 10.10.10.183:49300

In this example, logging is set to the DEBUG level and is reporting that DMS3Client is receiving from the DMS3Server component a motion detector state of 0 (disabled).

5b. Optional: Run DMS3 Components as Services

Running either the DMS3Client or DMS3Server components as services (daemons) is preferred, as these services can be configured to run in the background at machine startup, recover from failures, etc.

As different Unix-like systems use different approaches for system service management and startup, service configuration is beyond the scope of the install procedure. However, the DMS3 project does include sample systemd unit files for both the DMS3Client and the DMS3Server components called dms3client.service, and dms3client.service, respectively, and are located in the dms3_release folder at dms3_release/dms3client and dms3_release/dms3server.

5c. Optional: View the DMS3Dashboard Component

By default (as configured in dms3dashboard.toml), the DMS3Dashboard component is enabled and configured to run locally with the DMS3Server component on port 8081. To view the DMS3Dashboard in a web browser, go to localhost:8081.

Note that the DMS3Server component must be running in order to view the DMS3Dashboard.

Clone this wiki locally