From 290ec5406ea9ad983cdd01f4a0b0442c383f40a7 Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 20 Jul 2025 16:00:03 +0200 Subject: [PATCH] v1.1.7 with upd doc --- README.md | 10 +++++++++- pyproject.toml | 2 +- src/meshcore_cli/meshcore_cli.py | 9 ++++++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0beff95..12c1fca 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ If the directory exists, default ble address and history will be stored there. If there is an initialization script file called ```init```, it will be executed just before the commands provided on command line are executed (and after evaluation of the arguments). +Init files can also be defined for a given device, meshcore-cli will look for ```<device-name>.init``` file in configuration directory (usefull to specify timeout for contacts that are behind bridges with ```contact_timeout``` command). + ### Arguments Arguments mostly deals with ble connection @@ -81,13 +83,14 @@ Commands are given after arguments, they can be chained and some have shortcuts. advert : sends advert a floodadv : flood advert get <param> : gets a param, "get help" for more - set <param> <value> : sets a param, "set help" for more + set <param> <value> : sets a param, "set help" for more time <epoch> : sets time to given epoch clock : get current time clock sync : sync device clock st Contacts contacts / list : gets contact list lc contact_info <ct> : prints information for contact ct ci + contact_timeout <ct> v : sets temp default timeout for contact share_contact <ct> : share a contact with others sc export_contact <ct> : get a contact's URI ec import_contact <URI> : import a contact from its URI ic @@ -97,6 +100,11 @@ Commands are given after arguments, they can be chained and some have shortcuts. change_path <ct> <pth> : change the path to a contact cp change_flags <ct> <f> : change contact flags (tel_l|tel_a|star)cf req_telemetry <ct> : prints telemetry data as json rt + req_mma <ct> : requests min/max/avg for a sensor rm + req_acl <ct> : requests access control list for sensor + pending_contacts : show pending contacts + add_pending <key> : manually add pending contact from key + flush_pending : flush pending contact clist Repeaters login <name> <pwd> : log into a node (rep) with given pwd l logout <name> : log out of a repeater diff --git a/pyproject.toml b/pyproject.toml index 6e408cc..5501e84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore-cli" -version = "1.1.6" +version = "1.1.7" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, ] diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 2412d0d..dd474dd 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -23,7 +23,7 @@ from prompt_toolkit.shortcuts import radiolist_dialog from meshcore import MeshCore, EventType, logger # Version -VERSION = "v1.1.6" +VERSION = "v1.1.7" # default ble address is stored in a config file MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/" @@ -1979,6 +1979,7 @@ def command_help(): Contacts contacts / list : gets contact list lc contact_info : prints information for contact ct ci + contact_timeout v : sets temp default timeout for contact share_contact : share a contact with others sc export_contact : get a contact's URI ec import_contact : import a contact from its URI ic @@ -1988,6 +1989,8 @@ def command_help(): change_path : change the path to a contact cp change_flags : change contact flags (tel_l|tel_a|star)cf req_telemetry : prints telemetry data as json rt + req_mma : requests min/max/avg for a sensor rm + req_acl : requests access control list for sensor pending_contacts : show pending contacts add_pending : manually add pending contact from key flush_pending : flush pending contact clist @@ -2009,8 +2012,8 @@ def usage () : -v : prints version -j : json output (disables init file) -D : debug - -S : performs a ble scan and ask for device - -l : list available ble devices and exit + -S : scan for devices and show a selector + -l : list available ble/serial devices and exit -T : timeout for the ble scan (-S and -l) default 2s -a
: specifies device address (can be a name) -d : filter meshcore devices with name or address