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.
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]...
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]...
manifest¶
Show manifest for current firmware package
chromatron firmware manifest [OPTIONS]
Options
-
-r
,
--release
<release>
¶ Name of release to display
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.
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]...
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
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]
pixels¶
Pixel commands
chromatron pixels [OPTIONS] COMMAND [ARGS]...
get_clock¶
Get pixel clock.
Returns current pixel clock in Hz.
chromatron pixels get_clock [OPTIONS]
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]
vm¶
Virtual machine controls
chromatron vm [OPTIONS] COMMAND [ARGS]...
wifi¶
Wifi setup commands
chromatron wifi [OPTIONS] COMMAND [ARGS]...
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