MCPcopy Index your code
hub / github.com/Affirmatech/MeshSense

github.com/Affirmatech/MeshSense @v1.0.18

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.18 ↗ · + Follow
321 symbols 907 edges 33 files 83 documented · 26%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MeshSense

MeshSense is a simple, open-source application that monitors, maps and graphically displays all the vital stats of your area's Meshtastic network including connected nodes, signal reports, trace routes and more!

MeshSense directly connects to your Meshtastic node via Bluetooth or WiFi and continuously provides all the information you need to assess the health of your network. For more detailed information, take a peek at our Frequently Asked Questions or Bluetooth Tips.

Headless Usage

To run MeshSense without a GUI, use the HEADLESS=1 environment variable when starting. Additionally the ACCESS_KEY environment variable can be used to specify the privileged access key for remote connections to gain full permissions.

HEADLESS=1 ACCESS_KEY=mySecretKey ./meshsense-x86_64.AppImage

Development Setup

To run MeshSense from the source code, first clone the MeshSense repo:

git clone https://github.com/Affirmatech/MeshSense.git
cd MeshSense

The update.mjs script will install the dependencies for the ui, api, and electron directories.

./update.mjs

During development, the electron portion is usually not needed. First start the UI Vite service as follows:

cd ui
PORT=5921 npm run dev

Leave the UI running and then also start the API service. The DEV_UI_URL will tell the API to forward any unhandled route requests to the UI service and should use the same port as above.

cd api
export DEV_UI_URL=http://localhost:5921
PORT=5920 npm run dev

The PORT variables in the above are optional and will default to the values in the example, but ensure DEV_UI_URL is present with the correct port if changed. These values may also be read from .env files api/.env and ui/.env respectively.

The front-end should now be accessible by connecting to the API service in a browser. Be careful not to connect to the UI service by accident. http://localhost:5920/

Any API changes will automatically reload the service. Any UI changes will be hot-reloaded by Vite.

Please note: currently certain event subscribers (particularly State variables) will duplicate their subscription when Vite hot-reloads resulting in duplicate events such as Log entries. Until this is fixed, the easiest solution is to refresh the browser to reset the events.

To build the ui, api, and electron components, the build.mjs script will accomplish this. The official electron builds are signed with an Affirmatech certificate on our build servers. The deployables will be placed in api/dist and electron/dist.

Extension points exported contracts — how you extend this code

Window (Interface)
(no doc)
electron/src/preload/index.d.ts
MessageObject (Interface)
(no doc)
api/src/lib/wss.ts
QueueItem (Interface)
(no doc)
api/meshtastic/index.d.ts
MessageObject (Interface)
(no doc)
ui/src/lib/wsc.ts
StateFlags (Interface)
(no doc)
api/src/lib/state.ts
HttpConnectionParameters (Interface)
(no doc)
api/meshtastic/index.d.ts
BleConnectionParameters (Interface)
(no doc)
api/meshtastic/index.d.ts
SerialConnectionParameters (Interface)
(no doc)
api/meshtastic/index.d.ts

Core symbols most depended-on inside this repo

on
called by 49
api/src/lib/state.ts
push
called by 41
api/meshtastic/index.js
subscribe
called by 38
api/src/lib/state.ts
set
called by 31
api/src/lib/state.ts
toBinary
called by 26
api/meshtastic/index.js
getType
called by 23
api/meshtastic/index.js
updateDeviceStatus
called by 23
api/meshtastic/index.js
assert
called by 22
api/meshtastic/index.js

Shape

Function 155
Method 125
Class 25
Interface 12
Enum 4

Languages

TypeScript100%

Modules by API surface

api/meshtastic/index.js207 symbols
api/meshtastic/index.d.ts29 symbols
api/src/meshtastic.ts24 symbols
api/src/lib/state.ts17 symbols
ui/src/lib/util.ts10 symbols
api/src/lib/wss.ts8 symbols
ui/src/lib/wsc.ts7 symbols
api/src/lib/server.ts4 symbols
electron/src/renderer/src/renderer.ts3 symbols
electron/src/main/index.ts3 symbols
api/src/lib/bluetooth.ts3 symbols
update.mjs1 symbols

For agents

$ claude mcp add MeshSense \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact