See Your Signal: Routes, Bubbles & Real-Time Metrics
π What's New in Version 1.3.2
π§ Robust NDJSON Parser
The card now includes a smart JSON parser that handles both single-line and pretty-printed multi-line entries in meshcore_rx.json. No more missing route metrics due to JSON formatting issues.
πΆ Refined SNR Color Scale for Neighbors
SNR thresholds have been fine-tuned and the visual style upgraded:
- Green: β₯ 9 dB (was β₯ 10 dB) β excellent signal
- Yellow: 6β8 dB β good signal
- Orange: 0β5 dB β weak signal
- Red: < 0 dB β critical
π§ 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
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: queuedWhat'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;
fiThis 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:
Your support helps fund development, testing, bug fixes, and new features.