mqtt_client.py: add subparser for scene_recall and shutdown
This commit is contained in:
parent
f31a6b8817
commit
6b8c57441f
1 changed files with 12 additions and 0 deletions
|
@ -36,6 +36,18 @@ def main():
|
||||||
parser = argparse.ArgumentParser(description="Allen & Heath Qu MQTT Remote Control")
|
parser = argparse.ArgumentParser(description="Allen & Heath Qu MQTT Remote Control")
|
||||||
parser.add_argument("mixer_ip", help="IP of the mixer")
|
parser.add_argument("mixer_ip", help="IP of the mixer")
|
||||||
parser.add_argument("mqtt_hostname", help="IP of the MQTT broker")
|
parser.add_argument("mqtt_hostname", help="IP of the MQTT broker")
|
||||||
|
|
||||||
|
subparsers = parser.add_subparsers(
|
||||||
|
dest="command", required=True, help="Available commands"
|
||||||
|
)
|
||||||
|
|
||||||
|
subparsers.add_parser("shutdown", help="Shut down the mixer")
|
||||||
|
|
||||||
|
scene_parser = subparsers.add_parser("scene_recall", help="Recall a specific scene")
|
||||||
|
scene_parser.add_argument(
|
||||||
|
"scene_number", type=int, choices=range(0, 100), help="Scene number to recall"
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
print(f"Mixer IP: {args.mixer_ip}, MQTT broker hostname: {args.mqtt_hostname}")
|
print(f"Mixer IP: {args.mixer_ip}, MQTT broker hostname: {args.mqtt_hostname}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue