Connecting Your Meshtastic Node to Metrastics
This guide will walk you through configuring your Meshtastic node to send data to the Metrastics dashboard via MQTT.
Prerequisites
- A configured Meshtastic device.
- Access to your Meshtastic node's configuration (e.g., via the Meshtastic Web UI, Python API, or mobile app).
- Your Metrastics project is set up to receive data from MQTT.
Configuration Steps
You need to configure the MQTT module on your Meshtastic node. The key parameters are the MQTT server address, port, and optionally, credentials if your server requires them.
-
Access MQTT Settings:
Navigate to the MQTT configuration section in your Meshtastic device settings. This is typically found under "Modules" or "Network Settings."
-
Enable MQTT:
Ensure the MQTT module is enabled.
-
Set MQTT Server Address:
Configure the MQTT server (broker) address to point to Metrastics:
metrastics.com
-
Set MQTT Port:
The standard unencrypted MQTT port is
1883
. If Metrastics uses encrypted MQTT (MQTTS), the port is typically8883
. Please verify the correct port formetrastics.com
.- For unencrypted MQTT:
1883
- For encrypted MQTT (MQTTS/TLS):
8883
(Recommended for security)
For this example, we'll assume port
1883
unless specified otherwise by Metrastics. - For unencrypted MQTT:
-
(Optional) Username and Password:
If your Metrastics MQTT setup requires authentication, enter the provided username and password in the respective fields. If no authentication is needed, these can usually be left blank.
-
(Optional) Encrypted Connection (TLS/SSL):
If
metrastics.com
uses port8883
or requires an encrypted connection, ensure that the "Enable SSL/TLS" or "Encrypted" option is checked in your Meshtastic MQTT settings. -
(Optional) Root Topic:
Meshtastic devices publish data under a root topic, typically
msh
. You can often customize this. The default is usually fine:msh/REGION/NODE_ID/
. For example:msh/US/!yournodeid/
. Metrastics will be configured to listen on the appropriate topics. -
Save and Reboot:
After configuring these settings, save them to your Meshtastic node. It's often a good idea to reboot the node to ensure the new settings take effect.
Verifying Connection
Once configured, your Meshtastic node should start sending data (like position updates, sensor metrics, and messages) to metrastics.com
. You should then see this data appearing in your Metrastics dashboard.
- Check the logs or status page on your Meshtastic device for any MQTT connection errors.
- Monitor your Metrastics dashboard for incoming data from your node.
Troubleshooting
- No Data: Double-check the server address, port, and credentials (if any). Ensure your Meshtastic node has an internet connection if it's using WiFi, or that its gateway (if applicable) is correctly configured and online.
- Connection Errors: Verify firewall settings if you are on a restricted network. Ensure
metrastics.com
is reachable from your node's network. - Topic Mismatch: Confirm that the topics your node is publishing to are the ones Metrastics is subscribed to.
If you encounter further issues, please consult the official Meshtastic documentation or the support channels for your Metrastics project.
Back to Dashboard