@@ -350,6 +350,26 @@ def onConnected(interface):
350350 print (f"Setting device owner short to { args .set_owner_short } " )
351351 interface .getNode (args .dest , False , ** getNode_kwargs ).setOwner (long_name = args .set_owner , short_name = args .set_owner_short )
352352
353+ if args .set_is_unmessageable :
354+ closeNow = True
355+ waitForAckNak = True
356+ print (f"Setting is_unmessagable to { args .set_is_unmessageable } " )
357+ if isinstance (args .set_is_unmessageable , str ):
358+ val = meshtastic .util .fromStr (args .set_is_unmessageable )
359+ else :
360+ val = args .set_is_unmessageable
361+ interface .getNode (args .dest , ** getNode_kwargs ).setIsUnmessageable (is_unmessagable = val )
362+
363+ if args .set_is_unmessagable :
364+ closeNow = True
365+ waitForAckNak = True
366+ print (f"Setting is_unmessagable to { args .set_is_unmessageable } " )
367+ if isinstance (args .set_is_unmessageable , str ):
368+ val = meshtastic .util .fromStr (args .set_is_unmessageable )
369+ else :
370+ val = args .set_is_unmessageable
371+ interface .getNode (args .dest , ** getNode_kwargs ).setIsUnmessageable (is_unmessagable = val )
372+
353373 # TODO: add to export-config and configure
354374 if args .set_canned_message :
355375 closeNow = True
@@ -1540,6 +1560,13 @@ def addConfigArgs(parser: argparse.ArgumentParser) -> argparse.ArgumentParser:
15401560 "--set-ham" , help = "Set licensed Ham ID and turn off encryption" , action = "store"
15411561 )
15421562
1563+ group .add_argument (
1564+ "--set-is-unmessageable" , help = "Set if a node is messageable or not" , action = "store"
1565+ )
1566+
1567+ group .add_argument (
1568+ "--set-is-unmessagable" , help = "Set if a node is messageable or not" , action = "store"
1569+ )
15431570 group .add_argument (
15441571 "--ch-set-url" , "--seturl" ,
15451572 help = "Set all channels and set LoRa config from a supplied URL" ,
0 commit comments