diff --git a/foobaz-shop.sh b/foobaz-shop.sh index 27c0b8e..1f4fbe0 100755 --- a/foobaz-shop.sh +++ b/foobaz-shop.sh @@ -2,4 +2,4 @@ here=$(cd $(dirname $0); pwd) cd $here -exec poetry run python foobaz.py -a 127.0.0.1 -r shop -u 2 +exec poetry run python foobaz.py -a 127.0.0.1 -p 8081 -r shop -u 2 diff --git a/foobaz.py b/foobaz.py index b4c8cff..170718d 100644 --- a/foobaz.py +++ b/foobaz.py @@ -47,6 +47,7 @@ def main(args): parser = argparse.ArgumentParser(prog='foobazdmx', description='Make the lights flicker.') parser.add_argument('-a', '--artnet', type=str, required=True, default="127.0.0.1", help="Art-Net server") + parser.add_argument('-l', '--listen', type=int, required=False, default=8080, help="TCP port to listen on for web") parser.add_argument('-r', '--room', type=str, required=True, help="light setup for room: shop or big") parser.add_argument('-u', '--universe', type=int, required=False, default=1, help="Universe to send to") args = parser.parse_args(args) @@ -79,7 +80,7 @@ def main(args): dmx.color = (0, 0, 0) dmx.animation = "off" - run(host='0.0.0.0', port=8080, reloader=False, debug=True) + run(host='0.0.0.0', port=args.port, reloader=False, debug=True) if __name__ == '__main__': main(sys.argv[1:])