Skip to content

Human-Friendly Paths, Quick Copy & Mentions

Choose a tag to compare

@dida886 dida886 released this 27 Jun 13:40

🚀 What's New in Version 1.3.3

🏷️ Repeater Name Mapping (Message Card)

  • Path segments now show real contact names instead of raw hex identifiers
  • Enabled by default – toggle with use_repeater_names: false in config
  • Unrecognized nodes display “Unknown (hex)” – translatable via message-card.unknown_repeater

📋 Long‑Press to Copy

  • Long‑press on the expanded path → copies the full route text
  • Long‑press on a message bubble → copies the message content
  • Visual “Copied!” overlay appears on the specific element (path or bubble), not the whole card

@Mentions

  • Click a received message sender → inserts @[name] into the message input and focuses it

🎨 UI & UX Improvements

  • Path wrapping – long routes now break neatly between hops on narrow screens
    (each segment is wrapped in <span class="path-hop">)
  • Neighbors in the hub/node card are now clickable even when no contact entity exists (falls back to snrId or seenId)
  • Temperature badge in the node header is now clickable (opens the entity’s history)
  • Editor includes a checkbox to toggle repeater name display

🔧 Configuration Required for Route Visualization

To enable the route visualization feature, you need to set up a file-based notification service that captures MeshCore events:

Step 1: Configure the File Notification Service

Add Repository

file_integration

Please configure Set up a notification service and the file path set to /config/www/meshcore_rx.json

This creates a notification entity (typically notify.meshcore_rx_log). The file will be served from /local/meshcore_rx.json, making it accessible to the card.

Important: Make sure your configuration.yaml allows external access to the www directory:

default_config:
  whitelist_external_dirs:
    - '/config/www'

Step 2: Create the Automation

Create a new automation that writes every meshcore_message event to the file. The automation has been optimized in v1.3.1 to store only essential fields, reducing file size by ~50-60% compared to storing the full event data:

alias: MeshCore - Log RX to file
description: ""
triggers:
  - event_type: meshcore_message
    trigger: event
actions:
  - data:
      entity_id: notify.file
      message: |
        {% set d = trigger.event.data %}
        {% set rx = d.rx_log_data[0] %}
        {{ {"entity_id": d.entity_id, "sender_name": d.sender_name | default('unknown'), "rx_timestamp": rx.timestamp, "rssi": rx.rssi, "snr": rx.snr, "path": rx.path | default(''), "path_len": rx.path_len | default(0), "route_typename": rx.route_typename | default(''), "channel_name": rx.channel_name | default(''), "channel_idx": rx.channel_idx | default(0)} | tojson }}
    action: notify.send_message
mode: queued

What's optimized: Instead of storing the entire event JSON (~400-500 bytes per entry), the automation now extracts only the 10 essential fields needed for route visualization (~180-250 bytes per entry). Each entry is a clean, flat JSON object with no nested arrays – faster to parse and easier on disk space.

Note: The entity_id must match the notification entity created in Step 1. If you used a different name, adjust accordingly (e.g., notify.file).

Step 3: Verify

Restart Home Assistant

Send or receive a message via MeshCore

Check that /config/www/meshcore_rx.json exists and contains JSON lines

The Message Card will automatically load and display route metrics for matching messages

Optional: Automatic Log Rotation

The meshcore_rx.json file grows with every incoming message. To prevent it from becoming too large, you can set up automatic rotation that keeps only the most recent entries.

Step 1: Add a shell command

Add this to your configuration.yaml:

shell_command:
  clean_rx_log: >
    lines=$(wc -l < /config/www/meshcore_rx.json) &&
    if [ "$lines" -gt 500 ]; then
      sed "1,$((lines-500))d" /config/www/meshcore_rx.json > /tmp/meshcore_rx_clean.json &&
      cp /tmp/meshcore_rx_clean.json /config/www/meshcore_rx.json;
    fi

This script:

  • Counts the number of lines in the file
  • Only runs when there are more than 500 entries
  • Removes the oldest entries, keeping the 500 most recent
  • Uses an atomic copy so the file is never inaccessible

Step 2: Create an automation

alias: MeshCore - Clean old RX logs
description: ""
triggers:
  - trigger: time
    at: "03:00:00"
actions:
  - action: shell_command.clean_rx_log
    data: {}

This runs daily at 3:00 AM, keeping your log file lean and fast to load.

Note: Adjust the 500 value to your needs. Each entry is roughly 100-125 bytes. Keep in mind that the Message Card loads this entire file into memory when displaying route metrics – a larger file means slower initial rendering and higher memory usage on the dashboard.

☕ Support Development

If you find this project useful and would like to support future development:

Buy Me A Coffee

BuyCoffee

Your support helps fund development, testing, bug fixes, and new features.