Es scheint, dass es sich bei den Dateien um verschiedene Log- und Einstellungsdateien handelt, die mit dem MM-Backend verbunden sind. Hier ist eine Zusammenfassung der wichtigsten Entitäten:

This commit is contained in:
2025-06-19 10:13:46 +02:00
parent 18ebd9a2b6
commit de0729e559
108 changed files with 277 additions and 892 deletions

Binary file not shown.

View File

@ -1,91 +0,0 @@
#!/usr/bin/env python3
"""
PyP100 Installation Script für MYP
Installiert das PyP100-Modul für TP-Link Tapo P100/P110 Steckdosen
"""
import subprocess
import sys
import os
def install_pyp100():
"""Installiert PyP100 über pip"""
try:
print("🔧 Installiere PyP100-Modul...")
# PyP100 installieren
result = subprocess.run([
sys.executable, "-m", "pip", "install", "PyP100"
], capture_output=True, text=True, timeout=120)
if result.returncode == 0:
print("✅ PyP100 erfolgreich installiert!")
print(f"Output: {result.stdout}")
return True
else:
print("❌ Fehler bei der PyP100-Installation:")
print(f"Error: {result.stderr}")
return False
except subprocess.TimeoutExpired:
print("❌ Installation-Timeout - PyP100-Installation dauerte zu lange")
return False
except Exception as e:
print(f"❌ Unerwarteter Fehler bei PyP100-Installation: {e}")
return False
def test_pyp100_import():
"""Testet ob PyP100 korrekt importiert werden kann"""
try:
import PyP100
print("✅ PyP100-Import erfolgreich!")
return True
except ImportError as e:
print(f"❌ PyP100-Import fehlgeschlagen: {e}")
return False
def main():
"""Haupt-Installationsroutine"""
print("🚀 MYP PyP100-Installationsskript")
print("=" * 40)
# Prüfe zunächst, ob PyP100 bereits verfügbar ist
if test_pyp100_import():
print(" PyP100 ist bereits installiert - keine Aktion erforderlich")
return True
# Installiere PyP100
if install_pyp100():
# Teste nach Installation
if test_pyp100_import():
print("🎉 PyP100 erfolgreich installiert und getestet!")
return True
else:
print("❌ PyP100 installiert, aber Import-Test fehlgeschlagen")
return False
else:
print("❌ PyP100-Installation fehlgeschlagen")
# Alternative Installation versuchen
print("🔄 Versuche alternative Installation...")
try:
result = subprocess.run([
sys.executable, "-m", "pip", "install", "--user", "PyP100"
], capture_output=True, text=True, timeout=120)
if result.returncode == 0:
print("✅ Alternative PyP100-Installation erfolgreich!")
if test_pyp100_import():
print("🎉 PyP100 erfolgreich installiert und getestet!")
return True
else:
print("❌ Auch alternative Installation fehlgeschlagen")
except Exception as e:
print(f"❌ Alternative Installation fehlgeschlagen: {e}")
return False
if __name__ == "__main__":
success = main()
sys.exit(0 if success else 1)

View File

@ -44134,3 +44134,206 @@ WHERE users.id = ?
2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard
2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 09:51:45 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db
2025-06-19 10:06:54 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-19 10:06:58 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-19 10:06:58 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-19 10:06:59 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-19 10:07:00 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-19 10:07:00 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-19 10:07:04 - [app] app - [INFO] INFO - Locating template 'login.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\login.html')
2025-06-19 10:07:04 - [app] app - [INFO] INFO - Locating template 'base.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\base.html')
2025-06-19 10:07:04 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:06 - [app] app - [DEBUG] DEBUG - Request: POST /auth/login
2025-06-19 10:07:06 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Request: GET /
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Response: 302
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard
2025-06-19 10:07:08 - [app] app - [INFO] INFO - Locating template 'dashboard.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\dashboard.html')
2025-06-19 10:07:08 - [app] app - [INFO] INFO - Locating template 'macros/ui_components.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\macros\\ui_components.html')
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:07:08 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Request: GET /printers
2025-06-19 10:07:09 - [app] app - [INFO] INFO - Locating template 'printers.html':
1: trying loader of application '__main__'
class: jinja2.loaders.FileSystemLoader
encoding: 'utf-8'
followlinks: False
searchpath:
- C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates
-> found ('C:\\Users\\TTOMCZA.EMEA\\Dev\\Projektarbeit-MYP\\backend\\templates\\printers.html')
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:07:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:07:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:07:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:07:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:07:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:08:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:08:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:08:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:08:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:08:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:09:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:09:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:09:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:09:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:09:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:10:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:10:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:10:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:10:39 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:10:39 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:11:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:09 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:11:09 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:40 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-19 10:11:40 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False)
2025-06-19 10:11:40 - [app] app - [DEBUG] DEBUG - Response: 200

View File

@ -121,3 +121,5 @@ WHERE users.username = ? OR users.email = ?
2025-06-18 12:48:58 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet
2025-06-19 09:22:36 - [auth] auth - [WARNING] WARNING - JSON-Parsing fehlgeschlagen: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)
2025-06-19 09:22:36 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet
2025-06-19 10:07:06 - [auth] auth - [WARNING] WARNING - JSON-Parsing fehlgeschlagen: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0)
2025-06-19 10:07:06 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet

View File

@ -298,3 +298,7 @@
2025-06-19 09:26:20 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion)
2025-06-19 09:26:53 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert
2025-06-19 09:26:53 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion)
2025-06-19 10:06:54 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert
2025-06-19 10:06:54 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion)
2025-06-19 10:06:59 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert
2025-06-19 10:06:59 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion)

View File

@ -657,3 +657,7 @@
2025-06-19 09:26:20 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 09:26:54 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert
2025-06-19 09:26:54 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:06:55 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert
2025-06-19 10:06:55 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:06:59 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert
2025-06-19 10:06:59 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)

View File

@ -573,3 +573,5 @@
2025-06-19 09:26:16 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert
2025-06-19 09:26:22 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert
2025-06-19 09:26:58 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert
2025-06-19 10:06:58 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert
2025-06-19 10:07:00 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert

View File

@ -2803,3 +2803,11 @@
2025-06-19 09:51:45 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor mit Session-Caching initialisiert
2025-06-19 09:51:45 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert
2025-06-19 09:51:45 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion)
2025-06-19 10:06:55 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar
2025-06-19 10:06:55 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor mit Session-Caching initialisiert
2025-06-19 10:06:55 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert
2025-06-19 10:06:55 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion)
2025-06-19 10:06:59 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar
2025-06-19 10:06:59 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor mit Session-Caching initialisiert
2025-06-19 10:06:59 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert
2025-06-19 10:06:59 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion)

View File

@ -1286,3 +1286,11 @@
2025-06-19 09:26:58 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität)
2025-06-19 09:28:53 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität)
2025-06-19 09:28:53 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität)
2025-06-19 10:06:55 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert
2025-06-19 10:06:55 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion)
2025-06-19 10:06:58 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität)
2025-06-19 10:06:59 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert
2025-06-19 10:06:59 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion)
2025-06-19 10:07:00 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität)
2025-06-19 10:12:05 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität)
2025-06-19 10:12:05 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität)

View File

@ -655,3 +655,7 @@
2025-06-19 09:26:22 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 09:26:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert
2025-06-19 09:26:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:06:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert
2025-06-19 10:06:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:07:00 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert
2025-06-19 10:07:00 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)

View File

@ -328,3 +328,5 @@ WHERE users.role = ?]
2025-06-19 09:26:16 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 09:26:22 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 09:26:58 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 10:06:58 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert
2025-06-19 10:07:00 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert

View File

@ -2185,3 +2185,9 @@
2025-06-19 09:26:54 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True
2025-06-19 09:26:58 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet
2025-06-19 09:26:58 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet
2025-06-19 10:06:55 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True
2025-06-19 10:06:58 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet
2025-06-19 10:06:58 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet
2025-06-19 10:06:59 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True
2025-06-19 10:07:00 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet
2025-06-19 10:07:00 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet

View File

@ -984,3 +984,9 @@
2025-06-19 09:26:54 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert
2025-06-19 09:26:54 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 09:26:58 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert
2025-06-19 10:06:55 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert
2025-06-19 10:06:55 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:06:58 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert
2025-06-19 10:06:59 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert
2025-06-19 10:06:59 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion)
2025-06-19 10:07:00 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert

View File

@ -2604,3 +2604,21 @@
2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert
2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert
2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - ==================================================
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - ==================================================
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet...
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - 🐍 Python Version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32)
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T10:06:58.262273
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert
2025-06-19 10:06:58 - [startup] startup - [INFO] INFO - ==================================================
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - ==================================================
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet...
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - 🐍 Python Version: 3.13.3 (tags/v3.13.3:6280bb5, Apr 8 2025, 14:47:33) [MSC v.1943 64 bit (AMD64)]
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32)
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T10:07:00.445984
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert
2025-06-19 10:07:00 - [startup] startup - [INFO] INFO - ==================================================

View File

@ -2977,3 +2977,5 @@
2025-06-19 09:26:20 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert
2025-06-19 09:26:54 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert
2025-06-19 09:51:45 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert
2025-06-19 10:06:55 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert
2025-06-19 10:06:59 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert

View File

@ -833,3 +833,7 @@
2025-06-19 09:26:53 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion)
2025-06-19 09:51:45 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert
2025-06-19 09:51:45 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion)
2025-06-19 10:06:54 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert
2025-06-19 10:06:54 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion)
2025-06-19 10:06:59 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert
2025-06-19 10:06:59 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion)

View File

@ -301,3 +301,7 @@
2025-06-19 09:26:20 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet
2025-06-19 09:26:53 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an...
2025-06-19 09:26:53 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet
2025-06-19 10:06:54 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an...
2025-06-19 10:06:54 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet
2025-06-19 10:06:59 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an...
2025-06-19 10:06:59 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet

View File

@ -1,95 +0,0 @@
#!/usr/bin/env python3.11
"""
Script zum Erstellen von Test-Druckern mit Tapo-Steckdosen
"""
from models import get_db_session, Printer
from datetime import datetime
def create_test_printers():
"""Erstellt Test-Drucker mit Tapo-Steckdosen."""
db = get_db_session()
# Test-Drucker mit Tapo-Steckdosen
test_printers = [
{
'name': 'Ender 3 Pro',
'ip': '192.168.0.100',
'plug_ip': '192.168.0.103',
'location': 'Werkstatt A',
'description': 'Creality Ender 3 Pro - Einsteigermodell'
},
{
'name': 'Prusa i3 MK3S',
'ip': '192.168.0.101',
'plug_ip': '192.168.0.104',
'location': 'Werkstatt B',
'description': 'Prusa i3 MK3S+ - Profi-Drucker'
},
{
'name': 'Artillery Sidewinder',
'ip': '192.168.0.102',
'plug_ip': '192.168.0.100',
'location': 'Labor',
'description': 'Artillery Sidewinder X1 - Großformat'
},
{
'name': 'Bambu Lab A1 mini',
'ip': '192.168.0.106',
'plug_ip': '192.168.0.101',
'location': 'Entwicklung',
'description': 'Bambu Lab A1 mini - Kompakt und schnell'
},
{
'name': 'Ultimaker S3',
'ip': '192.168.0.106',
'plug_ip': '192.168.0.102',
'location': 'Prototyping',
'description': 'Ultimaker S3 - Dual-Extruder'
}
]
created_count = 0
updated_count = 0
for printer_data in test_printers:
existing = db.query(Printer).filter_by(name=printer_data['name']).first()
if not existing:
printer = Printer(
name=printer_data['name'],
ip=printer_data['ip'],
plug_ip=printer_data['plug_ip'],
location=printer_data['location'],
description=printer_data['description'],
active=True,
created_at=datetime.now()
)
db.add(printer)
created_count += 1
print(f"✅ Erstellt: {printer_data['name']} mit Tapo {printer_data['plug_ip']}")
else:
existing.plug_ip = printer_data['plug_ip']
existing.location = printer_data['location']
existing.description = printer_data['description']
existing.active = True
updated_count += 1
print(f"🔄 Aktualisiert: {printer_data['name']} mit Tapo {printer_data['plug_ip']}")
try:
db.commit()
print(f"\n🎯 Erfolgreich abgeschlossen:")
print(f" - {created_count} neue Drucker erstellt")
print(f" - {updated_count} Drucker aktualisiert")
print(f" - Gesamt: {created_count + updated_count} Drucker mit Tapo-Steckdosen")
except Exception as e:
db.rollback()
print(f"❌ Fehler beim Speichern: {e}")
finally:
db.close()
if __name__ == "__main__":
print("🔧 Erstelle Test-Drucker mit Tapo-Steckdosen...")
create_test_printers()

View File

@ -1,151 +0,0 @@
#!/usr/bin/env python3.11
"""
Script zum Einrichten der Tapo-Steckdosen in der Datenbank
Hardkodierte IPs: 192.168.0.100 - 192.168.0.106 (außer 105)
"""
import sys
import os
# Pfad zum Backend-Verzeichnis hinzufügen
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from models import get_db_session, Printer
from utils.logging_config import get_logger
logger = get_logger("tapo_setup")
def setup_tapo_outlets():
"""Richtet die hardkodierten Tapo-Steckdosen-IPs in der Datenbank ein."""
# Hardkodierte IP-Adressen (192.168.0.100 - 192.168.0.106, außer 105)
tapo_ips = [
"192.168.0.100",
"192.168.0.101",
"192.168.0.102",
"192.168.0.103",
"192.168.0.104",
"192.168.0.106" # 105 ist ausgenommen
]
db_session = get_db_session()
try:
for i, ip in enumerate(tapo_ips, start=1):
# Prüfen ob bereits vorhanden
existing_printer = db_session.query(Printer).filter(
Printer.plug_ip == ip
).first()
if existing_printer:
logger.info(f"✅ Tapo-Steckdose {ip} bereits vorhanden (Drucker: {existing_printer.name})")
continue
# Neuen Drucker-Eintrag erstellen
printer_name = f"Tapo P110 ({ip})"
location = f"Werk 040 - Berlin - TBA"
new_printer = Printer(
name=printer_name,
model="P115", # Tapo P110/P115 Modell
location=location,
ip_address=ip,
mac_address=f"00:00:00:00:{int(ip.split('.')[-1]):02d}:00", # Dummy MAC
plug_ip=ip, # Wichtig: plug_ip für Tapo-Steuerung
plug_username="tapo_user", # Standard Tapo-Benutzername
plug_password="tapo_pass", # Standard Tapo-Passwort
active=True
)
db_session.add(new_printer)
logger.info(f" Tapo-Steckdose {ip} hinzugefügt: {printer_name}")
# Änderungen speichern
db_session.commit()
logger.info(f"🎉 Setup abgeschlossen: {len(tapo_ips)} Tapo-Steckdosen konfiguriert")
# Status anzeigen
show_tapo_status(db_session)
except Exception as e:
db_session.rollback()
logger.error(f"❌ Fehler beim Setup: {e}")
raise
finally:
db_session.close()
def show_tapo_status(db_session):
"""Zeigt den aktuellen Status aller Tapo-Steckdosen an."""
tapo_printers = db_session.query(Printer).filter(
Printer.plug_ip.isnot(None),
Printer.active == True
).order_by(Printer.plug_ip).all()
logger.info(f"\n📊 Tapo-Steckdosen Übersicht ({len(tapo_printers)} konfiguriert):")
logger.info("=" * 80)
for printer in tapo_printers:
logger.info(f" 📍 {printer.plug_ip} - {printer.name}")
logger.info(f" Standort: {printer.location}")
logger.info(f" Aktiv: {'' if printer.active else ''}")
logger.info("-" * 60)
def remove_all_tapo_outlets():
"""Entfernt alle Tapo-Steckdosen aus der Datenbank (Cleanup-Funktion)."""
db_session = get_db_session()
try:
tapo_printers = db_session.query(Printer).filter(
Printer.plug_ip.isnot(None)
).all()
count = len(tapo_printers)
if count == 0:
logger.info(" Keine Tapo-Steckdosen in der Datenbank gefunden")
return
for printer in tapo_printers:
logger.info(f"🗑️ Entferne: {printer.name} ({printer.plug_ip})")
db_session.delete(printer)
db_session.commit()
logger.info(f"{count} Tapo-Steckdosen erfolgreich entfernt")
except Exception as e:
db_session.rollback()
logger.error(f"❌ Fehler beim Entfernen: {e}")
raise
finally:
db_session.close()
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="Tapo-Steckdosen Setup")
parser.add_argument("--setup", action="store_true", help="Tapo-Steckdosen einrichten")
parser.add_argument("--status", action="store_true", help="Status anzeigen")
parser.add_argument("--cleanup", action="store_true", help="Alle Tapo-Steckdosen entfernen")
args = parser.parse_args()
if args.setup:
logger.info("🔧 Starte Tapo-Steckdosen Setup...")
setup_tapo_outlets()
elif args.status:
logger.info("📊 Zeige Tapo-Status...")
db_session = get_db_session()
try:
show_tapo_status(db_session)
finally:
db_session.close()
elif args.cleanup:
logger.info("🗑️ Starte Cleanup...")
remove_all_tapo_outlets()
else:
logger.info("📋 Verwendung:")
logger.info(" python3.11 setup_tapo_outlets.py --setup # Steckdosen einrichten")
logger.info(" python3.11 setup_tapo_outlets.py --status # Status anzeigen")
logger.info(" python3.11 setup_tapo_outlets.py --cleanup # Alle entfernen")

Some files were not shown because too many files have changed in this diff Show More