101 Commits

Author SHA1 Message Date
Ian McEwen
17f3605736 Ensure set-owner combined with set-owner-short sets both values 2024-09-05 13:58:02 -07:00
Ian McEwen
15b03b704c Correctly detect LocalConfig vs. LocalModuleConfig, again. fixes #630 2024-07-03 20:35:58 -07:00
Kevin Hester
88b73611f0 Move protobufs to meshtastic.protobuf python namespace 2024-06-26 10:05:59 -07:00
Ian McEwen
5441266565 Wait for response with --device-metadata. Fixes #527 2024-06-08 07:26:20 -07:00
Ian McEwen
1746ad15d7 Use new fixed position admin messages and add --remove-position argument. Fixes #525 2024-05-31 18:44:33 -07:00
Ian McEwen
9fc86f9450 Merge pull request #558 from geeksville/pr-fixjson
Pretty indent --info JSON output (see below for details)
2024-04-28 21:40:43 -07:00
geeksville
3886bc16d7 Update python client to use the 'modern' meshtastic protocol init flow
Some time ago I updated the protocol so that after sending NODEINFOs to
client devices (via fromRadio protobufs), it would proactively send the
channel definitions.  Prior to this the client had to ask for each channel
by sending an admin request.  This handshaking was really slow for mobile/
bluetooth clients.  So in the current device code (last couple of years)
the device automatically sends this info to the client during initial config
download.

Unfortunately I never updated the python client to expect this.  I assumed
(incorrectly) that it would just cope and keep sending the channel requests
the old way it always had (which is still supported by devices - and
required for remote administration of nodes).

This change removes sending channel requests (for the local node only)
from the python startup code.  It also now understands (no longer ignoring)
the channels which were sent proactively by the local device.

This makes connection/config/api operations from the python client 100%
reliable again.  Previously it would only work sometimes depending on how
quickly it was able to get the local node db downloaded.

Also this flow is much faster - which should help all users of the python
api.
2024-04-27 11:59:17 -07:00
geeksville
7fe98bc266 Pretty indent --info JSON output (see below for details)
Changes to make --info much more human readable (while still keeping
machine readabilty for anyone foolish enough to be parsing the existing
output as text)

* change message_to_json to optionally not strip the multiline JSON
* use multiline=True for the two places we are printing to the console
* make the node list JSON indented
2024-04-26 15:15:57 -07:00
Ian McEwen
6812f508bc Add --enter-dfu for entering DFU mode on NRF52 devices via admin message 2024-04-25 11:21:27 -07:00
Ian McEwen
243b310eb2 Allow generating QR codes for remote nodes and for all channels 2024-04-21 09:41:07 -07:00
Ian McEwen
6e7933a3ce Fix my own pylint mistakes 2024-04-11 18:40:10 -07:00
Ian McEwen
f449ff9506 Add a variety of type annotations, primarily in mesh_interface 2024-04-11 18:28:01 -07:00
Ian McEwen
439b1ade2e Add --remove-node (fixes #514) 2024-04-08 14:58:15 -07:00
Ian McEwen
b57d1d81ff Fix up pylint from merged PR 2024-04-02 15:15:22 -07:00
Ian McEwen
4c97866875 Merge pull request #511 from flavoromission/506-show-all-module-settings
feat:506 show all module settings
2024-04-02 13:11:35 -07:00
Ian McEwen
59091664db Check against proper full name for moved protobufs 2024-03-29 18:38:26 -07:00
Ian McEwen
b8640666d7 Fix some outstanding pylint issues (or disable the checks) 2024-03-19 12:47:08 -07:00
flavor omission
27be73c707 feat:506 show all module settings
Problem:
Missing fields are omitted.

Solution:
This fix sets the flag `always_print_fields_with_no_presence`
in the invocation of the protobuff method
`MessageToJson` will display the missing fields.

see: MessageToJson 6b36eb633c/python/google/protobuf/json_format.py (L82)
see: issue #506 https://github.com/meshtastic/python/issues/506
2024-03-18 00:01:47 -04:00
Ben Meadors
67636c4ce2 Revert "Move pb2 Files to Own Folder" 2024-03-11 12:18:25 -05:00
foglet15
df8ea85873 change to PbDefinitions for clearer naming 2024-02-25 14:22:15 -05:00
foglet15
9a4feecea8 move pb2 to own folder, regen script writes to new folder, update imports 2024-02-25 13:11:36 -05:00
Jonathan Bennett
a067c9295e Fixup handling for radio configs with disabled channel 2024-02-22 00:44:25 -06:00
Thomas Herrmann
22f2168bfd add paxcounter moduleConfig
(fixes Bug #485 "No valid config with name paxcounter" for me)
2024-02-10 14:06:02 +01:00
Timothy Harder
52f8e82ea1 _getAdminChannelIndex can get the index of the admin channel regardless of case. 2024-01-07 14:02:44 -06:00
GUVWAF
e25b183c23 Add getter/setter for AmbientLighting Module 2023-11-02 20:35:57 +01:00
Ben Meadors
52cc825b3e Update protobufs 2023-08-21 14:56:26 -05:00
Ben Meadors
e76c9852d6 2.2 changes and added device_metadata 2023-08-08 16:40:15 -05:00
luzpaz
0a88ca6a5c Fix various source comment typos
Found via `codespell -q 3`
2023-07-15 01:04:47 +00:00
Ben Meadors
9dda5d6d2d Merge pull request #449 from pdxlocations/no-psk
Show Channels with No PSK on --info
2023-06-25 14:48:04 -05:00
GUVWAF
959c597e33 Setter for NeighborInfo 2023-06-25 15:50:59 +02:00
pdxlocations
4b0ca13ad1 list channels with no psk 2023-06-15 21:29:46 -07:00
Thomas Göttgens
97aa8a8d74 fixing a few linter errors. 2023-03-31 20:09:59 +02:00
Thomas Göttgens
7e6f13f0a2 establish trunk format 2023-03-31 20:09:59 +02:00
Manuel Verch
193c3faca5 Fix remote_hardware configuration 2023-03-26 16:25:59 +02:00
GUVWAF
55f6494681 Wait for ACK after setting remote config 2023-03-19 14:42:12 +01:00
GUVWAF
b2cfebc5a7 '--set' works as well, also chained commands 2023-03-18 21:12:05 +01:00
GUVWAF
802768e0cc Nicer printing 2023-03-18 16:40:27 +01:00
GUVWAF
f68e4112e1 Remote get method works 2023-03-18 15:20:00 +01:00
Thomas Göttgens
7b8a83ade7 get and set RTTTL ringtone 2023-01-04 19:52:24 +01:00
Ben Meadors
254e9f4015 Typos 2022-12-22 14:35:48 -06:00
GUVWAF
c1054caf4a Only set wantResponse for admin packets 2022-11-27 12:44:58 +01:00
GUVWAF
868fb64857 Only set is_licensed if long_name is set 2022-11-26 11:08:00 +01:00
GUVWAF
8729e97e1b Remove automatic short owner naming and increase to 4 characters 2022-11-26 10:52:20 +01:00
Ben Meadors
4bd10bc102 Add begin / edit transactions for setting updates 2022-11-20 19:46:43 -06:00
GUVWAF
5c75e74bf9 Don't request config and channels if not needed.
Instead, wait for an (implicit) ACK or NAK.
Applies to admin packets set-owner, reboot,
shutdown, factory-reset and reset-nodedb.
2022-11-19 21:19:06 +01:00
Ben Meadors
c9b5d5d697 Update protos and add audio 2022-11-09 21:20:38 -06:00
Ben Meadors
f16dd0e737 Update url 2022-11-08 18:25:49 -06:00
Ben Meadors
83776ceec5 Fix url 2022-11-02 21:20:25 -05:00
Thomas Göttgens
cfb8769746 add reeboot to ota command for testing purposes. This is a developer only command for now :-) 2022-10-10 16:59:01 +02:00
GUVWAF
cc29cab99a Remove additional print statements 2022-10-08 13:20:28 +02:00