added db request at script start

Signed-off-by: Ebbe Baß <ebbe.bass>
main
Ebbe Baß 2024-02-17 16:16:16 +01:00
parent 3d9bdb95cc
commit 9f7a333e40
1 changed files with 4 additions and 1 deletions

View File

@ -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):