Profile Configuration

In general, profiles are configured by declaring certain parameters within the profile's commands as "options" by using a special syntax that associates the name of the option with a default value. Each option uses a unique name (no spaces) and can appear multiple times within a profile. It is this option syntax that allows Aurora apps to provide configurability in a generic way.

As an example, official profiles must provide the following option in order to properly support the Smart Alarm and/or DSL feature. It usually appears within a profile command like so:

stream-config 18 27 {wakeup-time: 28800000}

When Aurora encounters a command that contains a configurable option, it replaces the option declaration with whatever follows the : and comes before the ending }. In the example above, the final command as it is interpreted by AuroraOS becomes:

stream-config 18 27 28800000

This command sets the Smart Alarm wakeup time to 8AM, or 28,800,000 milliseconds after midnight. A single profile option may contain values for multiple parameters, or even contain an entire command as in this example:

{stim-led:led-blink 3 0xFF0000 0xFF 5 500 0}

When Aurora interprets this command, it will actually execute this:

led-blink 3 0xFF0000 0xFF 5 500 0

If the value is empty (i.e. {stim-led:}), nothing is executed.

When customizing a profile, the current profile must first be read and parsed to determine which variables it contains and what their current values are. Most of the hard work has been done for you if you are using one of our official SDKs, however if you are rolling your own configuration system, an easy approach to parsing and customizing is to use a regular expression like this:


This regex will match all valid variables within a profile, providing the variable name as the first capture group and the current value as the second capture group. Altering the profile configuration then becomes a simple text replacement replacing the old values with new ones.

Official Profile Options

For a profile to be compatible with the Aurora app suite, several profile options are required. For some options the order of configuration is important so be sure to consult the Sleep Tracker stream documentation for proper usage.


This option determines the delay until REM stimulation can happen and is specified in milliseconds. No stim-presented events will be emitted until this delay has elapsed. If a value of 0 is specified, there is no delay and stim-presented events will be emitted whenever REM events occur. The default value used in official profiles is 14400000 or 4 hours.


This option configures the minimum amount of time required between successive stim presentations. This is useful to allow/prevent REM stimulation events from ocurring when long periods of uninterrupted REM occur. A value of 0 allows a stim-presented event to occur any time the Aurora sleep stager identifies a REM period. A value of -1 effectively prevents multiple stim-presented events from being emitted during a continuous period of REM. Note that this does not prevent additional stim-presented events from ocurring if other sleep stages occur in between REM periods. The default value used in official profiles is 300000 or 5 minutes.


Controls whether stim-presented events should occur. If truthy, stim-presented events are emitted whenever REM events occur and in accordance with the {stim-delay} and {stim-interval} options.


This is the LED command that is triggered whenever a stim-presented event occurs. It's value can be empty to prevent any light effects from being triggered. By default it's value is led-blink 3 0xFF0000 0xFF 5 500 0 which blinks the red LEDs for 5 seconds at 1HZ.


This is the Buzzer command that is triggered whenever a stim-presented event occurs. By default this value is empty, which means no buzzer sounds will be emitted when stim-presented events occur.


This option configures the Smart Alarm "window". It's value is specified in milliseconds, and represents the amount of time before the configured wakeup time that the Smart Alarm is allowed to wake you up prematurely if it detects an ideal sleep stage for awakening. This is also used to determine when DSL therapy begins. The default value is 1800000, or 30 minutes.


This option is used to enable or disable the Smart Alarm feature. If truthy, Aurora may prematurely emit the wakeup-alarm event during the {wakeup-window} if it detects an ideal moment within your sleep cycle to awaken you.


Controls whether DSL (Dawn Simulating Light) therapy is enabled. If this option is truthy, Aurora will gradually fade in blue light, starting at the beginning of the {wakeup-window} and ending when the wakeup-alarm event is emitted.


This option configures when the wakeup-alarm event should be emitted. It's value is specified in milliseconds after midnight, and represents the absolute latest you wish to be awakened. The alarm can be disabled by providing a value of -1 which is also the default value.

For more information regarding valid values for profile options refer to the Aurora Stream and Aurora Command documentation.

results matching ""

    No results matching ""