@@ -704,6 +704,42 @@ def removeFavorite(self, nodeId: Union[int, str]):
704704 onResponse = self .onAckNak
705705 return self ._sendAdmin (p , onResponse = onResponse )
706706
707+ def setIgnored (self , nodeId : Union [int , str ]):
708+ """Tell the node to set the specified node ID to be ignored on the NodeDB on the device"""
709+ self .ensureSessionKey ()
710+ if isinstance (nodeId , str ):
711+ if nodeId .startswith ("!" ):
712+ nodeId = int (nodeId [1 :], 16 )
713+ else :
714+ nodeId = int (nodeId )
715+
716+ p = admin_pb2 .AdminMessage ()
717+ p .set_ignored_node = nodeId
718+
719+ if self == self .iface .localNode :
720+ onResponse = None
721+ else :
722+ onResponse = self .onAckNak
723+ return self ._sendAdmin (p , onResponse = onResponse )
724+
725+ def removeIgnored (self , nodeId : Union [int , str ]):
726+ """Tell the node to set the specified node ID to be un-ignored on the NodeDB on the device"""
727+ self .ensureSessionKey ()
728+ if isinstance (nodeId , str ):
729+ if nodeId .startswith ("!" ):
730+ nodeId = int (nodeId [1 :], 16 )
731+ else :
732+ nodeId = int (nodeId )
733+
734+ p = admin_pb2 .AdminMessage ()
735+ p .remove_ignored_node = nodeId
736+
737+ if self == self .iface .localNode :
738+ onResponse = None
739+ else :
740+ onResponse = self .onAckNak
741+ return self ._sendAdmin (p , onResponse = onResponse )
742+
707743 def resetNodeDb (self ):
708744 """Tell the node to reset its list of nodes."""
709745 self .ensureSessionKey ()
0 commit comments