about summary refs log tree commit diff
path: root/cli/broadlink_discovery
diff options
context:
space:
mode:
authorDaniel Høyer Iversen <mail@dahoiv.net>2020-03-04T21·25+0100
committerGitHub <noreply@github.com>2020-03-04T21·25+0100
commite84becd05b3bb879899bb7a8492e1441af3b491e (patch)
treebcecc9ddad1b6f2e7486ef7060d6c23d340305a4 /cli/broadlink_discovery
parentec4df3966553250ec0973d50442f024aa0989468 (diff)
Add support for specifying destination IP address to use in discovery (#313)
Co-authored-by: Kja64 <Ken@lkv20.dk>
Diffstat (limited to 'cli/broadlink_discovery')
-rwxr-xr-xcli/broadlink_discovery3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/broadlink_discovery b/cli/broadlink_discovery
index 1edbafcbecc6..1c6b80b1483e 100755
--- a/cli/broadlink_discovery
+++ b/cli/broadlink_discovery
@@ -7,10 +7,11 @@ import broadlink
 parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
 parser.add_argument("--timeout", type=int, default=5, help="timeout to wait for receiving discovery responses")
 parser.add_argument("--ip", default=None, help="ip address to use in the discovery")
+parser.add_argument("--dst-ip", default=None, help="destination ip address to use in the discovery")
 args = parser.parse_args()
 
 print("Discovering...")
-devices = broadlink.discover(timeout=args.timeout, local_ip_address=args.ip)
+devices = broadlink.discover(timeout=args.timeout, local_ip_address=args.ip, discover_ip_address=args.dst_ip)
 for device in devices:
     if device.auth():
         print("###########################################")