File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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 > ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments