🎉 Improved database structure in backend/database/myp.* files and removed outdated backups. 🛠️ Added numerous activity session pickle files to backend/instance/sessions directories. 🖥️ Updated various log files for better monitoring and debugging: app/app.log, core_system/core_system.log, data_management/data_management.log, energy_monitoring/energy_monitoring.log, hardware_integration/hardware_integration.log, job_

This commit is contained in:
Tomczak
2025-06-13 12:47:06 +02:00
parent 173d8e83d5
commit 822e3c542a
65 changed files with 1043 additions and 0 deletions

View File

@@ -22473,3 +22473,752 @@ jinja2.exceptions.UndefinedError: 'stats' is undefined
2025-06-13 12:32:52 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 6 erstellt, 0 aktualisiert
2025-06-13 12:32:52 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:32:52 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:37:28 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:37:30 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:37:30 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 1 erstellt, 0 aktualisiert
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:37:30 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:37:30 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:37:31 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:37:31 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:37:31 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:37:33 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:37:34 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:37:34 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:37:34 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:37:34 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:37:35 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:37:35 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:37:35 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:38:05 - [app] app - [INFO] INFO - Locating template 'tapo_control.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\\tapo_control.html')
2025-06-13 12:38:05 - [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-13 12:38:05 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250613_123805
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/tapo/
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - Method: GET
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - User: admin
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - Exception Type: BuildError
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 132, in tapo_dashboard
return render_template('tapo_control.html',
outlets=sorted_outlets,
total_outlets=len(sorted_outlets),
online_outlets=online_count,
fixed_layout=True) # Flag für festes Layout
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\utils\security_suite.py", line 100, in wrapper
return f(*args, **kwargs)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 159, in tapo_dashboard
return render_template('tapo_control.html',
outlets=error_outlets,
total_outlets=6,
online_outlets=0,
fixed_layout=True)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:38:05 - [app] app - [INFO] INFO - Locating template 'errors/500.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\\errors\\500.html')
2025-06-13 12:38:05 - [app] app - [DEBUG] DEBUG - Response: 500
2025-06-13 12:38:05 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt...
2025-06-13 12:38:05 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt
2025-06-13 12:38:05 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown'
2025-06-13 12:38:07 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:38:09 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:38:09 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:38:10 - [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-13 12:38:10 - [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-13 12:38:10 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-13 12:38:13 - [app] app - [DEBUG] DEBUG - Request: GET /printers
2025-06-13 12:38:13 - [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-13 12:38:13 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-13 12:38:13 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-13 12:38:13 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=True)
2025-06-13 12:38:13 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-13 12:38:13 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers
2025-06-13 12:38:13 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=True)
2025-06-13 12:38:13 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-13 12:38:19 - [app] app - [DEBUG] DEBUG - Request: GET /stats
2025-06-13 12:38:19 - [app] app - [INFO] INFO - Locating template 'stats.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\\stats.html')
2025-06-13 12:38:19 - [app] app - [DEBUG] DEBUG - Response: 200
2025-06-13 12:38:19 - [app] app - [ERROR] ERROR - Fehler beim Laden des Benutzers 1: tuple index out of range
2025-06-13 12:38:20 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/
2025-06-13 12:38:34 - [app] app - [INFO] INFO - Locating template 'tapo_control.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\\tapo_control.html')
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250613_123834
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/tapo/
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - Method: GET
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - User: admin
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - Exception Type: BuildError
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:38:34 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 132, in tapo_dashboard
return render_template('tapo_control.html',
outlets=sorted_outlets,
total_outlets=len(sorted_outlets),
online_outlets=online_count,
fixed_layout=True) # Flag für festes Layout
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\utils\security_suite.py", line 100, in wrapper
return f(*args, **kwargs)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 159, in tapo_dashboard
return render_template('tapo_control.html',
outlets=error_outlets,
total_outlets=6,
online_outlets=0,
fixed_layout=True)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:38:34 - [app] app - [INFO] INFO - Locating template 'errors/500.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\\errors\\500.html')
2025-06-13 12:38:34 - [app] app - [DEBUG] DEBUG - Response: 500
2025-06-13 12:39:05 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:39:06 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:39:06 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:39:06 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:39:06 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:39:07 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:39:07 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:39:07 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:39:08 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:39:10 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:39:10 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:39:10 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:39:10 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:39:11 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:39:11 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:39:11 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:39:43 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:39:44 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:39:45 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:39:45 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:39:47 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: backend/database/myp.db
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True
2025-06-13 12:39:49 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank...
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin...
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt.
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker...
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105)
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager...
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler...
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet
2025-06-13 12:39:49 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000
2025-06-13 12:40:44 - [app] app - [INFO] INFO - Locating template 'tapo_control.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\\tapo_control.html')
2025-06-13 12:40:44 - [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-13 12:40:44 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250613_124044
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/tapo/
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - Method: GET
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - User: admin
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - Exception Type: BuildError
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:40:44 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 132, in tapo_dashboard
return render_template('tapo_control.html',
outlets=sorted_outlets,
total_outlets=len(sorted_outlets),
online_outlets=online_count,
fixed_layout=True) # Flag für festes Layout
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\utils\security_suite.py", line 100, in wrapper
return f(*args, **kwargs)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 159, in tapo_dashboard
return render_template('tapo_control.html',
outlets=error_outlets,
total_outlets=6,
online_outlets=0,
fixed_layout=True)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:40:44 - [app] app - [INFO] INFO - Locating template 'errors/500.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\\errors\\500.html')
2025-06-13 12:40:44 - [app] app - [DEBUG] DEBUG - Response: 500
2025-06-13 12:40:48 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250613_124103
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/tapo/
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - Method: GET
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - User: admin
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - Exception Type: BuildError
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:41:03 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 132, in tapo_dashboard
return render_template('tapo_control.html',
outlets=sorted_outlets,
total_outlets=len(sorted_outlets),
online_outlets=online_count,
fixed_layout=True) # Flag für festes Layout
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask_login\utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\utils\security_suite.py", line 100, in wrapper
return f(*args, **kwargs)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\tapo_control.py", line 159, in tapo_dashboard
return render_template('tapo_control.html',
outlets=error_outlets,
total_outlets=6,
online_outlets=0,
fixed_layout=True)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 151, in render_template
return _render(app, template, context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\templating.py", line 132, in _render
rv = template.render(context)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 1295, in render
self.environment.handle_exception()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\jinja2\environment.py", line 942, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 1, in top-level template code
{% extends "base.html" %}
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 433, in top-level template code
{% block content %}{% endblock %}
^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\tapo_control.html", line 251, in block 'content'
<a href="{{ url_for('admin.add_printer') }}?preset_plug_ip={{ ip }}"
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1697, in url_for
return self.handle_url_build_error(error, endpoint, values)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1686, in url_for
rv = url_adapter.build( # type: ignore[union-attr]
endpoint,
...<3 lines>...
force_external=_external,
)
File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 924, in build
raise BuildError(endpoint, values, method, self)
werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin.add_printer'. Did you mean 'admin.add_printer_page' instead?
2025-06-13 12:41:03 - [app] app - [DEBUG] DEBUG - Response: 500