Configuration

Preferences

To change the default settings of ControlRoom, the desktop application provides a simple dialog window that enables users to change the HTTP server settings and specify SSL/TLS Certificates. To open the dialog, click on the taskbar menu and select “Preferences”.

Basic settings

../../_images/controlroom-settings-basic.png

Basic ControlRoom settings

Config File(s) – optional path to load JSON configuration files

Start BrainD at login – toggles BrainD service to start automatically

Allow remote access – lets other computers view the local USB tree information over a network connection

Use HTTP SecureEnables SSL/TLS on client connections.

Restore Defaults – sets configuration to factory defaults

Cancel – closes the preferences window without saving

Save – saves application settings, restart ControlRoom to apply

Advanced settings

../../_images/controlroom-settings-advanced.png

Advanced ControlRoom settings

Server Address – IP address to allow remote browsers to connect and view the local ControlRoom instance. Default is 127.0.0.1

Server Port – server port for remote connections. Default is 9005

Enable SSLenables SSL/TLS on client connections.

SSL CertificateSSL/TLS Certificate (.crt) file. If not specified, a self-signed cert will be generated.

SSL KeySSL/TLS Key (.key) file. If not specified, a self-signed cert will be generated.

Preferred Network Interface – IP address to allow remote applications to connect over aEther. Default is 127.0.0.1

Configuration Files

ControlRoom allows for more fine-grained control of the backend service through the use of JSON configuration files. This configuration includes settings for logging, polling rates, and web server configuration.

The BrainD service will read the following configuration file for the current operating system:

  1. Windows: %AppData%\Acroname\BrainD\config\config.json

  2. Mac: ~/Library/Application Support/Acroname/BrainD/config/config.json

  3. Linux: ~/.acroname/BrainD/config/config.json

Each entry in the config.json file will be merged into the default configuration object, overriding each field that is listed. In addition, if any configuration files are specified in the “Config File(s)” entry of the Settings menu, these files will be read and merged as well. The default configuration object is defined as the following:

{
    "logging": {
        "loggers": {
            "default": "debug"
        },
        "sinks": {
            "consoleSinks": [
                {
                    "enable": true,
                    "level": "debug",
                    "enableColors": true,
                    "colorPattern": "\u001B[0m[\u001B[32m%Y-%m-%d %H:%M:%S.%e\u001B[0m] [%^%l%$] [\u001B[35m%n\u001B[0m:\u001B[33m%#\u001B[0m] %v",
                    "noColorPattern": "[%Y-%m-%d %H:%M:%S] [%l] [%n:%#] %v"
                }
            ],
            "fileSinks": [
                {
                    "enable": true,
                    "level": "info",
                    "pattern": "[%Y-%m-%d %H:%M:%S] [%l] [%n:%#] %v",
                    "path": {
                        "win": "%AppData%\\Acroname\\BrainD\\log",
                        "mac": "~/Library/Logs/Acroname/BrainD",
                        "lin": "~/.acroname/BrainD/log"
                    },
                    "baseFileName": "braind.log",
                    "maxFiles": 5,
                    "maxFileSize": 5242880
                }
            ]
        },
        "flushInterval": 3000
    },
    "httpServer": {
        "enable": false,
        "address": "0.0.0.0",
        "port": 9005,
        "threadCount": 1
    },
    "httpsServer": {
        "enable": true,
        "address": "0.0.0.0",
        "port": 9006,
        "threadCount": 1,
        "sslCert": "",
        "sslKey": ""
    },
    "pollingRates": {
        "acronameDevicesState": 300,
        "devices": 300,
        "brainstem": 1000
    }
}

Note

The config['httpServer'] and config['httpsServer'] configuration objects will have no effect if the ControlRoom desktop application is used. The value in the Settings dialog takes priority.

Examples

Add an additional log file output:

{
    "logging": {
        "sinks": {
            "fileSinks": [
                {
                    "enable": true,
                    "level": "info",
                    "pattern": "[%Y-%m-%d %H:%M:%S] [%l] [%n:%#] %v",
                    "path": {
                        "win": "C:\\Users\\username\\Desktop",
                        "mac": "~/Desktop",
                        "lin": "~/Desktop"
                    },
                    "baseFileName": "custom-log-file.log"
                }
            ]
        }
    }
}

Increase the log flush rate from 3000ms to 500ms, and reduce the USB tree polling rate from 300ms to 1000ms:

{
    "logging": {
        "flushInterval": 3000
    },
    "pollingRates": {
        "devices": 1000
    }
}