diff --git a/server/app.py b/server/app.py index dcb51a3..45da9f5 100644 --- a/server/app.py +++ b/server/app.py @@ -43,7 +43,10 @@ db.autocommit(True) mqtt_client_id = "PiXelTubeMaster-"+wlan_mac_address -TUBE_INDEX = None +cur = db.cursor() +cur.execute("SELECT mac_address, universe, dmx_address FROM tubes") +TUBE_INDEX = cur.fetchall() +cur.close() # Function to register a tube in the database def register_tube(mac_address):