Skip to main content

Basic Commands

Astra provides a range of commands that you can use to interact with the application and control the fireworks launching process. Please refer to the following command descriptions and usage guidelines:

Command: init

init 

  • Description: Initializes the system and establishes a connection with the Raspberry Pi devices.
  • Usage: init
  • Details:
    • When you run the init command, Astra will automatically connect to the Raspberry Pi devices within your network. It retrieves information about the connected modules, hosts, and ignitions. This information is essential for managing and firing the fireworks effectively.

Command: fire sequence

fire_sequence 

  • Description: Fires the generated sequence of ignitions.
  • Usage: fire sequence
  • Details:
    • The fire sequence command triggers the firing process for the previously generated sequence of ignitions. It ensures that the fireworks are launched in the specified order, creating a synchronized and visually appealing display.

Command: fire

fire 

  • Description: Manually fires a specific ignition.
  • Usage: fire -m <moduleName> -d <moduleId> -i <igniteNumber>
  • Parameters:
    • -m <moduleName> (String): Specifies the name of the module where the ignition is located.
    • -d <moduleId> (Integer): Specifies the ID of the host module where the ignition is located.
    • -i <igniteNumber> (Integer): Specifies the number of the ignition to be fired.
  • Example: fire -m ModuleA -d 1 -i 3
  • Details:
    • The fire command allows you to manually ignite a specific firework. Provide the module name, module ID, and ignite number to identify the target firework. Astra will send the command to the corresponding Raspberry Pi device, triggering the ignition and launching the firework.

Command: generate sequence

generate_sequence 

  • Description: Generates a sequence of ignitions for automated firing.
  • Usage: generate sequence -f <format>
  • Parameters:
    • -f <format> (String): Specifies the format of the sequence generation. Supported formats are RANDOM and SEQUENTIAL.
  • Example: generate sequence -f RANDOM
  • Details:
    • The generate sequence command generates a sequence of ignitions for automated firing. You can choose between two formats:
      • RANDOM: The sequence is randomly generated, providing a unique firework display experience each time.
      • SEQUENTIAL: The sequence is generated in a sequential order based on the modules and hosts, ensuring a controlled and organized display.

Command: sequence swap

sequence_swap 

  • Description: Swaps the positions of two ignitions in the generated sequence.
  • Usage: sequence swap <index1> <index2>
  • Parameters:
    • <index1> (Integer): Specifies the index of the first ignition to be swapped.
    • <index2> (Integer): Specifies the index of the second ignition to be swapped.
  • Example: sequence swap 2 5
  • Details:
    • The sequence swap command allows you to swap the positions of two ignitions in the generated sequence. Specify the indices of the ignitions to be swapped to modify the order and create custom firework display arrangements.

Command: override sequence

override_sequence 

  • Description: Resets the currently generated sequence of ignitions.
  • Usage: override sequence
  • Details:
    • The override sequence command clears the currently generated sequence of ignitions, allowing you to create a new sequence from scratch. Use this command when you want to change the firework display order or start fresh with a different arrangement.

Command: override reboot

override_reboot 

  • Description: Resets the system and reinitializes the connection with the Raspberry Pi devices.
  • Usage: override reboot
  • Details:
    • The override reboot command resets the entire system, including all connections with the Raspberry Pi devices. Use this command when you want to start fresh and re-establish connections with the Raspberry Pi devices. After executing this command, run the init command to connect to the devices again.

Please make sure to use the correct command syntax and provide valid parameters to ensure the proper execution of each command.

Note: The above command examples are for demonstration purposes only. Please refer to the specific command syntax and guidelines in the documentation for accurate usage.