preferences.yaml becomes preferences.toml: config.toml and the device-config backups were already TOML, and tomli/tomli-w already dependencies, so PyYAML existed for this one file and is dropped. The file keeps its shape - flat keys, only the overrides, grouped under comment headings with each entry's help and default - and one name, PREFERENCES_FILENAME, for both call sites. TOML refuses a whole document over one bad line, so a refused file is read again a line at a time: a valid line keeps its typed value, a refused one hands its right-hand side to parse_value as text. One broken hand edit still costs only its line, and a word left unquoted (log_level = DEBUG) still reads. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
60 lines
2.6 KiB
TOML
60 lines
2.6 KiB
TOML
# MeshTerm configuration: where things live, and which device to talk to.
|
|
# Copy to ~/.meshterm/config.toml (or pass --db / --port on the CLI).
|
|
#
|
|
# How MeshTerm itself behaves — transmit cooldown, message retries, how much history it
|
|
# keeps, whether it connects at launch — is *not* here. Those are preferences: they live
|
|
# in ~/.meshterm/preferences.toml, and are edited on the Preferences page (or with
|
|
# `meshterm preferences set <key> <value>`). Every one has a built-in default, so that
|
|
# file only ever lists what you have changed.
|
|
#
|
|
# Profiles are optional. With no profile, no --port/--ble/--tcp, MeshTerm discovers attached
|
|
# serial devices and nearby Bluetooth companions, lets you pick one (interactively) or uses the
|
|
# single one present, and remembers the last device that connected as the default for next time.
|
|
# A network (TCP) companion isn't discoverable — name it with --tcp host:port, a TCP profile, or
|
|
# the picker's "add a network device" prompt. Define profiles below only to give your hardware
|
|
# stable aliases (e.g. --profile yagi, --profile handheld for Bluetooth, --profile wifi for TCP).
|
|
|
|
default_profile = "s3"
|
|
# Open the radio link as soon as the menu appears. False opens it lazily instead — only
|
|
# once monitoring is turned on or a tool first needs the radio.
|
|
connect_on_start = true
|
|
# db_path = "C:/Users/you/meshterm/meshterm.db"
|
|
|
|
# One [profiles.<name>] block per physical companion device.
|
|
[profiles.s3]
|
|
port = "COM5"
|
|
baudrate = 115200
|
|
default_tx_power = 20
|
|
description = "XIAO ESP32-S3 + Wio SX1262 serial companion"
|
|
|
|
[profiles.yagi]
|
|
port = "COM6"
|
|
description = "Yagi repeater (reaching the wider mesh)"
|
|
|
|
[profiles.local]
|
|
port = "COM7"
|
|
description = "Local-range repeater"
|
|
|
|
[profiles.observer]
|
|
port = "COM8"
|
|
description = "XIAO observer running a bot"
|
|
|
|
# A Bluetooth LE companion: give it an `address` (from `meshterm devices`) instead of a port.
|
|
# The `transport = "ble"` line is optional — a bare `address` already implies Bluetooth.
|
|
[profiles.handheld]
|
|
address = "AA:BB:CC:DD:EE:FF"
|
|
# transport = "ble"
|
|
# ble_pin = "123456" # only if your device requires a pairing PIN
|
|
description = "Pocket handheld over Bluetooth"
|
|
|
|
# A network (TCP) companion — a WiFi board, or a meshcored-style proxy — reachable at a
|
|
# host:port. Give it a `host` (and optional `tcp_port`, default 5000); a bare `host` already
|
|
# implies TCP, so the `transport = "tcp"` line is optional. A TCP companion isn't discoverable,
|
|
# so a profile (or --tcp host:port, or the picker's "add a network device" prompt) is how you
|
|
# reach one.
|
|
[profiles.wifi]
|
|
host = "192.168.1.50"
|
|
# tcp_port = 5000
|
|
# transport = "tcp"
|
|
description = "Basestation over WiFi"
|