Skip to content

Getting started

This document will give a detailed overview of the RAVAS Central Server once it has been installed.

Server configuration

Once installed the server will be accessible by default at http://localhost:7080. This can be adjusted in the configuration file appsettings.json located in the same folder as the executable (C:\Program Files\RAVAS\Central Server\server\appsettings.json).

You can adjust the current port and host by modifying the Kestrel:Endpoints section. Multiple concurrent endpoints may also be defined. When this file is updated (provided it is valid) the server will immediately apply the changes, no restart is needed.

{
  ...
  "Kestrel": {
    "Endpoints": {
      "HttpApi": {
        "Url": "http://localhost:7080"
      },
      "SecondHttp": {
        "Url": "http://0.0.0.0:8081"
      },
      "HttpsInlineCertFile": {
        "Url": "https://localhost:5001",
        "Certificate": {
          "Path": "<path to .pfx file>",
          "Password": "..."
        }
      }
    }
  }
  ...
}

As of now, this configuration file will be overwritten on re-installs / updates of the server.

Activation

A valid license is required in order to use the Ravas Central Server. To acquire a license, contact Dorin at dorin.cascaval@ravas.com. Once you have a license key, you will be prompted to enter it in the web interface (by default on localhost:7080).

Once activated, the server will create an encrypted license.key file in the executable folder (C:\Program Files\RAVAS\Central Server\server\license.key). Whenever the server restarts / starts up it will read this file to retrieve the current activation status.

Thus the license is independent of the database installation, and will be persisted across re-installs and updates.

The encryption keys used are stored in the Windows registry. It is technically possible for a windows update or reinstallation to render this file unusable, therefore it is a good idea to keep the license code around.

Feature flags

There are 3 feature flags that are controlled by the license the server is activated with:

  • rdcFeature: RDC-compatible functionality allowing RAVAS indicators set in RDC mode to push weights to the server.
  • scaleManagementFeature: Allows the managing of scales. Once a scale is managed, the central server will attempt to maintain an active connection to the scale at all times, tracking, remembering and showing its liveliness status in real-time, which can also be viewed on any timeline. This feature flag also determines whether the REST API is enabled for external services.
  • dataCollectionFeature Allows the server to collect data from scales. This includes parameter values and updates as well as logs from RedBox devices, Weight updates & application logs related to scales from all compatible indicators. The server will store information whenever possible: either because a scale is managed, or because a request from an external service was forwarded to the scale. Information on parameters, weights, etc. may be viewed in real-time as well as historically in the web interface.

Usually licenses should enable most if not all feature flags. In most cases the server would run in the more basic RDC-only mode or in the RIS-like mode for scale management, scale access through the REST API, and data collection and visualization.

License structure

A server license contains the following information encoded in JSON, secured by a digital signature:

  • Start & End dates
  • Enabled features
  • Customer name & email
  • Other metadata

The key is represented as a fairly lengthy string which can be either pasted into the License code text field or uploaded as a text file containing the key text.

The license key is formed by concatenating the minified JSON-encoded data, followed by a newline character, followed by the digital signature encoded in Base64. Commonly it may look like the following:

{... "dataCollectionFeature":true,"expiresAt":"2026-07-17T09:32:41.8499839+02:00" ...}
...AGOXfycSTUAFUs5SAjod2WqS6HoA...==

Create an administrator account

Similarly to a lack of license, unauthenticated users will not be able to access the central server.

On an empty database without users, you will be prompted to create a default administrator account. Make sure to remember the username and password as there is no mechanism to restore them apart from clearing the database.

It is planned to create a special script that the system administrator can use to reset the central service accounts.

Otherwise, this account is nothing special, other administrator accounts may be created afterwards, but there can never be less than one active administrator account. For security reasons, the password requirements are a little annoying:

  • At least 8 characters
  • At least one uppercase letter
  • At least one digit
  • At least one non alphanumeric character (e.g. !@#$%^&*-_)

A maximum of 5 login attempts are allowed before the account is locked for 1 hour.

You may tick the Remember me which will attach a persistent authentication cookie to your browser. The session will remain valid until you either log out manually or you do not access the system for 30 days. With regular use it will renew itself forever.

Most REST API requests must also be authenticated, this is elaborated upon in the API usage documentation.

Application settings

Once you have a licensed, authenticated session, you may begin using the system. There are a few application settings available to configure background operation and system behavior.

Application settings may only be changed by users with the Manager or Admin roles. They are stored in the database.

Some settings will be unavailable with a restricted license, I will list them below assuming everything is available.

Services

  • RDC Server (Port & Toggle)

    configures on which port (default 5555 & enabled) the RDC service will listen for PDR (push data records) from RAVAS indicators on the local network set to RDC mode. For more details on how the RDC service works, see the Services documentation.

  • Discover RedBox scales - default enabled

    configures whether to periodically scan for RedBox scales on the local network. When enabled the server will send a special broadcast UDP packet on port 49111 to automatically discover RedBox scales.

  • Discover ASCII scales - default enabled

    configures whether to periodically scan for ASCII scales on the local network. When enabled the server will send a special broadcast UDP packet on port 30718 to automatically discover RAVAS indicators using the xPico series Wi-Fi module.

Connectivity

  • Disconnect timeout (default 10 000)

    time of inactivity in milliseconds after the server will attempt to query a device for activity, reconnecting on failure.

  • Reconnection time step (default 1 500)

    cumulative time in milliseconds that the server will add before attempting another reconnect to a device after each connection failure.

  • Reconnection maximum time (default 60 000)

    maximum time in milliseconds that the server will wait before reconnecting.

Data collection

Data collection can also be toggled as a whole. It will be disabled if the license does not support the data collection feature flag

  • Collect weight updates - default enabled

    whether to collect weights from connected devices either because they are managed or a request is forwarded

  • Collect device-related application logs - default enabled

    whether to store device related logs (such as connection events) in the database for easy lookup (all logs are stored regardless in log files on disk)

  • Collect RedBox device logs - default enabled

    whether to collect logs from RedBox devices in the database every time a connection is (these logs will not be stored in the log files). Collection

other settings in this group are intended for testing purposes only, not to be used in production.

Data retention

These settings change how long weighing data and database stored device logs should be retained for. The default for logs is 30 days while for weights it is one year. The database will automatically cleanup records older than the time-span set.