diff --git a/server/src/tellmesrv.py b/server/src/tellmesrv.py index cb2936e..8c77d5c 100644 --- a/server/src/tellmesrv.py +++ b/server/src/tellmesrv.py @@ -28,11 +28,13 @@ def sendmessage(target, message): json_command = json.dumps(command) """ Connects to WebSocket server, sends a message, and returns the response """ + uri = "ws://localhost:5080" ws = websocket.create_connection(uri) # Blocking WebSocket connection ws.send(json_command) # Send message to WebSocket response = ws.recv() # Receive response # ws.close() # Close WebSocket connection print(response) + ws.close() return response @app.route("/webhook/", methods=['POST'])