-
-
Notifications
You must be signed in to change notification settings - Fork 15
config file
Reference for configuring your pyMC Repeater using config.yaml.
- Repeater Configuration
- Mesh Network Settings
- Radio Configuration
- Hardware Configuration (SX1262)
- Timing and Delays
- Duty Cycle Management
- Storage and Data Management
- Local MQTT Publishing
- LetsMesh Integration
- Logging Configuration
- Web Interface Settings
Basic repeater identity and behavior settings.
Type: string
Default: "mesh-repeater-01"
Description: Friendly name for your repeater node. Used in adverts, web interface, and LetsMesh.
repeater:
node_name: "my-home-repeater"Type: float
Default: 0.0
Range: Latitude: -90 to 90, Longitude: -180 to 180
Description: Geographic coordinates for your repeater. Optional but recommended for sending adverts with location and rendering maps within the Web UI.
repeater:
latitude: 51.5074
longitude: -0.1278Type: string or null
Default: null
Description: Path to a file containing the private key (64 hex characters). If null, a new identity is generated on first run.
repeater:
identity_file: "/etc/pymc_repeater/identity.key"Type: integer (seconds)
Default: 60
Description: How long duplicate packets are remembered to prevent re-forwarding the same packet.
repeater:
cache_ttl: 60Type: boolean
Default: false
Description: Enable quality-based packet filtering and adaptive transmission delays based on packet SNR and size.
repeater:
use_score_for_tx: falseType: float
Default: 0.3
Description: Reserved for future features. Currently has no effect on packet processing.
Type: integer (hours)
Default: 10
Range: 0 (disabled) to 24+
Description: Automatic advertisement broadcast interval. Set to 0 to disable (manual only via web interface).
repeater:
send_advert_interval_hours: 10 # Advertise every 10 hoursType: boolean
Default: true
Description: Global flood policy. Controls whether the repeater forwards flood packets by default.
-
true: Allow all flood packets -
false: Deny all flood packets (unless allowed by specific transport key)
mesh:
global_flood_allow: trueLoRa radio parameters. Critical: Without this section the system will not start. Equally, if incorrect, the system will fail to start.
Type: integer (Hz)
Default: 869618000 (869.618 MHz - EU)
Description: Radio frequency in Hz. Common frequencies:
- EU:
869618000(869.618 MHz) - US:
915000000(915 MHz) - AU:
923000000(923 MHz)
radio:
frequency: 869618000Type: integer (dBm)
Default: 14
Description: Transmit power. Higher = longer range but more power consumption.
radio:
tx_power: 14Type: integer (Hz)
Default: 62500 (62.5 kHz)
Options: 7800, 10400, 15600, 20800, 31250, 41700, 62500, 125000, 250000, 500000
Description: LoRa bandwidth. Lower = longer range, higher = faster data rate.
radio:
bandwidth: 62500Type: integer
Default: 8
Range: 7 to 12
Description: LoRa spreading factor. Higher = longer range but slower data rate.
radio:
spreading_factor: 8Type: integer
Default: 8
Range: 5 to 8
Description: Forward error correction coding rate (4/5, 4/6, 4/7, or 4/8).
radio:
coding_rate: 8Type: integer (symbols)
Default: 17
Description: LoRa preamble length.
Type: integer
Default: 13380
Description: LoRa network ID. Devices with different sync words cannot communicate.
Type: boolean
Default: true
Description: Enable CRC checking for packet integrity.
GPIO pin configuration for SX1262 LoRa module.
sx1262:
bus_id: 0 # SPI bus (usually 0)
cs_id: 0 # Chip select (usually 0)Important: Use BCM pin numbering, not physical pin numbers.
sx1262:
cs_pin: 21 # Chip select
reset_pin: 18 # Reset
busy_pin: 20 # Busy status
irq_pin: 16 # Interrupt requestsx1262:
txen_pin: -1 # TX enable (-1 to disable)
rxen_pin: -1 # RX enable (-1 to disable)
txled_pin: -1 # TX LED indicator (-1 to disable)
rxled_pin: -1 # RX LED indicator (-1 to disable)sx1262:
use_dio3_tcxo: false # Enable DIO3 TCXO power supply
is_waveshare: false # Waveshare hardware compatibility modeTransmission delay configuration for different routing modes.
Type: float
Default: 1.0
Description: Multiplier for flood mode transmission delays. Higher values = more delay before forwarding.
delays:
tx_delay_factor: 1.0Type: float
Default: 0.5
Description: Multiplier for direct mode transmission delays. Lower = faster forwarding for direct packets.
delays:
direct_tx_delay_factor: 0.5Control radio airtime to comply with regulations (e.g., EU 1% duty cycle).
Type: boolean
Default: false
Description: Enable/disable duty cycle enforcement.
duty_cycle:
enforcement_enabled: falseType: integer (milliseconds)
Default: 3600
Description: Maximum transmission time per minute. Default of 3600ms = 6% duty cycle.
For EU 1% duty cycle:
duty_cycle:
enforcement_enabled: true
max_airtime_per_minute: 600 # 1% of 60000msType: string (path)
Default: "/var/lib/pymc_repeater"
Description: Directory for SQLite database and RRD files.
storage:
storage_dir: "/var/lib/pymc_repeater"storage:
retention:
sqlite_cleanup_days: 31 # Delete SQLite records older than 31 daysRRD Archives (automatic):
- 1 minute resolution for 1 week
- 5 minute resolution for 1 month
- 1 hour resolution for 1 year
Publish packet data to a local MQTT broker (e.g., Mosquitto, Home Assistant).
Type: boolean
Default: false
Description: Enable/disable local MQTT publishing.
storage:
mqtt:
enabled: truestorage:
mqtt:
broker: "localhost"
port: 1883
username: null # Optional authentication
password: nullstorage:
mqtt:
base_topic: "meshcore/repeater"Messages published to:
-
{base_topic}/{node_name}/packet- Packet data -
{base_topic}/{node_name}/advert- Advertisement messages
Example: meshcore/repeater/my-home-repeater/packet
Publish data to LetsMesh service for network-wide monitoring.
Type: boolean
Default: false
Description: Enable/disable LetsMesh publishing.
letsmesh:
enabled: trueType: string
Default: "Test"
Description: Airport/location code for grouping nodes geographically (e.g., "SFO", "LHR", "NYC").
letsmesh:
iata_code: "NYC"Type: integer
Default: 0
Options:
-
0- Europe (mqtt-eu-v1.letsmesh.net) -
1- US West (mqtt-us-v1.letsmesh.net)
letsmesh:
broker_index: 0 # Use EU brokerType: integer (seconds)
Default: 60
Description: Heartbeat interval for status updates (uptime, packet counts).
letsmesh:
status_interval: 60Block specific packet types from being published to LetsMesh.
letsmesh:
disallowed_packet_types:
- TRACE # Don't publish trace packets
- ACK # Don't publish acknowledgmentsAvailable packet types:
-
REQ- Requests -
RESPONSE- Responses -
TXT_MSG- Text messages -
ACK- Acknowledgments -
ADVERT- Advertisements -
GRP_TXT- Group text messages -
GRP_DATA- Group data -
ANON_REQ- Anonymous requests -
PATH- Path packets -
TRACE- Trace packets -
RAW_CUSTOM- Custom raw packets
Type: string
Default: "INFO"
Options: DEBUG, INFO, WARNING, ERROR
Description: Logging verbosity level.
logging:
level: INFOType: string
Default: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Description: Log message format (Python logging format).
Type: boolean
Default: false
Description: Enable CORS headers for web API. Required if accessing web interface from different domain.
web:
cors_enabled: falserepeater:
node_name: "my-repeater"
latitude: 51.5074
longitude: -0.1278
mesh:
global_flood_allow: true
radio:
frequency: 869618000
tx_power: 14
bandwidth: 62500
spreading_factor: 8
coding_rate: 8
sx1262:
cs_pin: 21
reset_pin: 18
busy_pin: 20
irq_pin: 16repeater:
node_name: "rooftop-repeater-01"
latitude: 40.7128
longitude: -74.0060
send_advert_interval_hours: 10
mesh:
global_flood_allow: true
radio:
frequency: 915000000 # US frequency
tx_power: 20
bandwidth: 62500
spreading_factor: 8
coding_rate: 8
sx1262:
cs_pin: 21
reset_pin: 18
busy_pin: 20
irq_pin: 16
duty_cycle:
enforcement_enabled: false
letsmesh:
enabled: true
iata_code: "NYC"
broker_index: 1 # US broker
status_interval: 60
disallowed_packet_types:
- TRACE
- ACK
logging:
level: INFOrepeater:
node_name: "home-mesh-repeater"
radio:
frequency: 869618000
tx_power: 14
sx1262:
cs_pin: 21
reset_pin: 18
busy_pin: 20
irq_pin: 16
storage:
mqtt:
enabled: true
broker: "192.168.1.100" # Home Assistant IP
port: 1883
username: "mqtt_user"
password: "mqtt_password"
base_topic: "meshcore/repeater"
logging:
level: INFO- Verify GPIO pin numbers match your hardware (use BCM numbering)
- Ensure SPI is enabled:
sudo raspi-configβ Interface Options β SPI - Test radio connection before deploying
- All nodes must use identical radio settings
- Lower spreading factor = faster but shorter range
- Higher TX power = longer range but more power draw
- Balance bandwidth vs. range for your deployment
- Start with local MQTT disabled, enable after testing
- Use LetsMesh for cloud monitoring and analytics
- Filter unnecessary packet types to reduce bandwidth
- Keep your identity file secure (contains private key)
- Use strong passwords for MQTT authentication
- Consider firewall rules for web interface
- Use
INFOlevel for normal operation - Switch to
DEBUGwhen troubleshooting - Monitor SQLite database size and clean up old data
- Check duty cycle compliance in regulated regions
- Check GPIO pin configuration
- Verify SPI is enabled
- Check logs:
journalctl -u pymc-repeater -f
- Verify radio settings match network
- Check frequency is correct for region
- Ensure antenna is properly connected
- Verify internet connectivity
- Check
broker_index(0=EU, 1=US) - Ensure
iata_codeis set - Look for JWT token errors in logs
- Check if you can access https://analyzer.letsmesh.sh from the same network as the Pi
- Reduce
logging.levelfrom DEBUG to INFO - Check for excessive packet traffic
- Monitor duty cycle enforcement
Configuration Version: Compatible with pyMC Repeater v1.0.5+ (or current dev branch)