Meshtastic Partial YAML Configurations
One thing I discovered while doing some light code poking with the Meshtastic CLI is that you can upload partial YAML configurations. What this means is that you can download your node's YAML, remove specific attributes that you don't want to touch, then share that partial configuration with other people. I did this as part of the Mountain Mesh MediumFast Migration to allow people to quickly download the YAML config and update their nodes to match the rest of the mesh.
The benefit of this method is that it migrates more unique node settings beyond the default URL configuration method (I have a post for that too). This includes attributes such as node update intervals, position update intervals, and even bluetooth pins.
Making Your Own
This is really a pretty straight forward process to create your own custom configuration YAML:
-
Configure your node to your liking using the Meshtastic CLI, Contact, or Mobile app.
-
Export your node's settings. Each method looks a little different in how they do it, so I leave it in your capable hands to figure that out. My preferred method is the CLI. You can do that by running this command:
bash meshtastic -t {your node's IP here} --export-config > config.yml -
Load up the YAML file in your editor of choice and get to parsing. I like VS Code but any text editor is fine too.
-
Make a copy of your configuration before continuing:
bash cp ./config.yml ./config.yml.bak -
Run through the configuration and delete all the lines / groups you don't need. Keep in mind that tabs deleniate configuration groups. So don't go deleting the
lora:line when there are still items under that configuration level. -
When you're done, the file could look something like this:
channel_url: https://meshtastic.org/e/#CgcSAQE6AggNCg0SAQEaCExvbmdGYXN0EhQIARAEOAFABUgBUB5oAcAGAcgGAQ
config:
device:
nodeInfoBroadcastSecs: 10800
lora:
configOkToMqtt: true
hopLimit: 5
ignoreMqtt: true
modemPreset: MEDIUM_FAST
region: US
sx126xRxBoostedGain: true
txEnabled: true
txPower: 0
usePreset: true
position:
broadcastSmartMinimumDistance: 1000
broadcastSmartMinimumIntervalSecs: 300
gpsUpdateInterval: 120
positionBroadcastSecs: 10800
module_config:
telemetry:
deviceUpdateInterval: 10800
This condensed soup configuration file only has the specific attributes that I wish to pass along to other nodes. It won't modify the user's most important settings such as private keys, public keys, or their node names. It will only modify specific settings I choose.
Applying the Settings
Applying the settings are pretty painless as well. Again, I prefer to use the Meshtastic CLI. To apply the modified YAML settings, just run the following command:
meshtastic -t {your node's IP here} --configure ./config.yaml
And that's it! This is a great way to quickly image nodes too if you want them to have similar settings too (fleet management anyone?).