Skip to content

kazunoko query COMMAND

Send a raw command string to the OSECHI detector and display the response.

This is a low-level command for direct device communication. For common operations, the dedicated commands (status, threshold, measure, etc.) are easier to use.


Basic Usage

kazunoko query GET_STATUS
kazunoko query "SET_POLL_COUNT 200"
kazunoko query GET_VERSION

CLI Options

Option Short Default Description
--port -p auto Serial port, or auto for auto-detection
--timeout -t 0.1 Serial communication timeout in seconds
--verbose / --quiet -v / -q --quiet Show or suppress status messages
--format -f jsonl Output format: jsonl, table, json, csv, ssv, tsv, ltsv
--use-flat / --use-raw --use-flat Use flattened or raw field names
--mock off Use mock device (no hardware needed)

Available Device Commands

Command Description
GET_STATUS Device status
GET_VERSION Firmware version
GET_MAC_ADDRESS Device MAC address
GET_UPTIME Device uptime in milliseconds
GET_HELP Device help text
GET_USAGE List all available commands
GET_THRESHOLD <channel> Current threshold for a channel
SET_THRESHOLD <channel> <value> Set threshold for a channel
SET_POLL_COUNT <count> Set poll cycle count
SET_DEADTIME <ms> Set deadtime in milliseconds
GET_RTC_TIME Get device RTC time
SET_RTC_TIME <value> Set device RTC time
TEST_LED <channel> <state> Control LED
RESET Reset device to defaults

Use dedicated commands for common tasks

kazunoko threshold, kazunoko status, and kazunoko measure wrap these commands with a friendlier interface. Use query when you need direct access or want to send a command not covered by the CLI.


Usage Examples

Check device status

kazunoko query GET_STATUS

Get firmware version

kazunoko query GET_VERSION

Set poll count

kazunoko query "SET_POLL_COUNT 200" --port /dev/ttyUSB0

Get current threshold for channel 1

kazunoko query "GET_THRESHOLD 1"

Set threshold for channel 1

kazunoko query "SET_THRESHOLD 1 300"

Format output as JSON and filter with jq

kazunoko query GET_STATUS --format json | jq .timestamp

Test without hardware

kazunoko query GET_STATUS --mock