Ever wonder how the OKMesh node map stays up to date? It’s fully automated β€” here’s how it works under the hood.

πŸ—ΊοΈ The Map

okmesh.org/map

The Hardware

At the heart of the map system is a dedicated RAK4631 node with Ethernet connectivity. It runs 24/7 on solar + battery, with GPS enabled and MQTT map reporting active. This node’s job is simple: listen to every other node on the mesh and report what it hears.

Component Details
Map Node RAK4631 with Ethernet (“OKMP”)
Power Solar + large battery β€” always on
Connection Ethernet (DHCP reservation)
GPS Enabled for precise location
MQTT Map reporting enabled

The Software

Every 10 minutes, a Python script connects to the map node via the Meshtastic TCP API and collects data on every node in the mesh:

  • Node ID and name
  • Hardware model
  • GPS coordinates
  • Battery level and voltage
  • SNR and hop count
  • Last heard timestamp

The data is saved as JSON and uploaded to okmesh.org via SFTP. The web map reads this JSON and renders an interactive Leaflet.js map with markers for each node.

The Pipeline

RAK4631 (mesh listener)
    ↓ TCP API (every 10 min)
Python collector script
    ↓ JSON output
SFTP upload to okmesh.org
    ↓
Interactive Leaflet.js map
    β†’ okmesh.org/map/

Reliability

We learned the hard way that automation needs monitoring. After a 4-day outage caused by a server rebuild (SFTP user got wiped), we now run a nightly health check that verifies:

  • Map data is fresh (nodes.json updated within 20 minutes)
  • SFTP uploads are succeeding
  • The map node is reachable

If anything fails, the system attempts auto-repair before alerting.

Building Your Own

The basic approach works for any Meshtastic community:

  1. Dedicate a node with reliable power and internet (Ethernet preferred over WiFi)
  2. Write a collector script using the Meshtastic Python API
  3. Output JSON and upload to your web server
  4. Render with Leaflet.js or any mapping library

The Meshtastic TCP API gives you everything you need β€” no MQTT server required for basic mapping.

Check out our other open-source tools for the full OKMesh automation stack.

Questions? Reach out on Discord (falcon97000) or open an issue on GitHub.