Federico Ceratto
c34d08b0e5
Refactor timeago and add tests
...
_timeago is not specialized for mesh interfaces so it is factored
out into a private function
2024-06-21 10:28:45 +02:00
Federico Ceratto
b5d1b7612f
Replace timeago
...
Replace the timeago library with a simple function
2024-06-21 09:25:39 +02:00
Ian McEwen
23f41bff0a
Improve ACK handling: correctly pass them to onAckNak handlers, and add a mechanism for other handlers to request acks as well.
2024-06-20 16:52:01 -07:00
Ian McEwen
9dab76bb64
quell pylint
2024-06-05 18:56:19 -07:00
Ian McEwen
e6d61c6603
Allow a faster nodedb-less startup on 2.3.11+ with --no-nodes and the magic value from meshtastic/firmware#3949
2024-06-05 18:52:35 -07:00
Ian McEwen
e8dfee8454
Fix rounding of position values when converting from integer to float in _fixupPosition. Fixes #572
2024-05-31 18:57:30 -07:00
Ian McEwen
4d67e7fc76
Fix up/add some more types
2024-05-30 17:51:42 -07:00
Ian McEwen
93e9c1c66c
Initialize unknown nodes more in line with meshtastic/design#16
2024-05-30 13:50:52 -07:00
Ian McEwen
02ed17837b
Improve FromRadio handling, publish messages for client proxy/xmodem stuff tentatively
2024-05-10 14:54:32 -07:00
Ian McEwen
fb8db01427
Print 0 for channel rather than N/A, since we should probably always have a channel. Fixes #562
2024-05-02 18:22:39 -07:00
Ian McEwen
243e297505
Use the new Heartbeat payload variant for the heartbeat instead of an empty ToRadio packet
2024-04-29 15:16:04 -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
4d10b6e1bd
Better support --ch-index for other commands (traceroute, telemetry, position)
2024-04-24 17:18:17 -07:00
GUVWAF
d4156d78c6
Add missing StoreForward config from radio
2024-04-22 20:09:30 +02:00
Ian McEwen
e8ba5581f6
Add a --request-position argument to request positions from nodes
2024-04-16 15:43:24 -07:00
Ian McEwen
a4830f5f62
Treat a message as an ack if there is an errorReason but it's set to NONE, not just if the errorReason is absent
2024-04-16 13:10:18 -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
278ca74a70
Show hops away when present in nodeDB ( fixes #539 )
2024-04-08 11:24:21 -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
4baef92523
Fix assorted mypy-detected errors
2024-03-29 18:38:25 -07:00
Ian McEwen
ad8dbeab14
List unknown node IDs always with 8 hex digits, padded with 0s
2024-03-29 16:15:57 -07:00
Ian McEwen
a139d180b8
Fix up or comment out broken tests, to get CI (hopefully) happy
2024-03-23 22:07:17 -07:00
Ian McEwen
16a1af6a13
Create MeshInterface.MeshInterfaceError to specialize errors in that file
2024-03-19 12:58:44 -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
Ian McEwen
9f2cc28fef
Show unknown nodes in a fashion similar to the web UI. Fixes #504
2024-03-13 21:15:00 -07: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
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
Brad Midgley
281ff788f3
Extend timeout for slow devices like pi zero
2024-01-28 06:35:15 -07:00
GUVWAF
e25b183c23
Add getter/setter for AmbientLighting Module
2023-11-02 20:35:57 +01:00
Sascha Bias
7123a095dc
add channel info
2023-10-07 19:01:01 +02:00
Ben Meadors
52cc825b3e
Update protobufs
2023-08-21 14:56:26 -05:00
GUVWAF
d6ee815183
Only wait if response is wanted
2023-08-21 21:09:12 +02:00
GUVWAF
9858fa1976
Add request-telemetry option
2023-08-21 20:58:27 +02:00
Ben Meadors
e76c9852d6
2.2 changes and added device_metadata
2023-08-08 16:40:15 -05:00
Ben Meadors
0788c1fadc
Update protos to 2.2 and add neighbor_info
2023-08-08 13:48:51 -05:00
Ben Meadors
bb067e0e1e
Remove min app version check
2023-08-08 12:48:03 -05:00
Ben Meadors
055da95b8a
Update protos and remove old max_channels check
2023-07-25 19:46:17 -05:00
luzpaz
0a88ca6a5c
Fix various source comment typos
...
Found via `codespell -q 3`
2023-07-15 01:04:47 +00:00
Manuel Verch
b4405dc60e
Fix TypeError: 'NoneType'
2023-04-11 17:24:45 +02:00
Manuel Verch
06b87b376c
Fix: showNodes crash #439
2023-04-06 13:13:47 +02:00
Thomas Göttgens
6a181ae025
Merge branch 'master' into master
2023-03-31 20:10:56 +02:00
Thomas Göttgens
7e6f13f0a2
establish trunk format
2023-03-31 20:09:59 +02:00
Manuel
f0723ffbc0
Merge branch 'meshtastic:master' into master
2023-03-31 10:41:10 +02:00