meshtastic-py3.12kevinh@kdesktop:~/development/meshtastic/meshtastic-python$ cd /home/kevinh/development/meshtastic/meshtastic-python ; /usr/bin/env /home/kevinh/.cache/pypoetry/virtualenvs/meshtastic-l6tP90xw-py3.12/bin/python /home/kevinh/.vscode/extensions/ms-python.debugpy-2024.6.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 52521 -- -m meshtastic --slog --power-ppk2-meter --power-stress --power-voltage 3.3 INFO file:ppk2.py __init__ line:52 Connected to Power Profiler Kit II (PPK2) INFO file:__main__.py create_power_meter line:1022 Setting power supply to 3.3 volts Connected to radio INFO file:slog.py __init__ line:183 Writing slogs to /home/kevinh/.local/share/meshtastic/slogs/20240706-123803 INFO file:stress.py syncPowerStress line:68 Sending power stress command PRINT_INFO INFO file:stress.py run line:105 Running power stress test 48 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command LED_ON INFO file:stress.py run line:105 Running power stress test 80 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command BT_OFF INFO file:stress.py run line:105 Running power stress test 81 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command BT_ON INFO file:stress.py run line:105 Running power stress test 34 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_FULLON INFO file:stress.py run line:105 Running power stress test 32 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_IDLE INFO file:stress.py run line:105 Running power stress test 33 for 5.0 seconds INFO file:stress.py syncPowerStress line:68 Sending power stress command CPU_DEEPSLEEP INFO file:stress.py run line:108 Power stress test complete. INFO file:slog.py close line:201 Closing slogs in /home/kevinh/.local/share/meshtastic/slogs/20240706-123803 WARNING file:arrow.py close line:67 Discarding empty file: /home/kevinh/.local/share/meshtastic/slogs/20240706-123803/slog.arrow INFO file:arrow.py close line:70 Compressing log data into /home/kevinh/.local/share/meshtastic/slogs/20240706-123803/power.feather meshtastic-py3.12kevinh@kdesktop:~/development/meshtastic/meshtastic-python$
Meshtastic Python
Overview
A Python client for use with Meshtastic devices. This small library (and example application) provides an easy API for sending and receiving messages over mesh radios. It also provides access to any of the operations/data available in the device user interface or the Android application. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.
(Documentation/API Reference is currently offline)
Call for Contributors
This library and CLI has gone without a consistent maintainer for a while, and there's many improvements that could be made. We're all volunteers here and help is extremely appreciated, whether in implementing your own needs or helping maintain the library and CLI in general.
If you're interested in contributing but don't have specific things you'd like to work on, look at the roadmap below!
Roadmap
This should always be considered a list in progress and flux -- inclusion doesn't guarantee implementation, and exclusion doesn't mean something's not wanted. GitHub issues are a great place to discuss ideas.
- Types
- type annotations throughout the codebase, and upgrading mypy running in CI to
--strict
- type annotations throughout the codebase, and upgrading mypy running in CI to
- async-friendliness
- CLI completeness & consistency
- the CLI should support all features of the firmware
- there should be a consistent output format available for shell scripting
- CLI input validation & documentation
- what arguments and options are compatible & incompatible with one another?
- can the options be restructured in a way that is more self-documenting?
- pubsub events should be documented clearly
- helpers for third-party code
- it should be easy to write a script that supports similar options to the CLI so many tools support the same ways of connecting to nodes
- data storage & processing
- there should be a standardized way of recording packets for later use, debugging, etc.
- a persistence layer could also keep track of nodes beyond nodedb, as the apps do
- a sqlite database schema and tools for writing to it may be a good starting point
- enable maps, charts, visualizations