Files
pilot/pilot-v2/Cargo.toml
Gilles Soulier 1640754df8 Add $hostname variable substitution in config
This commit adds support for automatic hostname substitution in configuration files.
Users can now use $hostname in device.name, device.identifiers, and mqtt.client_id
to automatically use the system's hostname.

Changes:
- Add hostname crate dependency (v0.4)
- Implement expand_variables() to replace $hostname with actual hostname
- Add get_hostname() helper function
- Update config.example.yaml to demonstrate $hostname usage
- Add test for hostname substitution
- Update config.yaml to use $hostname by default
- Add test_command.sh script for testing MQTT commands

This makes deployment easier across multiple machines without manual config changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-30 06:52:41 +01:00

21 lines
520 B
TOML

# Rust package metadata and dependencies for pilot v2.
[package]
name = "pilot-v2"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = "1"
thiserror = "1"
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.9"
serde_json = "1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
rumqttc = "0.24"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "signal", "sync"] }
sysinfo = "0.30"
local-ip-address = "0.6"
zbus = "3"
hostname = "0.4"