Skip to content

Commit 93dbe5a

Browse files
committed
Merge branch 'development'
2 parents 53215b8 + 9f00beb commit 93dbe5a

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/model.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,7 @@ pub fn attempt_connection(model: &mut Model) {
645645
match model.tether_interface.connect(
646646
model.should_quit.clone(),
647647
model.settings.tether_host.as_deref(),
648+
model.settings.tether_subscribe_id.as_deref(),
648649
) {
649650
Ok(_) => {
650651
model.tether_status = TetherStatus::Connected;

src/settings.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ pub struct Cli {
4848
#[arg(long = "tether.noAutoConnect")]
4949
pub tether_disable_autoconnect: bool,
5050

51+
/// Optionally set an ID/group for lighting-related Input Plugs (macros, scenes); useful for separating messages.
52+
/// Essentially defaults to wildcard (+) if omitted. Does NOT affect Tether MIDI subscriptions.
53+
#[arg(long = "tether.subscribe.id")]
54+
pub tether_subscribe_id: Option<String>,
55+
5156
/// Host/IP for Tether MQTT Broker
5257
#[arg(long = "tether.host")]
5358
pub tether_host: Option<String>,

src/tether_interface.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ impl TetherInterface {
9797
&mut self,
9898
should_quit: Arc<Mutex<bool>>,
9999
tether_host: Option<&str>,
100+
lighting_id: Option<&str>,
100101
) -> Result<(), anyhow::Error> {
101102
info!("Attempt to connect Tether Agent...");
102103

@@ -117,10 +118,12 @@ impl TetherInterface {
117118
.expect("failed to create Input Plug");
118119

119120
let input_macros = PlugOptionsBuilder::create_input("macros")
121+
.id(lighting_id)
120122
.build(&mut tether_agent)
121123
.expect("failed to create Input Plug");
122124

123125
let input_scenes = PlugOptionsBuilder::create_input("scenes")
126+
.id(lighting_id)
124127
.build(&mut tether_agent)
125128
.expect("failed to create Input Plug");
126129

0 commit comments

Comments
 (0)