Skip to content

About

Command-line tool for automating LightBurn over UDP — load files, start jobs, and monitor status remotely.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightBurn Automation Tool

A command-line tool for automating LightBurn operations, allowing you to control LightBurn remotely through UDP commands. This tool enables automation of common LightBurn tasks like loading files, starting jobs, and monitoring status.

Features

  • Load and process LightBurn files
  • Start jobs automatically
  • Check LightBurn status
  • Close LightBurn gracefully or forcefully
  • Remote control support via UDP
  • Automatic LightBurn process management
  • Debug mode for detailed operation logging

Installation

  1. Ensure you have LightBurn installed on your system
  2. The tool will automatically detect LightBurn in standard installation locations:
    • Program Files/LightBurn
    • Program Files (x86)/LightBurn

Usage

lightburn [options] [file]

Basic Commands

  • -h, --help - Show help message
  • -v, --version - Show version information
  • -a, --about - Show about information
  • -f, --file=FILE - Load and process a .lbrn2 file
  • -F, --file=FILE - Force load and process a .lbrn2 file
  • -r, --run - Start the job after loading
  • -c, --close - Close LightBurn
  • -C, --force-close - Force close LightBurn
  • -s, --status - Check LightBurn status
  • -p, --ping - Ping LightBurn
  • -d, --debug - Enable debug output

Network Options

  • -i, --ip=IP - Target IP address (default: 127.0.0.1)
    • When using a non-localhost IP, installation and process checks are automatically skipped
  • -o, --out-port=PORT - Output port (default: 19840)
  • -I, --in-port=PORT - Input port (default: 19841)

Advanced Options

  • --skip-install-check - Skip checking if LightBurn is installed
    • Automatically enabled when using non-localhost IP
  • --skip-process-check - Skip checking if LightBurn process is running
    • Automatically enabled when using non-localhost IP

Examples

  1. Load a file, start the job, then close LightBurn:
lightburn -f test.lbrn2 -r -c
  1. Force load a file:
lightburn -F test.lbrn2
  1. Check LightBurn status:
lightburn -s
  1. Ping LightBurn:
lightburn -p
  1. Control LightBurn on a remote machine:
lightburn -i 192.168.1.100 -p

Note: When using a remote IP, installation and process checks are automatically skipped since they're not applicable to remote machines.

How It Works

Behind the Scenes

  1. Process Management

    • The tool automatically detects if LightBurn is installed
    • Can start LightBurn if it's not running
    • Monitors process status and waits for initialization
    • Skips installation and process checks when targeting non-localhost IPs
  2. UDP Communication

    • Uses UDP ports 19840 (outgoing) and 19841 (incoming) by default
    • Sends commands to LightBurn and receives responses
    • Implements timeout handling (2 seconds) for responses
  3. Command Flow

    • Each command follows this general flow:
      1. Check LightBurn status
      2. Start LightBurn if needed
      3. Wait for LightBurn to be ready
      4. Send the command
      5. Wait for response
      6. Process the response

Command Details

Load File (-f or -F)

  • Regular load (-f): Attempts to load the file normally
  • Force load (-F): Forces LightBurn to load the file, closing any open files first
  • Behind the scenes:
    1. Verifies LightBurn is running
    2. Sends "LOADFILE:" or "FORCELOAD:" command with file path
    3. Waits for confirmation

Run Job (-r)

  • Triggers the start of the loaded job
  • Behind the scenes:
    1. Sends "START" command
    2. Waits for job initialization confirmation

Status Check (-s)

  • Checks current LightBurn status
  • Behind the scenes:
    1. Sends "STATUS" command
    2. Returns detailed status information

Close (-c or -C)

  • Regular close (-c): Attempts graceful shutdown
  • Force close (-C): Forces immediate shutdown
  • Behind the scenes:
    1. Sends "CLOSE" or "FORCECLOSE" command
    2. Waits for confirmation
    3. Verifies process termination

Ping (-p)

  • Tests communication with LightBurn
  • Behind the scenes:
    1. Sends "PING" command
    2. Verifies response within timeout period

Debug Mode

Enable debug mode with -d or --debug to see detailed operation logs, including:

  • Command execution steps
  • UDP communication details
  • Process management operations
  • Response handling

Error Handling

The tool implements comprehensive error handling for:

  • LightBurn not installed
  • Process start failures
  • Communication timeouts
  • Invalid commands
  • Network issues

About

Command-line tool for automating LightBurn over UDP — load files, start jobs, and monitor status remotely.

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages