Command Line Interface Reference

chromatron

Chromatron Command Line Interface

All of these commands, except for a few setup commands, can run on groups of devices. If the host or query options are passed, the command will discover matching devices and run on those results. If options are not provided, the command will run on the results from the last invocation of the discover command.

Examples:

 chromatron.py discover –query Camelot

Finds and stores all devices with a query tag matching Camelot.

 chromatron.py firmware version

List firmware version on all devices matching the previous discover, in this case, devices located in Camelot.

 chromatron.py –query King_Arthur firmware version

List firmware version on all devices with a tagged with King_Arthur. This will not overwrite the previous discovery results.

 chromatron.py firmware version

Since no options are given, this will use the previous discovery, again matching devices located in Camelot. This does not re-run the discovery, so if a device is added or removed from Camelot, the discover command would need to be run again.
chromatron [OPTIONS] COMMAND [ARGS]...

Options

-h, --host <host>

Name or IP address of target. Can also specify USB for local connection.

-q, --query <query>

Query for matching tags.

--version

Show the version and exit.

automaton

Automaton controls

chromatron automaton [OPTIONS] COMMAND [ARGS]...

load

Compile and load script to automaton

chromatron automaton load [OPTIONS] FILENAME

Options

--live

Live mode

Arguments

FILENAME

Required argument

compile

Compile an FX script

chromatron compile [OPTIONS] FILENAME

Options

--debug

Print debug information during script compilation

Arguments

FILENAME

Required argument

dimmer

Dimmer commands

chromatron dimmer [OPTIONS] COMMAND [ARGS]...

master

Set master dimmer.

VALUE is from 0.0 to 1.0.

chromatron dimmer master [OPTIONS] VALUE

Arguments

VALUE

Required argument

show

Show current dimmer settings

chromatron dimmer show [OPTIONS]

sub

Set submaster dimmer.

VALUE is from 0.0 to 1.0.

chromatron dimmer sub [OPTIONS] VALUE

Arguments

VALUE

Required argument

discover

Discover Chromatron devices on the network

Discovers devices matching host or tag options. The results of this command will be stored to a file, and will be used as the default set of devices for all other commands.

You can specify multiple tags to narrow the search. Only devices matching all tags will be found.

If host or tags are not specified, discover will find all devices.

Note that host and tag options should be passed before discover:

 This will work:

chromatron.py –tag Camelot discover

 This will not:

chromatron.py discover –tag Camelot
chromatron discover [OPTIONS]

firmware

Firmware commands

chromatron firmware [OPTIONS] COMMAND [ARGS]...

backup

Backup settings on selected devices

chromatron firmware backup [OPTIONS]

manifest

Show manifest for current firmware package

chromatron firmware manifest [OPTIONS]

Options

-r, --release <release>

Name of release to display

releases

List available releases

chromatron firmware releases [OPTIONS]

restore

Restore settings to selected devices

chromatron firmware restore [OPTIONS]

update

Update releases

chromatron firmware update [OPTIONS]

upgrade

Upgrade firmware on selected devices

chromatron firmware upgrade [OPTIONS]

Options

-r, --release <release>

Name of release to load. Default is latest.

--force

Force firmware upgrade even if versions match.

--change_firmware <change_firmware>

Change firmware on device.

--yes

Answer yes to all firmware change confirmation prompts.

version

Show firmware version on selected devices

chromatron firmware version [OPTIONS]

fs

File system commands

chromatron fs [OPTIONS] COMMAND [ARGS]...

cat

View a file

chromatron fs cat [OPTIONS] FILENAME

Arguments

FILENAME

Required argument

get

Get a file

chromatron fs get [OPTIONS] FILENAME

Arguments

FILENAME

Required argument

list

List files

chromatron fs list [OPTIONS]

put

Put a file

chromatron fs put [OPTIONS] FILENAME

Arguments

FILENAME

Required argument

rm

Remove a file

chromatron fs rm [OPTIONS] FILENAME

Arguments

FILENAME

Required argument

identify

Identify devices

chromatron identify [OPTIONS]

keys

Key-value system commands.

These commands provide direct access to the key-value database.

Use caution when setting system keys. Actions cannot be undone, and a careless setting may require a complete reset and reconfiguration of the device.

chromatron keys [OPTIONS] COMMAND [ARGS]...

get

Get key on devices

chromatron keys get [OPTIONS] KEY

Arguments

KEY

Required argument

list

List all keys on devices

chromatron keys list [OPTIONS]

set

Set key on devices

chromatron keys set [OPTIONS] KEY VALUE

Arguments

KEY

Required argument

VALUE

Required argument

meta

Meta data setup commands

chromatron meta [OPTIONS] COMMAND [ARGS]...

add_tag

Add a meta data tag to devices

chromatron meta add_tag [OPTIONS] TAG

Arguments

TAG

Required argument

list

List meta data tags on devices

chromatron meta list [OPTIONS]

reset

Reset meta data to default

chromatron meta reset [OPTIONS]

Options

--force

Force meta data reset without prompting for confirmation.

rm_tag

Remove a meta data tag from devices

chromatron meta rm_tag [OPTIONS] TAG

Arguments

TAG

Required argument

set_location

Set location on devices

chromatron meta set_location [OPTIONS] TAG

Arguments

TAG

Required argument

set_name

Set name on devices

chromatron meta set_name [OPTIONS] TAG

Arguments

TAG

Required argument

setup

Set meta data on devices.

Meta data is:

name location

and up to 6 additional tags

Each item is an ASCII string, up to 32 characters.

chromatron meta setup [OPTIONS]

ping

Ping devices

chromatron ping [OPTIONS]

pixels

Pixel commands

chromatron pixels [OPTIONS] COMMAND [ARGS]...

get_clock

Get pixel clock.

Returns current pixel clock in Hz.

chromatron pixels get_clock [OPTIONS]

hue

Set hue on all pixels

chromatron pixels hue [OPTIONS] VALUE

Arguments

VALUE

Required argument

reset

Reset pixel configuration to default

chromatron pixels reset [OPTIONS]

sat

Set sat on all pixels

chromatron pixels sat [OPTIONS] VALUE

Arguments

VALUE

Required argument

set_clock

Set pixel clock.

VALUE is in Hz.

Valid range is 250 KHz to 3.2 MHz.

The default pixel clock is set to 1 MHz. It is not recommended to change this.

The signal quality will begin to degrade above 2 MHz, and operation above this range is not guaranteed.

The WS2811/WS2812 mode uses a fixed clock and will override any setting attempted through this command.

This setting is ignored in PWM mode.

chromatron pixels set_clock [OPTIONS] VALUE

Arguments

VALUE

Required argument

setup

Configure pixel driver settings.

This command will set up pixel type, number of pixels, and RGB order.

chromatron pixels setup [OPTIONS]

show_settings

Show pixel settings.

Shows pixel mode, clock, and pixel count.

Note that some of the pixel modes map to multiple pixel types. This command will return the name of the pixel mode used by Chromatron internally, and may not match the name used to configure the device.

Example: ws2811, ws2812, and ws2812b internally all use the ws2811 mode.

chromatron pixels show_settings [OPTIONS]

val

Set val on all pixels

chromatron pixels val [OPTIONS] VALUE

Arguments

VALUE

Required argument

reboot

Reboot devices

chromatron reboot [OPTIONS]

show

Show current devices

chromatron show [OPTIONS]

vm

Virtual machine controls

chromatron vm [OPTIONS] COMMAND [ARGS]...

clean

Erase all VM script files (.fxb)

chromatron vm clean [OPTIONS]

load

Compile and load script to virtual machine

chromatron vm load [OPTIONS] FILENAME

Options

--live

Live mode

Arguments

FILENAME

Required argument

reload

Recompile and reload the FX script on device

chromatron vm reload [OPTIONS]

reset

Reset virtual machine

chromatron vm reset [OPTIONS]

start

Start virtual machine

chromatron vm start [OPTIONS]

stop

Stop virtual machine

chromatron vm stop [OPTIONS]

wifi

Wifi setup commands

chromatron wifi [OPTIONS] COMMAND [ARGS]...

monitor

Monitor Wifi signal strength

chromatron wifi monitor [OPTIONS]

reset

Reset wifi configuration to default.

This command only works over USB.

chromatron wifi reset [OPTIONS]

setup

Configure wifi settings over USB.

Connects to a device over USB and prompts for wifi parameters. If multiple devices are connected to USB, only one of them will be selected.

This command ignores discovery parameters and only works over USB. This is to prevent accidentally breaking the wifi configuration of an entire group of devices. If you really need to change wifi parameters of a device over wifi, see the keys subcommand.

You can pass the SSID and password on the command line as a shortcut.

The SSID and password must be 32 characters or less.

chromatron wifi setup [OPTIONS]

Options

--wifi_ssid <wifi_ssid>

Wifi router

--wifi_password <wifi_password>

Wifi password