troed/meshnetmon
3
5
Fork
You've already forked meshnetmon
0
Local application using a connected meshtastic device to show information about nodes seen in the mesh, including calculating distances, line of sight calculations with radio transmission properties, sorting on the number of hops as well as color coded map display of the mesh around you.
  • Python 45.3%
  • JavaScript 28%
  • HTML 26.7%
Troed Sångberg be6fef83bc Improve auto-refresh: add immediate refresh when tab becomes active after being inactive
- Enhanced visibility change handler to perform immediate data refresh when tab regains focus
- After immediate refresh, resumes normal interval timing
- Ensures users get fresh data immediately when returning to the app
- Prevents waiting for next scheduled refresh after prolonged inactivity
Example scenario fixed:
1. User sets 30-second refresh interval
2. User switches to another tab for 5 minutes
3. User returns to MeshNetMon tab
4. Before: Had to wait up to 30 seconds for next refresh
5. After: Gets immediate refresh + normal timing resumes
This provides better user experience by ensuring data is always current
when users return to the application, while maintaining all the benefits
of the visibility-based pause/resume system.
2026年03月06日 09:49:53 +01:00
app Improve auto-refresh: add immediate refresh when tab becomes active after being inactive 2026年03月06日 09:49:53 +01:00
docs Add heightmap documentation and screenshot to README 2026年03月01日 13:02:47 +01:00
scripts Clean up root directory: Move analysis scripts to scripts/ directory 2026年02月15日 13:43:54 +01:00
test Implement caching optimization to prevent redundant API calls for cached tiles 2026年03月01日 12:35:19 +01:00
.env.example Remove frequency config from main branch: Fresnel calculations not present 2026年02月17日 07:25:20 +01:00
.gitignore Final cleanup: Remove outdated files and organize project structure 2026年02月15日 13:55:20 +01:00
README.md Fix repository name in installation instructions 2026年03月03日 10:48:37 +01:00
requirements.txt Implement line-of-sight analysis with elevation data from STAC-hojd API 2026年02月13日 22:33:50 +01:00
VIBE_DISCLAIMER.md Update VIBE_DISCLAIMER.md 2026年03月01日 12:39:27 +01:00

Meshtastic Node Monitor - Web Application

Meshtastic Node Monitor Screenshot

Heightmap Feature

A modern web-based interface for monitoring and analyzing Meshtastic mesh networks.

🛠️ Installation

Prerequisites

  • Python 3.7+
  • pip (Python package manager)
  • Meshtastic device connected to your network

Setup

  1. Clone the repository:
git clone https://codeberg.org/troed/meshnetmon.git
cd meshnetmon
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure the application: Create a .env file from the example template:
cp .env.example .env

Then edit the .env file to configure your Meshtastic device connection:

# Meshtastic device connection settings
MESHTASTIC_HOST="localhost"
MESHTASTIC_PORT=44989

For elevation data (optional), add your API credentials:

# Elevation data API credentials
HEIGHT_API_USERNAME="your_username"
HEIGHT_API_PASSWORD="your_password"

Running the Application

Development mode (with auto-reload):

python app/main.py

Production mode:

uvicorn app.main:app --host 0.0.0.0 --port 8000

The application will be available at http://localhost:8000

📋 Features

Core Functionality

  • Interactive Map View - Visualize your mesh network on OpenStreetMap with color-coded nodes based on hop count
  • Node Tables - Detailed information about all nodes in your network
  • Distance Calculations - Calculate distances between nodes
  • Line-of-Sight Analysis - Advanced terrain analysis using elevation data from Swedish Land Survey (optional, Sweden only)
  • Real-time Data - Connect to your Meshtastic device for live updates
  • Statistics Dashboard - Network health metrics and insights

Heightmap Visualization (New!)

  • Terrain Elevation Data - Download and display high-resolution elevation maps
  • Automatic Caching - Elevation tiles are cached for offline use and better performance
  • Smart Tile Management - Only downloads missing tiles, avoids redundant API calls
  • Seamless Integration - Elevation data automatically enhances line-of-sight analysis
  • Visual Terrain Analysis - Color-coded elevation maps with smooth gradient schemes

User Interface

  • Three main views: Map View, All Nodes Table, Nodes with Coordinates Table
  • Sortable columns with persistent sorting preferences
  • Responsive design that works on desktop and mobile devices
  • Auto-refresh functionality with tab-specific updates
  • Last Seen filter to show only recently active nodes (6h, 1d, 3d, 1w, all)

🗻 Elevation Data & Heightmap Configuration

Note: Line-of-Sight analysis and heightmap visualization using elevation data is currently only available for coordinates within Sweden, as it uses data from the Swedish Land Survey (Lantmäteriet).

Heightmap Features

The heightmap visualization provides several powerful features:

  • Automatic Tile Download: When you zoom into an area, elevation tiles are automatically downloaded and cached
  • Intelligent Caching: Once downloaded, tiles are stored locally and reused, eliminating redundant API calls
  • Visual Terrain Analysis: Elevation data is displayed using a smooth color gradient (dark blue → blue → green → yellow → red → black)
  • Seamless Integration: Heightmap data enhances line-of-sight analysis with real terrain information
  • Performance Optimized: Only missing tiles are downloaded; cached tiles are reused automatically

Setup Instructions

To enable elevation data and heightmap visualization:

  1. Register for API Access:

  2. Configure API Credentials:

    • Add your credentials to the .env file:
    # Elevation data API credentials (required for heightmap and line-of-sight analysis)
    HEIGHT_API_USERNAME="your_username"
    HEIGHT_API_PASSWORD="your_password"
    
  3. Usage:

    • Navigate to the heightmap tab
    • Zoom into your area of interest (zoom level 10+ recommended)
    • Elevation data will automatically download and display
    • Cached tiles are reused on subsequent visits

Technical Details

  • Data Source: Swedish Land Survey (Lantmäteriet) STAC-hojd API
  • Resolution: 1-meter elevation data
  • Coverage: Entire Sweden
  • Cache Location: data/elevation_cache/ directory
  • Tile Format: GeoTIFF files with automatic caching

Troubleshooting

If heightmaps don't appear:

  • Check that API credentials are correctly configured in .env
  • Verify you're zoomed in sufficiently (zoom level 10+)
  • Ensure your coordinates are within Sweden
  • Check browser console for any error messages
  • Verify the height service is enabled (check application logs)

🎯 Use Cases

Network Monitoring

  • Monitor node connectivity and health
  • Track battery levels across your network
  • Identify nodes with poor signal (low SNR)

Troubleshooting

  • Visualize network topology on a map
  • Identify nodes with incorrect positions
  • Find the closest nodes to any reference point

Planning

  • Plan new node placements based on coverage and terrain
  • Analyze network reach, gaps, and line-of-sight obstacles
  • Optimize node distribution considering terrain obstacles

Data Analysis

  • Export node data via API
  • Generate statistics and reports
  • Integrate with other tools via REST API

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Create a new Pull Request

📄 License

This project is open-source and available under the Creative Commons Zero license.

💬 Support

For any issues or questions, please:

  • Open an issue in the repository
  • Check the existing issues for similar problems
  • Review the API documentation for usage examples

For more information about Meshtastic, visit: https://meshtastic.org