diff --git a/apps/lacrossegw.conf b/apps/lacrossegw.conf index 29b90f6..dd606fb 100644 --- a/apps/lacrossegw.conf +++ b/apps/lacrossegw.conf @@ -55,7 +55,7 @@ "idOutside": "64" }, { - "id": "b0", + "id": "88", "name": "Kinderzimmer", "tMin": 19.5, "tMax": 24, @@ -64,7 +64,7 @@ "idOutside": "64" }, { - "id": "74", + "id": "b0", "name": "Eisfach", "tMax": -18 }, @@ -73,7 +73,7 @@ "name": "Aussen" }, { - "id": "9c", + "id": "38", "name": "Aussen 2" }, { @@ -88,5 +88,8 @@ "user": "admin", "pass": "admin", "database": "sensors" - } + }, + + "webport": 8081, + "apiport": 1900 } diff --git a/apps/lacrossegw.py b/apps/lacrossegw.py index d46b1e5..7348bf7 100755 --- a/apps/lacrossegw.py +++ b/apps/lacrossegw.py @@ -236,13 +236,14 @@ class Server(socketserver.ThreadingMixIn, socketserver.TCPServer): pass cache = {} - -server = Server(('0.0.0.0', 8080), MyHttpRequestHandler) +p = config["webport"] if "webport" in config else 8080 +server = Server(('0.0.0.0', p), MyHttpRequestHandler) server_thread = threading.Thread(target=server.serve_forever) server_thread.daemon = True server_thread.start() -apisrv = apiserver.ApiServer(1990) +p = config["apiport"] if "apiport" in config else 1990 +apisrv = apiserver.ApiServer(p) print("Waiting for sensors...")