Configuration

Vigilant-Engine can be configured depending on the node. Some settings are present in the Menuconfig, which are not changeable in runtime, and some are configured in runtime.

Runtime settings

Runtime settings are configured in the main file like this:

VigilantConfig VgConfig = {
    .unique_component_name = "Vigilant ESP Test",
    .network_mode = NW_MODE_APSTA
};

Available settings:


unique_component_name, string

The name of the esp node, must be unique.


network_mode, enum

The network mode of the esp node.

Options:
  • NW_MODE_APSTA AP and STA mode
  • NW_MODE_AP AP mode
  • NW_MODE_STA STA mode


VE_INVERT_STATUS_LED, bool

Depending on the board and LED, some activate on LOW and some activate on HIGH. To invert and turn the LED on for LOW, set this option to true.

default: 1


VE_ENABLE_STATUS_LED, bool

Enable status LED, enable this option to use the status LED functionality in Vigilant Engine. The status LED provides visual feedback on the system's status and operations, and can optionally be used for visual output.

default: 1


VE_LED_TYPE, enum

Select the status LED hardware type used by Vigilant Engine.

Options:
  • VE_LED_TYPE_WS2812B Uses a single WS2812B addressable RGB LED.
  • VE_LED_TYPE_NONE Uses a generic GPIO-driven LED setup.

This setting is only available when VE_ENABLE_STATUS_LED is enabled.


VE_STATUS_LED_MODE, enum

Choose how the status LED conveys information depending on your board or preference. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_NONE.

Options:
  • VE_STATUS_LED_MODE_RGB Shows status information by changing colors and frequency. Suitable for a basic RGB led consisting of three separate GPIO pins.
  • VE_STATUS_LED_MODE_BLINK Varies frequency of blinking to match current status. Suitable for a basic led consisting of one GPIO pin.

default: VE_STATUS_LED_MODE_RGB


VE_STATUS_WS2812B_PIN, int

The GPIO pin used as the data output for the WS2812B status LED. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_WS2812B.

default: 8


VE_STATUS_LED_GPIO_RED, int

The GPIO pin number for the red status LED in RGB mode. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_NONE and VE_STATUS_LED_MODE is set to VE_STATUS_LED_MODE_RGB.

default: 46


VE_STATUS_LED_GPIO_GREEN, int

The GPIO pin number for the green status LED in RGB mode. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_NONE and VE_STATUS_LED_MODE is set to VE_STATUS_LED_MODE_RGB.

default: 0


VE_STATUS_LED_GPIO_BLUE, int

The GPIO pin number for the blue status LED in RGB mode. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_NONE and VE_STATUS_LED_MODE is set to VE_STATUS_LED_MODE_RGB.

default: 45


The GPIO pin number for the single status LED in BLINK mode. This setting applies when VE_LED_TYPE is set to VE_LED_TYPE_NONE and VE_STATUS_LED_MODE is set to VE_STATUS_LED_MODE_BLINK.

default: 48



VE_STA_SSID, string

The SSID of the WiFi network the Vigilant Engine should connect to.

default: "starstreak"


VE_STA_PASSWORD, string

The password for the WiFi network the Vigilant Engine should connect to.

default: "starstreak"


VE_STA_RECONNECT_INTERVAL_MS, int

The interval in milliseconds for attempting to reconnect to the WiFi network when the connection is lost in STA mode.

default: 3000


VE_AP_SSID_PREFIX, string

The prefix for the SSID of the WiFi Access Point (AP) mode of the Vigilant Engine. The full SSID will be generated by appending the device's MAC address to this prefix.

default: "starstreak-"


VE_AP_PASSWORD, string

The password for the WiFi Access Point (AP) mode of the Vigilant Engine.

default: "starstreak"



VE_RECOVERY_NETWORK_MODE, choice

Select the recovery firmware network mode.

Options:
  • VE_RECOVERY_NETWORK_MODE_AP Creates a recovery access point
  • VE_RECOVERY_NETWORK_MODE_STA Connects recovery to an existing WiFi network
  • VE_RECOVERY_NETWORK_MODE_APSTA Enables both interfaces

default: VE_RECOVERY_NETWORK_MODE_AP


VE_RECOVERY_STA_SSID, string

The WiFi network the recovery firmware joins in STA or AP+STA mode.

default: "starstreak"


VE_RECOVERY_STA_PASSWORD, string

The password for the recovery station network. Leave it empty for an open network.

default: "starstreak"


VE_RECOVERY_AP_SSID_PREFIX, string

The recovery access point prefix. The firmware appends the final two MAC address bytes.

default: "VE-Recovery-"


VE_RECOVERY_AP_PASSWORD, string

The recovery access point password. It must be empty for an open network or contain 8 to 63 characters.

default: "starstreak"


VE_RECOVERY_AP_CHANNEL, int

The WiFi channel used by the recovery access point.

range: 1 to 14

default: 6


VE_RECOVERY_MAX_CONN, int

The maximum number of stations that can connect to the recovery access point simultaneously.

range: 1 to 15

default: 2


VE_RECOVERY_CONNECTION_TIMEOUT_SECONDS, int

The number of seconds recovery waits for its station interface to connect before continuing.

range: 1 to 3600

default: 30


Vigilant Engine Settings


VE_DISABLE_FRONTEND, bool

Option to disable the frontend embed for the main app, to save flash space. API routes will still be accessible.