Skip to content

MeshMonitor User Scripts Gallery ​

Discover community-contributed Auto Responder scripts for MeshMonitor! These scripts extend the functionality of MeshMonitor's Auto Responder feature, allowing you to create custom automated responses to messages.

Want to submit your script?

Have you created a useful Auto Responder script? We'd love to feature it! File an issue on GitHub to request your script be added to the gallery.

Browse Scripts ​

About User Scripts ​

User Scripts are custom scripts that integrate with MeshMonitor's Auto Responder feature. They can be written in:

  • Python - Full-featured scripts with access to Python's extensive ecosystem
  • JavaScript/Node.js - Modern JavaScript with Node.js APIs
  • Shell - Simple shell scripts for quick automation

What Scripts Can Do ​

  • Respond to messages with custom logic
  • Extract parameters from trigger patterns
  • Call external APIs (weather, data, etc.)
  • Perform system operations
  • Return single or multiple responses
  • Access environment variables and message context

Guidelines for Submission ​

When submitting a script for the gallery, please provide:

  1. Script Name: A clear, descriptive name
  2. Icon (optional): An emoji or Unicode character to represent your script (e.g., 🌀️, πŸ€–, πŸ“‹)
  3. Description: What the script does and its use case
  4. Language: Python, JavaScript, or Shell
  5. Tags: Relevant categories (e.g., "Weather", "API", "System", "Example")
  6. Example Trigger: The trigger pattern(s) used with the script
  7. Requirements: Any dependencies, API keys, or environment variables needed (can be a list)
  8. Code: The complete script code (via GitHub link, Gist, or paste)
  9. Source Location:
    • If in main repo: Script will be added to examples/auto-responder-scripts/
    • If in external repo: Provide GitHub path in format USERNAME/repo/path/to/script.py or USERNAME/repo/branch/path/to/script.py

Script Metadata (mm_meta) ​

We recommend including a mm_meta: block in your script for enhanced display in the MeshMonitor UI:

python
#!/usr/bin/env python3
# mm_meta:
#   name: My Script Name
#   emoji: πŸ”§
#   language: Python

Scripts with metadata display their name and emoji in dropdowns instead of just the file path. See the Auto Responder Scripting Guide for details.

Script Requirements ​

All scripts must:

  • Be located in /data/scripts/ directory
  • Have a supported extension: .js, .mjs, .py, or .sh
  • Output valid JSON to stdout with a response field (or responses array)
  • Complete within 30 seconds (timeout)
  • Be executable (chmod +x)

Output Format ​

Scripts must output JSON to stdout:

Single Response:

json
{
  "response": "Your response text here (max 200 chars)"
}

Multiple Responses:

json
{
  "responses": [
    "First message (max 200 chars)",
    "Second message (max 200 chars)"
  ]
}

Getting Started ​

  1. Choose a script from the gallery above
  2. View the source to see the implementation
  3. Copy the script to your local ./scripts/ directory
  4. Make it executable: chmod +x ./scripts/YourScript.py
  5. Configure in MeshMonitor:
    • Navigate to Settings β†’ Automation β†’ Auto Responder
    • Click "Add Trigger"
    • Set the trigger pattern (see script's example trigger)
    • Select "Script" as response type
    • Enter the script path: /data/scripts/YourScript.py
  6. Test your trigger by sending a message matching the pattern

Installing Dependencies ​

Scripts can use third-party Python and Node.js packages.

  1. Add a manifest to the scripts directory ($DATA_DIR/scripts, default /data/scripts):
    • Python β†’ requirements.txt (e.g. requests==2.31.0)
    • Node β†’ package.json (with a dependencies block)
  2. In MeshMonitor, open the script-management panel (Auto Responder settings) and click Install / Update dependencies (requires the settings write permission).

Packages are installed next to your scripts β€” Python into python_packages/ (via pip install --target), Node into node_modules/ β€” on the persisted data volume, so they survive restarts and upgrades. Running scripts pick them up automatically via PYTHONPATH / NODE_PATH; just import/require as usual.

Security & limitations

  • Installing downloads and runs third-party code, and requires outbound internet access β€” so it's admin-only.
  • The default Docker image is Alpine/musl and ships no compiler, so Python installs are wheel-only. Pure-Python packages and anything with a prebuilt musl wheel work; packages that must compile a C extension fail with a clear message unless you set SCRIPT_DEPS_ALLOW_SOURCE_BUILD=true (and provide build tools).
  • The script dependency layer is isolated from MeshMonitor's bundled Apprise environment.
  • On the desktop app this uses the system Python/Node and is best-effort.

Environment Variables ​

All scripts receive these environment variables:

  • MESSAGE: Full message text received
  • FROM_NODE: Sender's node number
  • FROM_SHORT_NAME: Sender's short name (if known)
  • FROM_LONG_NAME: Sender's long name (if known)
  • FROM_LAT: Sender's latitude (if known)
  • FROM_LON: Sender's longitude (if known)
  • MM_LAT: MeshMonitor node's latitude (if known)
  • MM_LON: MeshMonitor node's longitude (if known)
  • PACKET_ID: Message packet ID
  • TRIGGER: The trigger pattern that matched
  • PARAM_*: Extracted parameters from trigger pattern (e.g., PARAM_name, PARAM_location)
  • TZ: Server timezone (IANA timezone name)

Source Code Location ​

Scripts can be hosted in two locations:

Main Repository (examples/ directory) ​

Scripts added directly to the main MeshMonitor repository are stored in examples/auto-responder-scripts/ and use the path format:

examples/auto-responder-scripts/YourScript.py

These scripts are rendered directly from the main repository.

External User Repositories ​

Scripts hosted in external GitHub repositories use the path format:

USERNAME/repo/path/to/script.py

Or with a specific branch:

USERNAME/repo/branch/path/to/script.py

Examples:

  • username/meshmonitor_user-scripts/scripts/MyScript.py (uses main branch)
  • username/meshmonitor_user-scripts/develop/scripts/MyScript.py (uses develop branch)

External scripts are fetched from the external repository's raw GitHub URL. The system automatically detects whether a script is in the main repo (starts with examples/) or an external repo and handles fetching accordingly.

Documentation ​

For detailed information on creating Auto Responder scripts, see:

Join the Community ​

Creating useful scripts? You're helping to grow the MeshMonitor ecosystem! Connect with other developers:

  • GitHub: github.com/yeraze/meshmonitor
  • Issues & Discussions: Share your scripts and learn from others
  • Pull Requests: Submit improvements to existing scripts

Note: Scripts listed here are community-contributed. The MeshMonitor project does not endorse or guarantee the security or functionality of listed scripts. Always review code before using in production.

Last updated: