This commit is contained in:
derlole
2025-04-24 10:11:40 +00:00
parent 5ab8330a9d
commit 7eb100e3e8
3 changed files with 2 additions and 4 deletions

View File

@@ -15,12 +15,9 @@ socketio = SocketIO(app, cors_allowed_origins="*", async_mode='threading')
app.register_blueprint(unsecure) app.register_blueprint(unsecure)
app.register_blueprint(esp) app.register_blueprint(esp)
# Simuliere regelmäßige Daten-Updates
def send_data(): def send_data():
counter = 0 counter = 0
while True: while True:
#print(f"Sending data: {counter}")
data = { data = {
'test': 'Live-Daten', 'test': 'Live-Daten',
'status': 'OK', 'status': 'OK',
@@ -28,7 +25,7 @@ def send_data():
} }
socketio.emit('update_data', data) socketio.emit('update_data', data)
counter += 1 counter += 1
time.sleep(2) # alle 2 Sekunden neue Daten time.sleep(2)
# Hintergrund-Thread starten # Hintergrund-Thread starten
thread = threading.Thread(target=send_data) thread = threading.Thread(target=send_data)

BIN
static/gimmiCoffee_Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title> <title>{{ title }}</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link rel="icon" href="{{ url_for('static', filename='gimmiCoffee_Logo.png') }}" type="image/png">
</head> </head>
<body> <body>
<header> <header>