Skip to main content

CLI Command Reference

The meshcore.execute_command service (and the CLI Console card) runs commands against your local companion radio. This page lists what you can type.

Which "CLI" is this?

MeshCore has several command vocabularies — they are not interchangeable:

VocabularyWhereExample
This CLI (meshcore-py SDK methods)HA execute_command / CLI Consolesend_device_query, get_bat
Companion app (iOS/Android)The phone GUIbuttons/screens (same protocol underneath)
meshcli (meshcore-cli)A separate terminal toolinfos, advert, send
Repeater / room-server CLISent to a remote repeater after send_loginreboot, set freq …

The commands here are the Python SDK method names (snake_case). So it's send_advert, not advert; send_device_query, not version; get_time, not time. The authoritative source is the meshcore-py library's meshcore/commands/ modules — every async def <name>(...) is a command.

Syntax

  • Space-separated arguments: set_tx_power 20, get_channel 0
  • Quote strings with spaces: set_name "Drew Node"
  • <contact> means a contact's public-key prefix (≥6 hex chars) or its name — used for commands that talk to a remote node.
  • Functional form also works: send_advert(flood=True).

Responses appear in the Developer Tools → Actions result, and — when the command is run with record_to_console: true — in the CLI Console transcript and on the meshcore_cli_response event.

warning

Commands prefixed set_*, import_*, reboot, and send_advert change your device or put traffic on the mesh. Read-only get_* / send_device_query commands are safe to experiment with.

Query / read (safe)

CommandArgsReturns
send_device_queryFirmware version, hardware model (the "version" command)
send_appstartSelf info (name, public key, radio params)
get_batBattery voltage
get_timeDevice clock
get_self_telemetryLocal telemetry payload
get_custom_varsCustom variables
get_stats_coreUptime, queue length, error flags
get_stats_radioNoise floor, last RSSI/SNR, airtime
get_stats_packetsPacket counters
get_contacts[lastmod]Contact list
get_channel<idx>Channel name + secret
get_path_hash_modePath hash mode (0–2)
get_allowed_repeat_freqAllowed repeat frequency
get_tuningRX delay / AF tuning params
get_autoadd_configAuto-add-contacts config

Configuration / write (changes the device)

CommandArgsNotes
set_name<str>Device name
set_tx_power<int>TX power (dBm)
set_time<epoch>Set clock
set_coords<lat> <lon>Set GPS coords
set_radio<freq> <bw> <sf> <cr>Radio params
set_tuning<rx_dly> <af>Tuning params
set_path_hash_mode<int>0=1 byte, 1=2, 2=3
set_telemetry_mode_base / _loc / _env<int>Telemetry modes
set_advert_loc_policy<int>Advert location policy
set_manual_add_contacts<bool>Manual contact-add mode
set_multi_acks<int>Multi-ack setting
set_custom_var<key> <value>Set a custom variable
set_devicepin<int>Device/BLE PIN
send_advert[flood]Broadcast an advert packet to the mesh
rebootReboots the radio

Channels

CommandArgs
get_channel<idx>
set_channel<idx> <name> <secret-hex>

Remote nodes (need a <contact>)

These send traffic over the mesh to another node. The *_sync variants wait for a reply and return it; the async variants return immediately.

CommandArgs
send_login / send_logout<contact> [password]
send_msg<contact> "<message>"
send_cmd<contact> "<command>" (repeater CLI command)
req_status_sync<contact>
req_telemetry_sync<contact>
req_neighbours_sync<contact>
req_owner_sync / req_basic_sync / req_regions_sync<contact>
send_path_discovery<contact>
reset_path<contact>
share_contact / export_contact / remove_contact<contact>
tip

To run a repeater's text CLI (e.g. reboot, advert) on a remote repeater, log in first (send_login <contact> <password>) and then use send_cmd <contact> "<repeater-command>". Those repeater verbs are a different vocabulary from the local commands on this page.

Full list

The complete set the integration recognizes — with argument types — lives in the command_param_types mapping in custom_components/meshcore/services.py. Any method that exists on the meshcore-py commands object can be called even if it isn't listed above.