diff --git a/backend/app.py b/backend/app.py index 05df15de1..786cf374e 100644 --- a/backend/app.py +++ b/backend/app.py @@ -1082,18 +1082,19 @@ def api_get_printers(): def api_get_printer_status(): """API-Endpunkt für Drucker-Status mit verbessertem Status-Management""" try: - # Verwende den neuen TapoStatusManager - from utils.tapo_status_manager import tapo_status_manager + # Verwende den konsolidierten Hardware Integration Monitor + from utils.hardware_integration import printer_monitor # Status für alle Drucker abrufen - status_list = tapo_status_manager.get_all_printer_status() + status_data = printer_monitor.get_live_printer_status() + status_list = list(status_data.values()) # Erweitere Status mit UI-freundlichen Informationen for status in status_list: # Status-Display-Informationen hinzufügen plug_status = status.get("plug_status", "unknown") - if plug_status in tapo_status_manager.STATUS_DISPLAY: - status["status_display"] = tapo_status_manager.STATUS_DISPLAY[plug_status] + if plug_status in printer_monitor.STATUS_DISPLAY: + status["status_display"] = printer_monitor.STATUS_DISPLAY[plug_status] else: status["status_display"] = { "text": "Unbekannt", diff --git a/backend/config/__pycache__/settings.cpython-313.pyc b/backend/config/__pycache__/settings.cpython-313.pyc index d3c9bd5ef..44ea4a6a2 100644 Binary files a/backend/config/__pycache__/settings.cpython-313.pyc and b/backend/config/__pycache__/settings.cpython-313.pyc differ diff --git a/backend/database/myp.db b/backend/database/myp.db index 769b9dbb9..8b4b472ba 100644 Binary files a/backend/database/myp.db and b/backend/database/myp.db differ diff --git a/backend/instance/sessions/0b14f3f146fae98c80dedf5184052570_activity.pkl b/backend/instance/sessions/0b14f3f146fae98c80dedf5184052570_activity.pkl new file mode 100644 index 000000000..de7505ba7 Binary files /dev/null and b/backend/instance/sessions/0b14f3f146fae98c80dedf5184052570_activity.pkl differ diff --git a/backend/instance/sessions/0f6d9d4fe58a508bd667bd3f52976fb7_activity.pkl b/backend/instance/sessions/0f6d9d4fe58a508bd667bd3f52976fb7_activity.pkl new file mode 100644 index 000000000..0028b6dd4 Binary files /dev/null and b/backend/instance/sessions/0f6d9d4fe58a508bd667bd3f52976fb7_activity.pkl differ diff --git a/backend/instance/sessions/1311fd1ab6bc81b55733bad26a2a4210_activity.pkl b/backend/instance/sessions/1311fd1ab6bc81b55733bad26a2a4210_activity.pkl new file mode 100644 index 000000000..88445c576 Binary files /dev/null and b/backend/instance/sessions/1311fd1ab6bc81b55733bad26a2a4210_activity.pkl differ diff --git a/backend/instance/sessions/13306aa026c04fbccbf27153093179f6_activity.pkl b/backend/instance/sessions/13306aa026c04fbccbf27153093179f6_activity.pkl new file mode 100644 index 000000000..61e261c41 Binary files /dev/null and b/backend/instance/sessions/13306aa026c04fbccbf27153093179f6_activity.pkl differ diff --git a/backend/instance/sessions/17d9a80efcefe7371b121c57d0f5b3c0_activity.pkl b/backend/instance/sessions/17d9a80efcefe7371b121c57d0f5b3c0_activity.pkl new file mode 100644 index 000000000..cac43cd8b Binary files /dev/null and b/backend/instance/sessions/17d9a80efcefe7371b121c57d0f5b3c0_activity.pkl differ diff --git a/backend/instance/sessions/1a87e66878628eaaa0fd85dd03b1f311_activity.pkl b/backend/instance/sessions/1a87e66878628eaaa0fd85dd03b1f311_activity.pkl new file mode 100644 index 000000000..caedcf7de Binary files /dev/null and b/backend/instance/sessions/1a87e66878628eaaa0fd85dd03b1f311_activity.pkl differ diff --git a/backend/instance/sessions/1adfd5166d238b7ee50b5f709d4fdbe6_activity.pkl b/backend/instance/sessions/1adfd5166d238b7ee50b5f709d4fdbe6_activity.pkl new file mode 100644 index 000000000..ab40d095c Binary files /dev/null and b/backend/instance/sessions/1adfd5166d238b7ee50b5f709d4fdbe6_activity.pkl differ diff --git a/backend/instance/sessions/1beab8ca688071c96638e41e64a62122_activity.pkl b/backend/instance/sessions/1beab8ca688071c96638e41e64a62122_activity.pkl new file mode 100644 index 000000000..2eb19e015 Binary files /dev/null and b/backend/instance/sessions/1beab8ca688071c96638e41e64a62122_activity.pkl differ diff --git a/backend/instance/sessions/1ed77026990916f3ddfed5e1f2ea8b6e_activity.pkl b/backend/instance/sessions/1ed77026990916f3ddfed5e1f2ea8b6e_activity.pkl new file mode 100644 index 000000000..bfa65d987 Binary files /dev/null and b/backend/instance/sessions/1ed77026990916f3ddfed5e1f2ea8b6e_activity.pkl differ diff --git a/backend/instance/sessions/25678b033777e753617bfacb6387a155_activity.pkl b/backend/instance/sessions/25678b033777e753617bfacb6387a155_activity.pkl new file mode 100644 index 000000000..1602d2301 Binary files /dev/null and b/backend/instance/sessions/25678b033777e753617bfacb6387a155_activity.pkl differ diff --git a/backend/instance/sessions/27ff715bf86f516c7c05537f036ffad1_activity.pkl b/backend/instance/sessions/27ff715bf86f516c7c05537f036ffad1_activity.pkl new file mode 100644 index 000000000..d05788708 Binary files /dev/null and b/backend/instance/sessions/27ff715bf86f516c7c05537f036ffad1_activity.pkl differ diff --git a/backend/instance/sessions/2ce03b4d71ffb719464060285d0d5fb9_activity.pkl b/backend/instance/sessions/2ce03b4d71ffb719464060285d0d5fb9_activity.pkl new file mode 100644 index 000000000..a59e60735 Binary files /dev/null and b/backend/instance/sessions/2ce03b4d71ffb719464060285d0d5fb9_activity.pkl differ diff --git a/backend/instance/sessions/2d85e0f103c33deebeb5ffd7f5fc9365_activity.pkl b/backend/instance/sessions/2d85e0f103c33deebeb5ffd7f5fc9365_activity.pkl new file mode 100644 index 000000000..26d2646e6 Binary files /dev/null and b/backend/instance/sessions/2d85e0f103c33deebeb5ffd7f5fc9365_activity.pkl differ diff --git a/backend/instance/sessions/35339b8bd4afa4a75ca630dac5b3d38e_activity.pkl b/backend/instance/sessions/35339b8bd4afa4a75ca630dac5b3d38e_activity.pkl new file mode 100644 index 000000000..4670cb946 Binary files /dev/null and b/backend/instance/sessions/35339b8bd4afa4a75ca630dac5b3d38e_activity.pkl differ diff --git a/backend/instance/sessions/36c6edcc782f11a5ef65d2d30d38ddf8_activity.pkl b/backend/instance/sessions/36c6edcc782f11a5ef65d2d30d38ddf8_activity.pkl new file mode 100644 index 000000000..7a2e70417 Binary files /dev/null and b/backend/instance/sessions/36c6edcc782f11a5ef65d2d30d38ddf8_activity.pkl differ diff --git a/backend/instance/sessions/36f90d3c9aa726e59932a5461ab38eb9_activity.pkl b/backend/instance/sessions/36f90d3c9aa726e59932a5461ab38eb9_activity.pkl new file mode 100644 index 000000000..e31eb900e Binary files /dev/null and b/backend/instance/sessions/36f90d3c9aa726e59932a5461ab38eb9_activity.pkl differ diff --git a/backend/instance/sessions/37f1eb52b1e2f26fb5ea30458f8ef547_activity.pkl b/backend/instance/sessions/37f1eb52b1e2f26fb5ea30458f8ef547_activity.pkl new file mode 100644 index 000000000..e01712692 Binary files /dev/null and b/backend/instance/sessions/37f1eb52b1e2f26fb5ea30458f8ef547_activity.pkl differ diff --git a/backend/instance/sessions/3877d10e7838cbf2fef0100f25f782d2_activity.pkl b/backend/instance/sessions/3877d10e7838cbf2fef0100f25f782d2_activity.pkl new file mode 100644 index 000000000..f2cb0a38b Binary files /dev/null and b/backend/instance/sessions/3877d10e7838cbf2fef0100f25f782d2_activity.pkl differ diff --git a/backend/instance/sessions/38d27c461dd27be1d8adae5d0ff59411_activity.pkl b/backend/instance/sessions/38d27c461dd27be1d8adae5d0ff59411_activity.pkl new file mode 100644 index 000000000..a6038133f Binary files /dev/null and b/backend/instance/sessions/38d27c461dd27be1d8adae5d0ff59411_activity.pkl differ diff --git a/backend/instance/sessions/47df186a0d618fe76af9d828943ff556_activity.pkl b/backend/instance/sessions/47df186a0d618fe76af9d828943ff556_activity.pkl new file mode 100644 index 000000000..94dd7bcad Binary files /dev/null and b/backend/instance/sessions/47df186a0d618fe76af9d828943ff556_activity.pkl differ diff --git a/backend/instance/sessions/4cb290536287471aba0827ecb9552d26_activity.pkl b/backend/instance/sessions/4cb290536287471aba0827ecb9552d26_activity.pkl new file mode 100644 index 000000000..7bf342c79 Binary files /dev/null and b/backend/instance/sessions/4cb290536287471aba0827ecb9552d26_activity.pkl differ diff --git a/backend/instance/sessions/4d1fb83a4e95288f4f66c27cce0882be_activity.pkl b/backend/instance/sessions/4d1fb83a4e95288f4f66c27cce0882be_activity.pkl new file mode 100644 index 000000000..5962b1665 Binary files /dev/null and b/backend/instance/sessions/4d1fb83a4e95288f4f66c27cce0882be_activity.pkl differ diff --git a/backend/instance/sessions/503923ec8159ffb5df08845d167eca81_activity.pkl b/backend/instance/sessions/503923ec8159ffb5df08845d167eca81_activity.pkl new file mode 100644 index 000000000..ab4759f1f Binary files /dev/null and b/backend/instance/sessions/503923ec8159ffb5df08845d167eca81_activity.pkl differ diff --git a/backend/instance/sessions/51514f3bb0ccc5f884c0332fe537a953_activity.pkl b/backend/instance/sessions/51514f3bb0ccc5f884c0332fe537a953_activity.pkl new file mode 100644 index 000000000..483eda2ca Binary files /dev/null and b/backend/instance/sessions/51514f3bb0ccc5f884c0332fe537a953_activity.pkl differ diff --git a/backend/instance/sessions/555d699315d91968835f4c04e14e61df_activity.pkl b/backend/instance/sessions/555d699315d91968835f4c04e14e61df_activity.pkl new file mode 100644 index 000000000..315ce32c5 Binary files /dev/null and b/backend/instance/sessions/555d699315d91968835f4c04e14e61df_activity.pkl differ diff --git a/backend/instance/sessions/5674c28f3eafb3d54af636cb70d30098_activity.pkl b/backend/instance/sessions/5674c28f3eafb3d54af636cb70d30098_activity.pkl new file mode 100644 index 000000000..8eff09ec6 Binary files /dev/null and b/backend/instance/sessions/5674c28f3eafb3d54af636cb70d30098_activity.pkl differ diff --git a/backend/instance/sessions/5775534e580b754c7cf8c9cf2ba65514_activity.pkl b/backend/instance/sessions/5775534e580b754c7cf8c9cf2ba65514_activity.pkl new file mode 100644 index 000000000..2e680e6be Binary files /dev/null and b/backend/instance/sessions/5775534e580b754c7cf8c9cf2ba65514_activity.pkl differ diff --git a/backend/instance/sessions/584ee6fece5563475702d37edae70e2a_activity.pkl b/backend/instance/sessions/584ee6fece5563475702d37edae70e2a_activity.pkl new file mode 100644 index 000000000..8ed4c86c3 Binary files /dev/null and b/backend/instance/sessions/584ee6fece5563475702d37edae70e2a_activity.pkl differ diff --git a/backend/instance/sessions/589b4c70260691dc9c5745116baedc70_activity.pkl b/backend/instance/sessions/589b4c70260691dc9c5745116baedc70_activity.pkl new file mode 100644 index 000000000..0d52140e8 Binary files /dev/null and b/backend/instance/sessions/589b4c70260691dc9c5745116baedc70_activity.pkl differ diff --git a/backend/instance/sessions/58df356ecd512a808cf4f4f0c5241252_activity.pkl b/backend/instance/sessions/58df356ecd512a808cf4f4f0c5241252_activity.pkl new file mode 100644 index 000000000..ace7222aa Binary files /dev/null and b/backend/instance/sessions/58df356ecd512a808cf4f4f0c5241252_activity.pkl differ diff --git a/backend/instance/sessions/596a20ae49e7fb0c00123d4165135bb6_activity.pkl b/backend/instance/sessions/596a20ae49e7fb0c00123d4165135bb6_activity.pkl new file mode 100644 index 000000000..9db396b9f Binary files /dev/null and b/backend/instance/sessions/596a20ae49e7fb0c00123d4165135bb6_activity.pkl differ diff --git a/backend/instance/sessions/5a16985f0717b955a8a937b9368f0093_activity.pkl b/backend/instance/sessions/5a16985f0717b955a8a937b9368f0093_activity.pkl new file mode 100644 index 000000000..72049a202 Binary files /dev/null and b/backend/instance/sessions/5a16985f0717b955a8a937b9368f0093_activity.pkl differ diff --git a/backend/instance/sessions/5a7ae004a54f6f3dd6ca7fcfa9f7f7cb_activity.pkl b/backend/instance/sessions/5a7ae004a54f6f3dd6ca7fcfa9f7f7cb_activity.pkl new file mode 100644 index 000000000..0699a64e6 Binary files /dev/null and b/backend/instance/sessions/5a7ae004a54f6f3dd6ca7fcfa9f7f7cb_activity.pkl differ diff --git a/backend/instance/sessions/5a9e6a5731a94ae05854a039fd526bf2_activity.pkl b/backend/instance/sessions/5a9e6a5731a94ae05854a039fd526bf2_activity.pkl new file mode 100644 index 000000000..9df7fdaab Binary files /dev/null and b/backend/instance/sessions/5a9e6a5731a94ae05854a039fd526bf2_activity.pkl differ diff --git a/backend/instance/sessions/5b289658d661077000bd36e2a3546558_activity.pkl b/backend/instance/sessions/5b289658d661077000bd36e2a3546558_activity.pkl new file mode 100644 index 000000000..c4335a5fb Binary files /dev/null and b/backend/instance/sessions/5b289658d661077000bd36e2a3546558_activity.pkl differ diff --git a/backend/instance/sessions/5d006b93a81bc31a8d0fb7662721f09e_activity.pkl b/backend/instance/sessions/5d006b93a81bc31a8d0fb7662721f09e_activity.pkl new file mode 100644 index 000000000..364492ca3 Binary files /dev/null and b/backend/instance/sessions/5d006b93a81bc31a8d0fb7662721f09e_activity.pkl differ diff --git a/backend/instance/sessions/5e39ead2ac683fb9c40cd5b6c437f5eb_activity.pkl b/backend/instance/sessions/5e39ead2ac683fb9c40cd5b6c437f5eb_activity.pkl new file mode 100644 index 000000000..e6cad940c Binary files /dev/null and b/backend/instance/sessions/5e39ead2ac683fb9c40cd5b6c437f5eb_activity.pkl differ diff --git a/backend/instance/sessions/5f68de37cd24062661e0fe89950179f4_activity.pkl b/backend/instance/sessions/5f68de37cd24062661e0fe89950179f4_activity.pkl new file mode 100644 index 000000000..73f60932a Binary files /dev/null and b/backend/instance/sessions/5f68de37cd24062661e0fe89950179f4_activity.pkl differ diff --git a/backend/instance/sessions/6037bda7e94819a864d26fdb7575fc01_activity.pkl b/backend/instance/sessions/6037bda7e94819a864d26fdb7575fc01_activity.pkl new file mode 100644 index 000000000..873c317d0 Binary files /dev/null and b/backend/instance/sessions/6037bda7e94819a864d26fdb7575fc01_activity.pkl differ diff --git a/backend/instance/sessions/629ab9ebec9bc079a5c273d08baac357_activity.pkl b/backend/instance/sessions/629ab9ebec9bc079a5c273d08baac357_activity.pkl new file mode 100644 index 000000000..8f96c2a43 Binary files /dev/null and b/backend/instance/sessions/629ab9ebec9bc079a5c273d08baac357_activity.pkl differ diff --git a/backend/instance/sessions/63df2c5e3bee4f99f13c6d4f0cc2f963_activity.pkl b/backend/instance/sessions/63df2c5e3bee4f99f13c6d4f0cc2f963_activity.pkl new file mode 100644 index 000000000..8e303d73c Binary files /dev/null and b/backend/instance/sessions/63df2c5e3bee4f99f13c6d4f0cc2f963_activity.pkl differ diff --git a/backend/instance/sessions/6752b44b57421c55c1705e960a203d7f_activity.pkl b/backend/instance/sessions/6752b44b57421c55c1705e960a203d7f_activity.pkl new file mode 100644 index 000000000..dfefc819c Binary files /dev/null and b/backend/instance/sessions/6752b44b57421c55c1705e960a203d7f_activity.pkl differ diff --git a/backend/instance/sessions/6862c9401e6c6dbff38160a03c81666d_activity.pkl b/backend/instance/sessions/6862c9401e6c6dbff38160a03c81666d_activity.pkl new file mode 100644 index 000000000..38bb95f64 Binary files /dev/null and b/backend/instance/sessions/6862c9401e6c6dbff38160a03c81666d_activity.pkl differ diff --git a/backend/instance/sessions/6c58baa8e1c0af01375f29bd018b07c6_activity.pkl b/backend/instance/sessions/6c58baa8e1c0af01375f29bd018b07c6_activity.pkl new file mode 100644 index 000000000..5494e2db0 Binary files /dev/null and b/backend/instance/sessions/6c58baa8e1c0af01375f29bd018b07c6_activity.pkl differ diff --git a/backend/instance/sessions/6df834161c68d32eac169cb02d814097_activity.pkl b/backend/instance/sessions/6df834161c68d32eac169cb02d814097_activity.pkl new file mode 100644 index 000000000..77e13dad6 Binary files /dev/null and b/backend/instance/sessions/6df834161c68d32eac169cb02d814097_activity.pkl differ diff --git a/backend/instance/sessions/6ec7848c30cb726609c6b2eeee1406cf_activity.pkl b/backend/instance/sessions/6ec7848c30cb726609c6b2eeee1406cf_activity.pkl new file mode 100644 index 000000000..6f44cda18 Binary files /dev/null and b/backend/instance/sessions/6ec7848c30cb726609c6b2eeee1406cf_activity.pkl differ diff --git a/backend/instance/sessions/777a0728793f9040490de8dccaa52e40_activity.pkl b/backend/instance/sessions/777a0728793f9040490de8dccaa52e40_activity.pkl new file mode 100644 index 000000000..654dc8647 Binary files /dev/null and b/backend/instance/sessions/777a0728793f9040490de8dccaa52e40_activity.pkl differ diff --git a/backend/instance/sessions/7e22f1964a27028ef3029cec7107583b_activity.pkl b/backend/instance/sessions/7e22f1964a27028ef3029cec7107583b_activity.pkl new file mode 100644 index 000000000..8d56a8a95 Binary files /dev/null and b/backend/instance/sessions/7e22f1964a27028ef3029cec7107583b_activity.pkl differ diff --git a/backend/instance/sessions/7e5b1ca469af75d56689b944379cf37c_activity.pkl b/backend/instance/sessions/7e5b1ca469af75d56689b944379cf37c_activity.pkl new file mode 100644 index 000000000..6a63bf877 Binary files /dev/null and b/backend/instance/sessions/7e5b1ca469af75d56689b944379cf37c_activity.pkl differ diff --git a/backend/instance/sessions/7f683aca9b3ff61dd593b2572be1ac9b_activity.pkl b/backend/instance/sessions/7f683aca9b3ff61dd593b2572be1ac9b_activity.pkl new file mode 100644 index 000000000..c1b0737aa Binary files /dev/null and b/backend/instance/sessions/7f683aca9b3ff61dd593b2572be1ac9b_activity.pkl differ diff --git a/backend/instance/sessions/80ec5ca672e87346fb17ad61bce4dad2_activity.pkl b/backend/instance/sessions/80ec5ca672e87346fb17ad61bce4dad2_activity.pkl new file mode 100644 index 000000000..e7853fb28 Binary files /dev/null and b/backend/instance/sessions/80ec5ca672e87346fb17ad61bce4dad2_activity.pkl differ diff --git a/backend/instance/sessions/82ba4a0f684cdc865c6aebde46fdb4ed_activity.pkl b/backend/instance/sessions/82ba4a0f684cdc865c6aebde46fdb4ed_activity.pkl new file mode 100644 index 000000000..6db532659 Binary files /dev/null and b/backend/instance/sessions/82ba4a0f684cdc865c6aebde46fdb4ed_activity.pkl differ diff --git a/backend/instance/sessions/83206a7fd70d4db85cf8121186636be2_activity.pkl b/backend/instance/sessions/83206a7fd70d4db85cf8121186636be2_activity.pkl new file mode 100644 index 000000000..c97b5c873 Binary files /dev/null and b/backend/instance/sessions/83206a7fd70d4db85cf8121186636be2_activity.pkl differ diff --git a/backend/instance/sessions/8489b321086b8156c051838ff96ce734_activity.pkl b/backend/instance/sessions/8489b321086b8156c051838ff96ce734_activity.pkl new file mode 100644 index 000000000..4c67ede0f Binary files /dev/null and b/backend/instance/sessions/8489b321086b8156c051838ff96ce734_activity.pkl differ diff --git a/backend/instance/sessions/8572e4a4314f1d2281cfcad9bb9b8ae3_activity.pkl b/backend/instance/sessions/8572e4a4314f1d2281cfcad9bb9b8ae3_activity.pkl new file mode 100644 index 000000000..6bb66ea73 Binary files /dev/null and b/backend/instance/sessions/8572e4a4314f1d2281cfcad9bb9b8ae3_activity.pkl differ diff --git a/backend/instance/sessions/87e0d7a5556095c744a996a00756c982_activity.pkl b/backend/instance/sessions/87e0d7a5556095c744a996a00756c982_activity.pkl new file mode 100644 index 000000000..749788f00 Binary files /dev/null and b/backend/instance/sessions/87e0d7a5556095c744a996a00756c982_activity.pkl differ diff --git a/backend/instance/sessions/894b6eff08f57633245d4aa8798c69f6_activity.pkl b/backend/instance/sessions/894b6eff08f57633245d4aa8798c69f6_activity.pkl new file mode 100644 index 000000000..eae17e9e2 Binary files /dev/null and b/backend/instance/sessions/894b6eff08f57633245d4aa8798c69f6_activity.pkl differ diff --git a/backend/instance/sessions/8aa7f443ecedccb2868a79591d0bfc1a_activity.pkl b/backend/instance/sessions/8aa7f443ecedccb2868a79591d0bfc1a_activity.pkl new file mode 100644 index 000000000..8c5e4bf02 Binary files /dev/null and b/backend/instance/sessions/8aa7f443ecedccb2868a79591d0bfc1a_activity.pkl differ diff --git a/backend/instance/sessions/8ed81702cfba5c4ca63aaf092dcf7310_activity.pkl b/backend/instance/sessions/8ed81702cfba5c4ca63aaf092dcf7310_activity.pkl new file mode 100644 index 000000000..fbe0b6507 Binary files /dev/null and b/backend/instance/sessions/8ed81702cfba5c4ca63aaf092dcf7310_activity.pkl differ diff --git a/backend/instance/sessions/910c454d46de6186b2aa61177e260b82_activity.pkl b/backend/instance/sessions/910c454d46de6186b2aa61177e260b82_activity.pkl new file mode 100644 index 000000000..2e99a6f7d Binary files /dev/null and b/backend/instance/sessions/910c454d46de6186b2aa61177e260b82_activity.pkl differ diff --git a/backend/instance/sessions/9801e8f7372de4b86816ace3d7945356_activity.pkl b/backend/instance/sessions/9801e8f7372de4b86816ace3d7945356_activity.pkl new file mode 100644 index 000000000..5582ba14a Binary files /dev/null and b/backend/instance/sessions/9801e8f7372de4b86816ace3d7945356_activity.pkl differ diff --git a/backend/instance/sessions/a264efc37504614eea2e9e095816bca2_activity.pkl b/backend/instance/sessions/a264efc37504614eea2e9e095816bca2_activity.pkl new file mode 100644 index 000000000..7a3d0880a Binary files /dev/null and b/backend/instance/sessions/a264efc37504614eea2e9e095816bca2_activity.pkl differ diff --git a/backend/instance/sessions/a384c49490515204fd3b0530b05ebf14_activity.pkl b/backend/instance/sessions/a384c49490515204fd3b0530b05ebf14_activity.pkl new file mode 100644 index 000000000..d0c41311f Binary files /dev/null and b/backend/instance/sessions/a384c49490515204fd3b0530b05ebf14_activity.pkl differ diff --git a/backend/instance/sessions/a67b64e6324e0e274ef1f377e5edb342_activity.pkl b/backend/instance/sessions/a67b64e6324e0e274ef1f377e5edb342_activity.pkl new file mode 100644 index 000000000..5c07ccf8f Binary files /dev/null and b/backend/instance/sessions/a67b64e6324e0e274ef1f377e5edb342_activity.pkl differ diff --git a/backend/instance/sessions/aa16770011fb665cf8606db5930d0679_activity.pkl b/backend/instance/sessions/aa16770011fb665cf8606db5930d0679_activity.pkl new file mode 100644 index 000000000..453f39671 Binary files /dev/null and b/backend/instance/sessions/aa16770011fb665cf8606db5930d0679_activity.pkl differ diff --git a/backend/instance/sessions/b4c184feddc7e97f162a76c3ca51f923_activity.pkl b/backend/instance/sessions/b4c184feddc7e97f162a76c3ca51f923_activity.pkl new file mode 100644 index 000000000..86d7d8f46 Binary files /dev/null and b/backend/instance/sessions/b4c184feddc7e97f162a76c3ca51f923_activity.pkl differ diff --git a/backend/instance/sessions/be8cf3f1b58a149d3e4371e349f36e3b_activity.pkl b/backend/instance/sessions/be8cf3f1b58a149d3e4371e349f36e3b_activity.pkl new file mode 100644 index 000000000..3d478d536 Binary files /dev/null and b/backend/instance/sessions/be8cf3f1b58a149d3e4371e349f36e3b_activity.pkl differ diff --git a/backend/instance/sessions/bfbaac263f7f9af4891382bf72418f19_activity.pkl b/backend/instance/sessions/bfbaac263f7f9af4891382bf72418f19_activity.pkl new file mode 100644 index 000000000..6db493545 Binary files /dev/null and b/backend/instance/sessions/bfbaac263f7f9af4891382bf72418f19_activity.pkl differ diff --git a/backend/instance/sessions/bfe075e1cc9c5803a60d8072855f1133_activity.pkl b/backend/instance/sessions/bfe075e1cc9c5803a60d8072855f1133_activity.pkl new file mode 100644 index 000000000..aefdd41ef Binary files /dev/null and b/backend/instance/sessions/bfe075e1cc9c5803a60d8072855f1133_activity.pkl differ diff --git a/backend/instance/sessions/c5184b1d1b95dc225fa56677760e4413_activity.pkl b/backend/instance/sessions/c5184b1d1b95dc225fa56677760e4413_activity.pkl new file mode 100644 index 000000000..926774ef9 Binary files /dev/null and b/backend/instance/sessions/c5184b1d1b95dc225fa56677760e4413_activity.pkl differ diff --git a/backend/instance/sessions/c608253cf1348c086ebe1ad592fbd411_activity.pkl b/backend/instance/sessions/c608253cf1348c086ebe1ad592fbd411_activity.pkl new file mode 100644 index 000000000..fcd5f38f5 Binary files /dev/null and b/backend/instance/sessions/c608253cf1348c086ebe1ad592fbd411_activity.pkl differ diff --git a/backend/instance/sessions/ccde9c466f92e4127ce99e5bd13f06ba_activity.pkl b/backend/instance/sessions/ccde9c466f92e4127ce99e5bd13f06ba_activity.pkl new file mode 100644 index 000000000..2daf9043e Binary files /dev/null and b/backend/instance/sessions/ccde9c466f92e4127ce99e5bd13f06ba_activity.pkl differ diff --git a/backend/instance/sessions/cd9f6b10c9798091059aa002294a13fb_activity.pkl b/backend/instance/sessions/cd9f6b10c9798091059aa002294a13fb_activity.pkl new file mode 100644 index 000000000..90bff6d6a Binary files /dev/null and b/backend/instance/sessions/cd9f6b10c9798091059aa002294a13fb_activity.pkl differ diff --git a/backend/instance/sessions/cf8562755ea06473459b246271cac70f_activity.pkl b/backend/instance/sessions/cf8562755ea06473459b246271cac70f_activity.pkl new file mode 100644 index 000000000..83c4e07b7 Binary files /dev/null and b/backend/instance/sessions/cf8562755ea06473459b246271cac70f_activity.pkl differ diff --git a/backend/instance/sessions/cfefc3d0f118f41008183a2f856d9e71_activity.pkl b/backend/instance/sessions/cfefc3d0f118f41008183a2f856d9e71_activity.pkl new file mode 100644 index 000000000..b54c017d1 Binary files /dev/null and b/backend/instance/sessions/cfefc3d0f118f41008183a2f856d9e71_activity.pkl differ diff --git a/backend/instance/sessions/d1a599924f1a3e31ccb658a97645decc_activity.pkl b/backend/instance/sessions/d1a599924f1a3e31ccb658a97645decc_activity.pkl new file mode 100644 index 000000000..1644470ec Binary files /dev/null and b/backend/instance/sessions/d1a599924f1a3e31ccb658a97645decc_activity.pkl differ diff --git a/backend/instance/sessions/d1d75ca26ec17bfbc64a2493de38194a_activity.pkl b/backend/instance/sessions/d1d75ca26ec17bfbc64a2493de38194a_activity.pkl new file mode 100644 index 000000000..dcc92dfa3 Binary files /dev/null and b/backend/instance/sessions/d1d75ca26ec17bfbc64a2493de38194a_activity.pkl differ diff --git a/backend/instance/sessions/d1e6646f31ed9b0b60dbc34c7c75b6a7_activity.pkl b/backend/instance/sessions/d1e6646f31ed9b0b60dbc34c7c75b6a7_activity.pkl new file mode 100644 index 000000000..27501c786 Binary files /dev/null and b/backend/instance/sessions/d1e6646f31ed9b0b60dbc34c7c75b6a7_activity.pkl differ diff --git a/backend/instance/sessions/d48c7629aa5985cce4a8baa6e5db3cc1_activity.pkl b/backend/instance/sessions/d48c7629aa5985cce4a8baa6e5db3cc1_activity.pkl new file mode 100644 index 000000000..0b6ce8336 Binary files /dev/null and b/backend/instance/sessions/d48c7629aa5985cce4a8baa6e5db3cc1_activity.pkl differ diff --git a/backend/instance/sessions/d69a4dc36a71483b20e706576e625826_activity.pkl b/backend/instance/sessions/d69a4dc36a71483b20e706576e625826_activity.pkl new file mode 100644 index 000000000..32e74aa3e Binary files /dev/null and b/backend/instance/sessions/d69a4dc36a71483b20e706576e625826_activity.pkl differ diff --git a/backend/instance/sessions/d6dbbd7e81c492d4b83523650aad3dbe_activity.pkl b/backend/instance/sessions/d6dbbd7e81c492d4b83523650aad3dbe_activity.pkl new file mode 100644 index 000000000..e7b99d50b Binary files /dev/null and b/backend/instance/sessions/d6dbbd7e81c492d4b83523650aad3dbe_activity.pkl differ diff --git a/backend/instance/sessions/d7c90a73abfb600efcc87092d095e62f_activity.pkl b/backend/instance/sessions/d7c90a73abfb600efcc87092d095e62f_activity.pkl new file mode 100644 index 000000000..cc012f4dd Binary files /dev/null and b/backend/instance/sessions/d7c90a73abfb600efcc87092d095e62f_activity.pkl differ diff --git a/backend/instance/sessions/dcbb661c363e5b7346184e9107e7139d_activity.pkl b/backend/instance/sessions/dcbb661c363e5b7346184e9107e7139d_activity.pkl new file mode 100644 index 000000000..4264a12f9 Binary files /dev/null and b/backend/instance/sessions/dcbb661c363e5b7346184e9107e7139d_activity.pkl differ diff --git a/backend/instance/sessions/dd2cebc95699b5418098b77fcec1d562_activity.pkl b/backend/instance/sessions/dd2cebc95699b5418098b77fcec1d562_activity.pkl new file mode 100644 index 000000000..c646068a1 Binary files /dev/null and b/backend/instance/sessions/dd2cebc95699b5418098b77fcec1d562_activity.pkl differ diff --git a/backend/instance/sessions/de03a88c2fa419721c382dc3ad31d3d6_activity.pkl b/backend/instance/sessions/de03a88c2fa419721c382dc3ad31d3d6_activity.pkl new file mode 100644 index 000000000..8045250a1 Binary files /dev/null and b/backend/instance/sessions/de03a88c2fa419721c382dc3ad31d3d6_activity.pkl differ diff --git a/backend/instance/sessions/dee5f708e466a078324e6eed007b6823_activity.pkl b/backend/instance/sessions/dee5f708e466a078324e6eed007b6823_activity.pkl new file mode 100644 index 000000000..7062fe5e2 Binary files /dev/null and b/backend/instance/sessions/dee5f708e466a078324e6eed007b6823_activity.pkl differ diff --git a/backend/instance/sessions/e505ddd4ba043053d6dd839cf6162de5_activity.pkl b/backend/instance/sessions/e505ddd4ba043053d6dd839cf6162de5_activity.pkl new file mode 100644 index 000000000..8f43a9654 Binary files /dev/null and b/backend/instance/sessions/e505ddd4ba043053d6dd839cf6162de5_activity.pkl differ diff --git a/backend/instance/sessions/e69183ba07ae450207a0921e4b23f006_activity.pkl b/backend/instance/sessions/e69183ba07ae450207a0921e4b23f006_activity.pkl new file mode 100644 index 000000000..c354ad179 Binary files /dev/null and b/backend/instance/sessions/e69183ba07ae450207a0921e4b23f006_activity.pkl differ diff --git a/backend/instance/sessions/e7f927e1ad2d87d5f61cf1b135afdf56_activity.pkl b/backend/instance/sessions/e7f927e1ad2d87d5f61cf1b135afdf56_activity.pkl new file mode 100644 index 000000000..771e160c6 Binary files /dev/null and b/backend/instance/sessions/e7f927e1ad2d87d5f61cf1b135afdf56_activity.pkl differ diff --git a/backend/instance/sessions/e95e2aae77b5c72a71eb2c06f6393296_activity.pkl b/backend/instance/sessions/e95e2aae77b5c72a71eb2c06f6393296_activity.pkl new file mode 100644 index 000000000..ac9610d67 Binary files /dev/null and b/backend/instance/sessions/e95e2aae77b5c72a71eb2c06f6393296_activity.pkl differ diff --git a/backend/instance/sessions/ec561598f02a4d8de2204e2da37bfd29_activity.pkl b/backend/instance/sessions/ec561598f02a4d8de2204e2da37bfd29_activity.pkl new file mode 100644 index 000000000..334d3b0d3 Binary files /dev/null and b/backend/instance/sessions/ec561598f02a4d8de2204e2da37bfd29_activity.pkl differ diff --git a/backend/instance/sessions/ee2e6212e19ea809d912697a74d7c6ef_activity.pkl b/backend/instance/sessions/ee2e6212e19ea809d912697a74d7c6ef_activity.pkl new file mode 100644 index 000000000..4ebc41d34 Binary files /dev/null and b/backend/instance/sessions/ee2e6212e19ea809d912697a74d7c6ef_activity.pkl differ diff --git a/backend/instance/sessions/f1d7de488fa0a70c70bcac27f3c6fa3a_activity.pkl b/backend/instance/sessions/f1d7de488fa0a70c70bcac27f3c6fa3a_activity.pkl new file mode 100644 index 000000000..509f3e015 Binary files /dev/null and b/backend/instance/sessions/f1d7de488fa0a70c70bcac27f3c6fa3a_activity.pkl differ diff --git a/backend/instance/sessions/f2b53d3718fdbdc4945db938c22504b5_activity.pkl b/backend/instance/sessions/f2b53d3718fdbdc4945db938c22504b5_activity.pkl new file mode 100644 index 000000000..3a464190f Binary files /dev/null and b/backend/instance/sessions/f2b53d3718fdbdc4945db938c22504b5_activity.pkl differ diff --git a/backend/instance/sessions/f55098523c5a9902cafb3d01c6de6e75_activity.pkl b/backend/instance/sessions/f55098523c5a9902cafb3d01c6de6e75_activity.pkl new file mode 100644 index 000000000..fbad7f78f Binary files /dev/null and b/backend/instance/sessions/f55098523c5a9902cafb3d01c6de6e75_activity.pkl differ diff --git a/backend/instance/sessions/f85064f02c09da9f6da71e426383f06d_activity.pkl b/backend/instance/sessions/f85064f02c09da9f6da71e426383f06d_activity.pkl new file mode 100644 index 000000000..c15d42d8e Binary files /dev/null and b/backend/instance/sessions/f85064f02c09da9f6da71e426383f06d_activity.pkl differ diff --git a/backend/instance/sessions/faf8cd7212a9cc2cf645248a1b1aef40_activity.pkl b/backend/instance/sessions/faf8cd7212a9cc2cf645248a1b1aef40_activity.pkl new file mode 100644 index 000000000..ff4d895e8 Binary files /dev/null and b/backend/instance/sessions/faf8cd7212a9cc2cf645248a1b1aef40_activity.pkl differ diff --git a/backend/instance/sessions/fc48a5e56054974c9ffa09151b447507_activity.pkl b/backend/instance/sessions/fc48a5e56054974c9ffa09151b447507_activity.pkl new file mode 100644 index 000000000..f109062d4 Binary files /dev/null and b/backend/instance/sessions/fc48a5e56054974c9ffa09151b447507_activity.pkl differ diff --git a/backend/logs/admin/admin.log b/backend/logs/admin/admin.log index e9743d5c8..28dd2e59c 100644 --- a/backend/logs/admin/admin.log +++ b/backend/logs/admin/admin.log @@ -613,3 +613,9 @@ 2025-06-18 12:40:29 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True 2025-06-18 12:40:29 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin 2025-06-18 12:40:29 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: Could not build url for endpoint 'admin_users'. Did you mean 'admin.add_user_page' instead? +2025-06-19 09:22:53 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True +2025-06-19 09:22:53 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin +2025-06-19 09:22:53 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: Could not build url for endpoint 'admin_users'. Did you mean 'admin.add_user_page' instead? +2025-06-19 09:22:59 - [admin] admin - [INFO] INFO - Admin-Check für Funktion admin_dashboard: User authenticated: True, User ID: 1, Is Admin: True +2025-06-19 09:22:59 - [admin] admin - [INFO] INFO - Admin-Dashboard geladen von admin +2025-06-19 09:22:59 - [admin] admin - [ERROR] ERROR - Fehler beim Laden des Admin-Dashboards: Could not build url for endpoint 'admin_users'. Did you mean 'admin.add_user_page' instead? diff --git a/backend/logs/app/app.log b/backend/logs/app/app.log index d337b08f1..f64d00122 100644 --- a/backend/logs/app/app.log +++ b/backend/logs/app/app.log @@ -43431,3 +43431,705 @@ werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'admin_ 2025-06-18 12:51:46 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications 2025-06-18 12:51:46 - [app] app - [DEBUG] DEBUG - Response: 200 2025-06-19 09:21:52 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:22:06 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:22:07 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:22:07 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:22:16 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:22:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:22:23 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:22:23 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:22:24 - [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 09:22:24 - [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 09:22:24 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:36 - [app] app - [DEBUG] DEBUG - Request: POST /auth/login +2025-06-19 09:22:36 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:38 - [app] app - [DEBUG] DEBUG - Request: GET / +2025-06-19 09:22:38 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:22:38 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard +2025-06-19 09:22:38 - [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 09:22:38 - [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 09:22:38 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:39 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:22:39 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Request: GET /printers +2025-06-19 09:22:42 - [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 09:22:42 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:22:42 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:42 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:22:42 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:45 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:22:45 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:22:45 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:50 - [app] app - [DEBUG] DEBUG - Request: POST /api/printers/1/connect +2025-06-19 09:22:50 - [app] app - [DEBUG] DEBUG - Response: 500 +2025-06-19 09:22:53 - [app] app - [DEBUG] DEBUG - Request: GET /admin/ +2025-06-19 09:22:53 - [app] app - [INFO] INFO - Locating template 'admin.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\\admin.html') +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250619_092253 +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/admin/ +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - Method: GET +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - User: admin +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - Exception Type: BuildError +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin_users'. Did you mean 'admin.add_user_page' instead? +2025-06-19 09:22:53 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 122, in admin_dashboard + return render_template('admin.html', stats=stats, active_tab=None) + 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\admin.html", line 1, in top-level template code + {% extends "base.html" %} + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 456, in top-level template code + {% block content %}{% endblock %} + ^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin.html", line 71, in block 'content' + + ^^^^^ + 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_users'. Did you mean 'admin.add_user_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\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 93, in decorated_function + return f(*args, **kwargs) + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 127, in admin_dashboard + return render_template('admin.html', stats={}, active_tab=None) + 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\admin.html", line 1, in top-level template code + {% extends "base.html" %} + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 456, in top-level template code + {% block content %}{% endblock %} + ^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin.html", line 71, in block 'content' + + ^^^^^ + 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_users'. Did you mean 'admin.add_user_page' instead? + +2025-06-19 09:22:53 - [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-19 09:22:53 - [app] app - [DEBUG] DEBUG - Response: 500 +2025-06-19 09:22:54 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:22:54 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:22:54 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-19 09:22:54 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-19 09:22:54 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-19 09:22:56 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:22:58 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:22:58 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:22:59 - [app] app - [INFO] INFO - Locating template 'admin.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\\admin.html') +2025-06-19 09:22:59 - [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 09:22:59 - [app] app - [ERROR] ERROR - Unhandled Exception - ID: 20250619_092259 +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - URL: http://127.0.0.1:5000/admin/ +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - Method: GET +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - User: admin +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - Exception Type: BuildError +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - Exception: Could not build url for endpoint 'admin_users'. Did you mean 'admin.add_user_page' instead? +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - Traceback: Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 122, in admin_dashboard + return render_template('admin.html', stats=stats, active_tab=None) + 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\admin.html", line 1, in top-level template code + {% extends "base.html" %} + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 456, in top-level template code + {% block content %}{% endblock %} + ^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin.html", line 71, in block 'content' + + ^^^^^ + 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_users'. Did you mean 'admin.add_user_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\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 93, in decorated_function + return f(*args, **kwargs) + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\blueprints\admin_unified.py", line 127, in admin_dashboard + return render_template('admin.html', stats={}, active_tab=None) + 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\admin.html", line 1, in top-level template code + {% extends "base.html" %} + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\base.html", line 456, in top-level template code + {% block content %}{% endblock %} + ^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend\templates\admin.html", line 71, in block 'content' + + ^^^^^ + 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_users'. Did you mean 'admin.add_user_page' instead? + +2025-06-19 09:22:59 - [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-19 09:22:59 - [app] app - [DEBUG] DEBUG - Response: 500 +2025-06-19 09:22:59 - [app] app - [ERROR] ERROR - Fehler beim Laden des Benutzers 1: tuple index out of range +2025-06-19 09:22:59 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:22:59 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:04 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/ +2025-06-19 09:23:08 - [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-19 09:23:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:08 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:23:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:13 - [app] app - [ERROR] ERROR - CSRF-Fehler für /tapo/control-form: The CSRF token is missing. +2025-06-19 09:23:13 - [app] app - [ERROR] ERROR - Request Headers: {'Host': '127.0.0.1:5000', 'Connection': 'keep-alive', 'Content-Length': '26', 'Cache-Control': 'max-age=0', 'Sec-Ch-Ua': '"Brave";v="137", "Chromium";v="137", "Not/A)Brand";v="24"', 'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Platform': '"Windows"', 'Origin': 'http://127.0.0.1:5000', 'Dnt': '1', 'Upgrade-Insecure-Requests': '1', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-Gpc': '1', 'Accept-Language': 'de-DE,de;q=0.8', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Referer': 'http://127.0.0.1:5000/tapo/', 'Accept-Encoding': 'gzip, deflate, br, zstd', 'Cookie': 'session=.eJwljjtqBTEMAO_iOoUsWZb9LrPoS0Iggd33qpC7ZyHlTDHMTzvqzOu9PZ7nK9_a8RHt0dgylyl18b6KoMdAL9i9ylbBVIzKCThgLuYhnYYNBRZ2iBUqPGzqQACjzICtLGGiRawbbYqB1y5hlJ19agTNCq2RbFTm7R55XXn-3_Qb_TrreH5_5tctZs-BgoO5lmfS1I7m6CSwwYmg8C7nbr9_OUQ_vQ.aFO63A.20mmneS-czOYT6FvN6lQZ2SmKog'} +2025-06-19 09:23:13 - [app] app - [ERROR] ERROR - Request Form: {'ip': '192.168.0.100', 'action': 'on'} +2025-06-19 09:23:13 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:23:13 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/control-form +2025-06-19 09:23:13 - [app] app - [WARNING] WARNING - Method Not Allowed (405): GET http://127.0.0.1:5000/tapo/control-form +2025-06-19 09:23:13 - [app] app - [INFO] INFO - Locating template 'errors/405.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\\405.html') +2025-06-19 09:23:13 - [app] app - [DEBUG] DEBUG - Response: 405 +2025-06-19 09:23:13 - [app] app - [DEBUG] DEBUG - Request: GET /favicon.ico +2025-06-19 09:23:13 - [app] app - [INFO] INFO - Not Found (404): http://127.0.0.1:5000/favicon.ico +2025-06-19 09:23:13 - [app] app - [INFO] INFO - Locating template 'errors/404.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\\404.html') +2025-06-19 09:23:13 - [app] app - [DEBUG] DEBUG - Response: 404 +2025-06-19 09:23:16 - [app] app - [ERROR] ERROR - CSRF-Fehler für /tapo/control-form: The CSRF token is missing. +2025-06-19 09:23:16 - [app] app - [ERROR] ERROR - Request Headers: {'Host': '127.0.0.1:5000', 'Connection': 'keep-alive', 'Content-Length': '27', 'Cache-Control': 'max-age=0', 'Sec-Ch-Ua': '"Brave";v="137", "Chromium";v="137", "Not/A)Brand";v="24"', 'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Platform': '"Windows"', 'Origin': 'http://127.0.0.1:5000', 'Dnt': '1', 'Upgrade-Insecure-Requests': '1', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-Gpc': '1', 'Accept-Language': 'de-DE,de;q=0.8', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Referer': 'http://127.0.0.1:5000/tapo/', 'Accept-Encoding': 'gzip, deflate, br, zstd', 'Cookie': 'session=.eJwljjtqBTEMAO_iOoUsWZb9LrPoS0Iggd33qpC7ZyHlTDHMTzvqzOu9PZ7nK9_a8RHt0dgylyl18b6KoMdAL9i9ylbBVIzKCThgLuYhnYYNBRZ2iBUqPGzqQACjzICtLGGiRawbbYqB1y5hlJ19agTNCq2RbFTm7R55XXn-3_Qb_TrreH5_5tctZs-BgoO5lmfS1I7m6CSwwYmg8C7nbr9_OUQ_vQ.aFO64w._xt6gdUHZBC19nW59LeMDmT9ko8'} +2025-06-19 09:23:16 - [app] app - [ERROR] ERROR - Request Form: {'ip': '192.168.0.100', 'action': 'off'} +2025-06-19 09:23:16 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:23:16 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/control-form +2025-06-19 09:23:16 - [app] app - [WARNING] WARNING - Method Not Allowed (405): GET http://127.0.0.1:5000/tapo/control-form +2025-06-19 09:23:16 - [app] app - [DEBUG] DEBUG - Response: 405 +2025-06-19 09:23:18 - [app] app - [ERROR] ERROR - CSRF-Fehler für /tapo/test-connection-form: The CSRF token is missing. +2025-06-19 09:23:18 - [app] app - [ERROR] ERROR - Request Headers: {'Host': '127.0.0.1:5000', 'Connection': 'keep-alive', 'Content-Length': '16', 'Cache-Control': 'max-age=0', 'Sec-Ch-Ua': '"Brave";v="137", "Chromium";v="137", "Not/A)Brand";v="24"', 'Sec-Ch-Ua-Mobile': '?0', 'Sec-Ch-Ua-Platform': '"Windows"', 'Origin': 'http://127.0.0.1:5000', 'Dnt': '1', 'Upgrade-Insecure-Requests': '1', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-Gpc': '1', 'Accept-Language': 'de-DE,de;q=0.8', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Referer': 'http://127.0.0.1:5000/tapo/', 'Accept-Encoding': 'gzip, deflate, br, zstd', 'Cookie': 'session=.eJwljjtqBTEMAO_iOoUsWZb9LrPoS0Iggd33qpC7ZyHlTDHMTzvqzOu9PZ7nK9_a8RHt0dgylyl18b6KoMdAL9i9ylbBVIzKCThgLuYhnYYNBRZ2iBUqPGzqQACjzICtLGGiRawbbYqB1y5hlJ19agTNCq2RbFTm7R55XXn-3_Qb_TrreH5_5tctZs-BgoO5lmfS1I7m6CSwwYmg8C7nbr9_OUQ_vQ.aFO65Q.GJ3-tWym7vsIWlRQD9SDWrkgNno'} +2025-06-19 09:23:18 - [app] app - [ERROR] ERROR - Request Form: {'ip': '192.168.0.100'} +2025-06-19 09:23:18 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:23:18 - [app] app - [DEBUG] DEBUG - Request: GET /tapo/test-connection-form +2025-06-19 09:23:18 - [app] app - [WARNING] WARNING - Method Not Allowed (405): GET http://127.0.0.1:5000/tapo/test-connection-form +2025-06-19 09:23:18 - [app] app - [DEBUG] DEBUG - Response: 405 +2025-06-19 09:23:25 - [app] app - [DEBUG] DEBUG - Request: GET /printers +2025-06-19 09:23:25 - [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 09:23:25 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:23:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:23:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:23:56 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:23:56 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:23:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:24:43 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:24:43 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:24:43 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:56 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:24:56 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:24:56 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:25:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:25:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:25:26 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:25:56 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-19 09:25:56 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-19 09:25:56 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-19 09:25:58 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:25:59 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:25:59 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:25:59 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:25:59 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:26:00 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:26:00 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:26:00 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:26:00 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:26:00 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:26:13 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-19 09:26:13 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-19 09:26:13 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-19 09:26:14 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:26:16 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:26:16 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:26:18 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-19 09:26:18 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-19 09:26:18 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-19 09:26:20 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:26:22 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:26:22 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:26:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:26:26 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:26:51 - [app] app - [INFO] INFO - [SHUTDOWN] 🧹 Cleanup wird ausgeführt... +2025-06-19 09:26:51 - [app] app - [INFO] INFO - [SHUTDOWN] ✅ Queue Manager gestoppt +2025-06-19 09:26:51 - [app] app - [ERROR] ERROR - [SHUTDOWN] ❌ Cleanup-Fehler: 'BackgroundTaskScheduler' object has no attribute 'shutdown' +2025-06-19 09:26:53 - [app] app - [INFO] INFO - Optimierte SQLite-Engine erstellt: ./database/myp.db +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [CONFIG] Erkannte Umgebung: development +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [CONFIG] Production-Modus: False +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [CONFIG] Verwende Development-Konfiguration +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [DEVELOPMENT] Aktiviere Development-Konfiguration +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ MYP Development Environment Konfiguration aktiviert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Environment: Development/Testing +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ Debug Mode: True +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [DEVELOPMENT] ✅ SQL Echo: True +2025-06-19 09:26:58 - [app] app - [INFO] INFO - SQLite für Raspberry Pi optimiert (reduzierte Cache-Größe, SD-Karten I/O) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Admin-Berechtigungen beim Start korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] 🚀 Starte MYP DEVELOPMENT-Umgebung +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] 🏢 Mercedes-Benz TBA Marienfelde +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] 🔒 Air-Gapped: True +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere Datenbank... +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Datenbank mit Optimierungen initialisiert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Datenbank initialisiert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] Prüfe Initial-Admin... +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Admin-Benutzer admin (admin@mercedes-benz.com) existiert bereits. Passwort wurde zurückgesetzt. +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Admin-Benutzer geprüft +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] Initialisiere statische Drucker... +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 1 (192.168.0.100) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 2 (192.168.0.101) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 3 (192.168.0.102) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 4 (192.168.0.103) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 5 (192.168.0.104) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - Drucker aktualisiert: Drucker 6 (192.168.0.106) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - ✅ Statische Drucker-Initialisierung abgeschlossen: 0 erstellt, 6 aktualisiert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - 📍 Alle Drucker sind für Standort 'TBA Marienfelde' konfiguriert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - 🌐 IP-Bereich: 192.168.0.100-106 (außer .105) +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Statische Drucker konfiguriert +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] Starte Queue Manager... +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Queue Manager gestartet +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] Starte Job Scheduler... +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] ✅ Job Scheduler gestartet +2025-06-19 09:26:58 - [app] app - [INFO] INFO - [STARTUP] 🌐 Server startet auf http://0.0.0.0:5000 +2025-06-19 09:27:08 - [app] app - [ERROR] ERROR - Fehler beim Laden des Benutzers 1: (sqlite3.InterfaceError) bad parameter or other API misuse +[SQL: SELECT users.id AS users_id, users.email AS users_email, users.username AS users_username, users.password_hash AS users_password_hash, users.name AS users_name, users.role AS users_role, users.active AS users_active, users.created_at AS users_created_at, users.last_login AS users_last_login, users.updated_at AS users_updated_at, users.settings AS users_settings, users.last_activity AS users_last_activity, users.department AS users_department, users.position AS users_position, users.phone AS users_phone, users.bio AS users_bio, users.theme_preference AS users_theme_preference, users.language_preference AS users_language_preference, users.email_notifications AS users_email_notifications, users.browser_notifications AS users_browser_notifications, users.dashboard_layout AS users_dashboard_layout, users.compact_mode AS users_compact_mode, users.show_completed_jobs AS users_show_completed_jobs, users.auto_refresh_interval AS users_auto_refresh_interval, users.auto_logout_timeout AS users_auto_logout_timeout +FROM users +WHERE users.id = ? + LIMIT ? OFFSET ?] +[parameters: (1, 1, 0)] +(Background on this error at: https://sqlalche.me/e/20/rvf5) +2025-06-19 09:27:08 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:27: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 09:27:08 - [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 09:27: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 09:27:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:27:08 - [app] app - [DEBUG] DEBUG - Request: GET /dashboard +2025-06-19 09:27:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET /api/notifications +2025-06-19 09:28:08 - [app] app - [ERROR] ERROR - Fehler beim Laden des Benutzers 1: tuple index out of range +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:28:08 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET /auth/login +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET /api/printers +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 302 +2025-06-19 09:28:08 - [app] app - [INFO] INFO - ✅ API: 6 Drucker abgerufen (include_inactive=False) +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 200 +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Request: GET / +2025-06-19 09:28:08 - [app] app - [DEBUG] DEBUG - Response: 302 +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 diff --git a/backend/logs/auth/auth.log b/backend/logs/auth/auth.log index 8fcf8956a..5d9d55913 100644 --- a/backend/logs/auth/auth.log +++ b/backend/logs/auth/auth.log @@ -119,3 +119,5 @@ WHERE users.username = ? OR users.email = ? 2025-06-18 12:38:12 - [auth] auth - [INFO] INFO - Benutzer admin@mercedes-benz.com hat sich erfolgreich angemeldet 2025-06-18 12:48:58 - [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-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 diff --git a/backend/logs/core_system/core_system.log b/backend/logs/core_system/core_system.log index 07492f74a..6d170cc67 100644 --- a/backend/logs/core_system/core_system.log +++ b/backend/logs/core_system/core_system.log @@ -286,3 +286,15 @@ 2025-06-18 12:50:29 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) 2025-06-19 09:21:51 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert 2025-06-19 09:21:51 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-19 09:22:16 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-19 09:22:16 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-19 09:22:56 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-19 09:22:56 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-19 09:25:58 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-19 09:25:58 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-19 09:26:14 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +2025-06-19 09:26:14 - [core_system] core_system - [INFO] INFO - 📊 Massive Konsolidierung: 6 Dateien → 1 Datei (88% Reduktion) +2025-06-19 09:26:20 - [core_system] core_system - [INFO] INFO - ✅ Core System Management Module erfolgreich initialisiert +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) diff --git a/backend/logs/data_management/data_management.log b/backend/logs/data_management/data_management.log index e86725ce7..424cb716c 100644 --- a/backend/logs/data_management/data_management.log +++ b/backend/logs/data_management/data_management.log @@ -645,3 +645,15 @@ 2025-06-18 12:50:35 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-19 09:21:53 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert 2025-06-19 09:21:53 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:18 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-19 09:22:18 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:56 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-19 09:22:56 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:25:58 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-19 09:25:58 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:15 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +2025-06-19 09:26:15 - [data_management] data_management - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:20 - [data_management] data_management - [INFO] INFO - ✅ Data Management Module initialisiert +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) diff --git a/backend/logs/energy_monitoring/energy_monitoring.log b/backend/logs/energy_monitoring/energy_monitoring.log index 878b098c0..d78727739 100644 --- a/backend/logs/energy_monitoring/energy_monitoring.log +++ b/backend/logs/energy_monitoring/energy_monitoring.log @@ -566,3 +566,10 @@ 2025-06-18 12:50:30 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-18 12:50:34 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert 2025-06-18 12:50:35 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-19 09:22:07 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-19 09:22:22 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-19 09:22:58 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +2025-06-19 09:25:59 - [energy_monitoring] energy_monitoring - [INFO] INFO - ✅ Energiemonitoring-Blueprint initialisiert +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 diff --git a/backend/logs/hardware_integration/hardware_integration.log b/backend/logs/hardware_integration/hardware_integration.log index dc03f8415..4b8de1c91 100644 --- a/backend/logs/hardware_integration/hardware_integration.log +++ b/backend/logs/hardware_integration/hardware_integration.log @@ -2775,3 +2775,27 @@ 2025-06-19 09:21:53 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert 2025-06-19 09:21:53 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert 2025-06-19 09:21:53 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:22:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:22:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:22:17 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:22:17 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:22:56 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:22:56 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:22:56 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:22:56 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:25:58 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:25:58 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:25:58 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:25:58 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:26:15 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:26:15 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:26:15 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:26:15 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:26:20 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:26:20 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:26:20 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:26:20 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) +2025-06-19 09:26:54 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ PyP100 (TP-Link Tapo) verfügbar +2025-06-19 09:26:54 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Printer Monitor initialisiert +2025-06-19 09:26:54 - [hardware_integration] hardware_integration - [INFO] INFO - ✅ Hardware Integration Module initialisiert +2025-06-19 09:26:54 - [hardware_integration] hardware_integration - [INFO] INFO - 📊 Massive Konsolidierung: 2 Dateien → 1 Datei (50% Reduktion) diff --git a/backend/logs/job_queue_system/job_queue_system.log b/backend/logs/job_queue_system/job_queue_system.log index 0ede91e66..6dc432352 100644 --- a/backend/logs/job_queue_system/job_queue_system.log +++ b/backend/logs/job_queue_system/job_queue_system.log @@ -1260,3 +1260,29 @@ 2025-06-18 12:50:36 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) 2025-06-19 09:21:53 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert 2025-06-19 09:21:53 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:22:07 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:22:17 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:22:17 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:22:23 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:22:54 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-19 09:22:56 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:22:56 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:22:58 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:25:56 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-19 09:25:58 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:25:58 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:26:00 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:26:13 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-19 09:26:15 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:26:15 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:26:16 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:26:18 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-19 09:26:20 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:26:20 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +2025-06-19 09:26:22 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestartet (Legacy-Kompatibilität) +2025-06-19 09:26:51 - [job_queue_system] job_queue_system - [INFO] INFO - Queue Manager gestoppt (Legacy-Kompatibilität) +2025-06-19 09:26:54 - [job_queue_system] job_queue_system - [INFO] INFO - ✅ Job & Queue System Module initialisiert +2025-06-19 09:26:54 - [job_queue_system] job_queue_system - [INFO] INFO - 📊 MASSIVE Konsolidierung: 4 Dateien → 1 Datei (75% Reduktion) +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) diff --git a/backend/logs/monitoring_analytics/monitoring_analytics.log b/backend/logs/monitoring_analytics/monitoring_analytics.log index c031c2993..8c543b49c 100644 --- a/backend/logs/monitoring_analytics/monitoring_analytics.log +++ b/backend/logs/monitoring_analytics/monitoring_analytics.log @@ -641,3 +641,17 @@ 2025-06-18 12:50:34 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) 2025-06-18 12:50:35 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert 2025-06-18 12:50:35 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:06 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-19 09:22:06 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:22 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-19 09:22:22 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-19 09:22:58 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:25:59 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-19 09:25:59 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:16 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +2025-06-19 09:26:16 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - 📊 MASSIVE Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:22 - [monitoring_analytics] monitoring_analytics - [INFO] INFO - ✅ Monitoring & Analytics Module initialisiert +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) diff --git a/backend/logs/permissions/permissions.log b/backend/logs/permissions/permissions.log index 573889756..8f8b24abc 100644 --- a/backend/logs/permissions/permissions.log +++ b/backend/logs/permissions/permissions.log @@ -321,3 +321,10 @@ WHERE users.role = ?] (Background on this error at: https://sqlalche.me/e/20/e3q8) 2025-06-18 12:50:34 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert 2025-06-18 12:50:35 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:07 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:23 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:22:58 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert +2025-06-19 09:25:59 - [permissions] permissions - [INFO] INFO - Admin-Berechtigungen korrigiert: 0 erstellt, 0 aktualisiert +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 diff --git a/backend/logs/printers/printers.log b/backend/logs/printers/printers.log index 832920703..553e61024 100644 --- a/backend/logs/printers/printers.log +++ b/backend/logs/printers/printers.log @@ -352,3 +352,6 @@ 2025-06-17 14:03:02 - [printers] printers - [INFO] INFO - 🔗 Drucker-Verbindung für Drucker 2 von Benutzer Administrator 2025-06-17 14:03:02 - [printers] printers - [ERROR] ERROR - ❌ Fehler bei Drucker-Verbindung: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0) 2025-06-17 14:03:02 - [printers] printers - [INFO] INFO - [OK] API-Drucker-Verbindung 'connect_printer' erfolgreich in 0.67ms +2025-06-19 09:22:50 - [printers] printers - [INFO] INFO - 🔗 Drucker-Verbindung für Drucker 1 von Benutzer Administrator +2025-06-19 09:22:50 - [printers] printers - [ERROR] ERROR - ❌ Fehler bei Drucker-Verbindung: 400 Bad Request: Failed to decode JSON object: Expecting value: line 1 column 1 (char 0) +2025-06-19 09:22:50 - [printers] printers - [INFO] INFO - [OK] API-Drucker-Verbindung 'connect_printer' erfolgreich in 0.59ms diff --git a/backend/logs/scheduler/scheduler.log b/backend/logs/scheduler/scheduler.log index f44a59d1e..80072ad9c 100644 --- a/backend/logs/scheduler/scheduler.log +++ b/backend/logs/scheduler/scheduler.log @@ -2165,3 +2165,23 @@ 2025-06-18 12:50:36 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet 2025-06-18 12:50:36 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet 2025-06-19 09:21:53 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:22:07 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:22:07 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-19 09:22:17 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:22:23 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:22:23 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-19 09:22:56 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:22:58 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:22:58 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-19 09:25:58 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:26:00 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:26:00 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-19 09:26:15 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:26:16 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:26:16 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +2025-06-19 09:26:20 - [scheduler] scheduler - [INFO] INFO - Task check_jobs registriert: Intervall 30s, Enabled: True +2025-06-19 09:26:22 - [scheduler] scheduler - [INFO] INFO - Scheduler-Thread gestartet +2025-06-19 09:26:22 - [scheduler] scheduler - [INFO] INFO - Scheduler gestartet +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 diff --git a/backend/logs/security_suite/security_suite.log b/backend/logs/security_suite/security_suite.log index 972f8f64c..1b4bc6f8c 100644 --- a/backend/logs/security_suite/security_suite.log +++ b/backend/logs/security_suite/security_suite.log @@ -965,3 +965,22 @@ 2025-06-18 12:50:35 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert 2025-06-19 09:21:53 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert 2025-06-19 09:21:53 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:07 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-19 09:22:18 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-19 09:22:18 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:22 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-19 09:22:56 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-19 09:22:56 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:22:58 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-19 09:25:58 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-19 09:25:58 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:25:59 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-19 09:26:15 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-19 09:26:15 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:16 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +2025-06-19 09:26:20 - [security_suite] security_suite - [INFO] INFO - ✅ Security Suite Module initialisiert +2025-06-19 09:26:20 - [security_suite] security_suite - [INFO] INFO - 📊 Massive Konsolidierung: 3 Dateien → 1 Datei (67% Reduktion) +2025-06-19 09:26:22 - [security_suite] security_suite - [INFO] INFO - 🔒 Security Suite initialisiert +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 diff --git a/backend/logs/startup/startup.log b/backend/logs/startup/startup.log index f540c5c3b..2718eec33 100644 --- a/backend/logs/startup/startup.log +++ b/backend/logs/startup/startup.log @@ -2541,3 +2541,66 @@ 2025-06-18 12:50:35 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: /mnt/c/Users/TTOMCZA.EMEA/Dev/Projektarbeit-MYP/backend 2025-06-18 12:50:35 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-18T12:50:35.728744 2025-06-18 12:50:35 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:22:06 - [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 09:22:06 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:22:06.796055 +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:22:06 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:22:22 - [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 09:22:22 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:22:22.694347 +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:22:22 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:22: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 09:22:58 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:22:58.484906 +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:22:58 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:25:59 - [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 09:25:59 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:25:59.778686 +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:25:59 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:26:16 - [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 09:26:16 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:26:16.482170 +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:26:16 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:26:22 - [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 09:26:22 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:26:22.142846 +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - 🪟 Windows-Modus: Aktiviert +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - 🔒 Windows-sichere Log-Rotation: Aktiviert +2025-06-19 09:26:22 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - ================================================== +2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - [START] MYP Platform Backend wird gestartet... +2025-06-19 09:26: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 09:26:58 - [startup] startup - [INFO] INFO - 💻 Betriebssystem: nt (win32) +2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - 📁 Arbeitsverzeichnis: C:\Users\TTOMCZA.EMEA\Dev\Projektarbeit-MYP\backend +2025-06-19 09:26:58 - [startup] startup - [INFO] INFO - ⏰ Startzeit: 2025-06-19T09:26:58.308470 +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 - ================================================== diff --git a/backend/logs/tapo_control/tapo_control.log b/backend/logs/tapo_control/tapo_control.log index 2439f4437..3ede91ea1 100644 --- a/backend/logs/tapo_control/tapo_control.log +++ b/backend/logs/tapo_control/tapo_control.log @@ -204,3 +204,11 @@ 2025-06-16 01:08:13 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 5 (192.168.0.104) nicht erreichbar 2025-06-16 01:08:15 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 6 (192.168.0.106) nicht erreichbar 2025-06-16 01:08:15 - [tapo_control] tapo_control - [INFO] INFO - Dashboard geladen: 6 Steckdosen konfiguriert, 0 online +2025-06-19 09:23:04 - [tapo_control] tapo_control - [INFO] INFO - Tapo Dashboard aufgerufen von Benutzer: Administrator +2025-06-19 09:23:05 - [tapo_control] tapo_control - [INFO] INFO - ✅ Steckdose 1 (192.168.0.100) erreichbar - Status: off +2025-06-19 09:23:05 - [tapo_control] tapo_control - [INFO] INFO - ✅ Steckdose 2 (192.168.0.101) erreichbar - Status: off +2025-06-19 09:23:05 - [tapo_control] tapo_control - [INFO] INFO - ✅ Steckdose 3 (192.168.0.102) erreichbar - Status: off +2025-06-19 09:23:05 - [tapo_control] tapo_control - [INFO] INFO - ✅ Steckdose 4 (192.168.0.103) erreichbar - Status: off +2025-06-19 09:23:08 - [tapo_control] tapo_control - [WARNING] WARNING - ⚠️ Steckdose 5 (192.168.0.104) nicht erreichbar +2025-06-19 09:23:08 - [tapo_control] tapo_control - [INFO] INFO - ✅ Steckdose 6 (192.168.0.106) erreichbar - Status: off +2025-06-19 09:23:08 - [tapo_control] tapo_control - [INFO] INFO - Dashboard geladen: 6 Steckdosen konfiguriert, 5 online diff --git a/backend/logs/tapo_controller/tapo_controller.log b/backend/logs/tapo_controller/tapo_controller.log index 6e7746132..cb9655d1c 100644 --- a/backend/logs/tapo_controller/tapo_controller.log +++ b/backend/logs/tapo_controller/tapo_controller.log @@ -2963,3 +2963,16 @@ 2025-06-18 12:50:33 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-18 12:50:34 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert 2025-06-19 09:21:53 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-19 09:22:17 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-19 09:22:56 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-19 09:23:05 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ Tapo-Steckdose 192.168.0.100: Status = off +2025-06-19 09:23:05 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ Tapo-Steckdose 192.168.0.101: Status = off +2025-06-19 09:23:05 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ Tapo-Steckdose 192.168.0.102: Status = off +2025-06-19 09:23:05 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ Tapo-Steckdose 192.168.0.103: Status = off +2025-06-19 09:23:08 - [tapo_controller] tapo_controller - [WARNING] WARNING - ⚠️ Fehler bei Tapo-Steckdosen-Status-Check 192.168.0.104: HTTPConnectionPool(host='192.168.0.104', port=80): Max retries exceeded with url: /app (Caused by ConnectTimeoutError(, 'Connection to 192.168.0.104 timed out. (connect timeout=2)')) +2025-06-19 09:23:08 - [tapo_controller] tapo_controller - [ERROR] ERROR - ❌ Status-Check für 192.168.0.104 fehlgeschlagen: HTTPConnectionPool(host='192.168.0.104', port=80): Max retries exceeded with url: /app (Caused by ConnectTimeoutError(, 'Connection to 192.168.0.104 timed out. (connect timeout=2)')) +2025-06-19 09:23:08 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ Tapo-Steckdose 192.168.0.106: Status = off +2025-06-19 09:25:58 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +2025-06-19 09:26:15 - [tapo_controller] tapo_controller - [INFO] INFO - ✅ tapo controller initialisiert +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 diff --git a/backend/logs/tapo_status_manager/tapo_status_manager.log b/backend/logs/tapo_status_manager/tapo_status_manager.log index 326e33dff..dbc7cc8ba 100644 --- a/backend/logs/tapo_status_manager/tapo_status_manager.log +++ b/backend/logs/tapo_status_manager/tapo_status_manager.log @@ -289,3 +289,9 @@ 2025-06-18 12:50:33 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert 2025-06-18 12:50:34 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert 2025-06-19 09:21:53 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:22:17 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:22:56 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:25:58 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:26:15 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:26:20 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert +2025-06-19 09:26:54 - [tapo_status_manager] tapo_status_manager - [INFO] INFO - TapoStatusManager mit Session-Caching initialisiert diff --git a/backend/logs/utilities_collection/utilities_collection.log b/backend/logs/utilities_collection/utilities_collection.log index 53e7760b5..05fa3b045 100644 --- a/backend/logs/utilities_collection/utilities_collection.log +++ b/backend/logs/utilities_collection/utilities_collection.log @@ -819,3 +819,15 @@ 2025-06-18 12:50:34 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) 2025-06-19 09:21:52 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert 2025-06-19 09:21:52 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:22:16 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:22:16 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:22:56 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:22:56 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:25:58 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:25:58 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:26:14 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:26:14 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:26:20 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:26:20 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) +2025-06-19 09:26:53 - [utilities_collection] utilities_collection - [INFO] INFO - ✅ Utilities Collection initialisiert +2025-06-19 09:26:53 - [utilities_collection] utilities_collection - [INFO] INFO - 🚨 ALLERLETZTE MEGA-Konsolidierung: 12+ Dateien → 1 Datei (90%+ Reduktion) diff --git a/backend/logs/windows_fixes/windows_fixes.log b/backend/logs/windows_fixes/windows_fixes.log index a2520ccce..2e825667d 100644 --- a/backend/logs/windows_fixes/windows_fixes.log +++ b/backend/logs/windows_fixes/windows_fixes.log @@ -289,3 +289,15 @@ 2025-06-18 12:50:29 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet 2025-06-19 09:21:51 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... 2025-06-19 09:21:51 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-19 09:22:16 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-19 09:22:16 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-19 09:22:56 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-19 09:22:56 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-19 09:25:58 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-19 09:25:58 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-19 09:26:14 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +2025-06-19 09:26:14 - [windows_fixes] windows_fixes - [INFO] INFO - ✅ Alle Windows-Fixes erfolgreich angewendet +2025-06-19 09:26:20 - [windows_fixes] windows_fixes - [INFO] INFO - 🔧 Wende Windows-spezifische Fixes an... +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 diff --git a/backend/utils/hardware_integration.py b/backend/utils/hardware_integration.py index 6d705627e..f4ff92227 100644 --- a/backend/utils/hardware_integration.py +++ b/backend/utils/hardware_integration.py @@ -998,12 +998,36 @@ class TapoController: # ===== PRINTER MONITOR ===== class PrinterMonitor: - """3D-Drucker Monitor""" + """3D-Drucker Monitor mit Status-Management und Session-Caching""" + + # Status-Konstanten + STATUS_ON = "on" + STATUS_OFF = "off" + STATUS_UNREACHABLE = "unreachable" + + # Status-Mapping für UI + STATUS_DISPLAY = { + STATUS_ON: {"text": "An", "color": "green", "icon": "power"}, + STATUS_OFF: {"text": "Aus", "color": "gray", "icon": "power-off"}, + STATUS_UNREACHABLE: {"text": "Nicht erreichbar", "color": "red", "icon": "exclamation-triangle"} + } def __init__(self): self.cache = {} self._cache_timeout = 300 # 5 Minuten Cache - hardware_logger.info("✅ Printer Monitor initialisiert") + self._cache_lock = threading.RLock() + self._last_check = {} + self.check_interval = 30 # Sekunden zwischen Status-Checks + + # Session-spezifischer Status-Cache für Benutzer-Sessions + self._session_cache = {} + self._session_cache_lock = threading.RLock() + self._session_cache_ttl = 300 # 5 Minuten für Session-Cache + + # Thread-Pool für asynchrone Operationen + self._executor = ThreadPoolExecutor(max_workers=6) + + hardware_logger.info("✅ Printer Monitor mit Session-Caching initialisiert") def get_live_printer_status(self, use_session_cache: bool = True) -> Dict[int, Dict]: """ @@ -1148,8 +1172,343 @@ class PrinterMonitor: def clear_all_caches(self): """Leert alle Caches des Printer Monitors.""" - self.cache.clear() - hardware_logger.debug("Printer Monitor Cache geleert") + with self._cache_lock: + self.cache.clear() + self._last_check.clear() + with self._session_cache_lock: + self._session_cache.clear() + hardware_logger.debug("Alle Printer Monitor Caches geleert") + + def control_plug(self, printer_id: int, action: str) -> Tuple[bool, str]: + """ + Steuert eine Tapo-Steckdose über den TapoController + + Args: + printer_id: ID des Druckers + action: "on" oder "off" + + Returns: + Tuple (Erfolg, Nachricht) + """ + try: + db_session = get_db_session() + printer = db_session.query(Printer).filter(Printer.id == printer_id).first() + + if not printer: + return False, "Drucker nicht gefunden" + + if not printer.plug_ip: + return False, "Keine Steckdose konfiguriert" + + # Tapo-Controller verwenden + tapo_ctrl = get_tapo_controller() + + if not tapo_ctrl: + return False, "Tapo-Controller nicht verfügbar" + + # Aktion ausführen + success = False + if action == "on": + success = tapo_ctrl.toggle_plug(printer.plug_ip, True) + elif action == "off": + success = tapo_ctrl.turn_off(printer.plug_ip, printer_id=printer_id) + else: + return False, f"Ungültige Aktion: {action}" + + if success: + # Cache invalidieren + with self._cache_lock: + if printer_id in self.cache: + del self.cache[printer_id] + if printer_id in self._last_check: + del self._last_check[printer_id] + + db_session.close() + return True, f"Steckdose erfolgreich {action}" + else: + db_session.close() + return False, "Steckdose konnte nicht gesteuert werden" + + except Exception as e: + hardware_logger.error(f"Fehler beim Steuern der Steckdose für Drucker {printer_id}: {str(e)}") + return False, str(e) + + def check_and_control_for_jobs(self): + """ + Prüft alle Jobs und steuert Steckdosen entsprechend + + Diese Methode sollte regelmäßig vom Scheduler aufgerufen werden + """ + try: + db_session = get_db_session() + now = datetime.now() + + # Jobs die starten sollten + jobs_to_start = db_session.query(Job).filter( + Job.status == "scheduled", + Job.start_at <= now + ).all() + + for job in jobs_to_start: + hardware_logger.info(f"Starte Job {job.id} für Drucker {job.printer_id}") + success, msg = self.control_plug(job.printer_id, "on") + if success: + job.status = "running" + hardware_logger.info(f"Steckdose für Job {job.id} eingeschaltet") + else: + hardware_logger.error(f"Fehler beim Einschalten für Job {job.id}: {msg}") + + # Jobs die enden sollten + jobs_to_end = db_session.query(Job).filter( + Job.status == "running", + Job.end_at <= now + ).all() + + for job in jobs_to_end: + hardware_logger.info(f"Beende Job {job.id} für Drucker {job.printer_id}") + success, msg = self.control_plug(job.printer_id, "off") + if success: + job.status = "finished" + job.actual_end_time = now + hardware_logger.info(f"Steckdose für Job {job.id} ausgeschaltet") + else: + hardware_logger.error(f"Fehler beim Ausschalten für Job {job.id}: {msg}") + + db_session.commit() + db_session.close() + + except Exception as e: + hardware_logger.error(f"Fehler bei der automatischen Job-Steuerung: {str(e)}") + + def get_session_status(self, session_id: str, printer_ids: List[int] = None) -> Dict[str, Any]: + """ + Holt den gecachten Status für eine Session + + Args: + session_id: Session-ID + printer_ids: Optional - spezifische Drucker-IDs + + Returns: + Dict mit Session-spezifischen Status-Daten + """ + try: + with self._session_cache_lock: + session_data = self._session_cache.get(session_id, {}) + + # Prüfe Cache-Gültigkeit + cache_time = session_data.get('timestamp', datetime.min) + if (datetime.now() - cache_time).total_seconds() > self._session_cache_ttl: + # Cache abgelaufen + self._session_cache.pop(session_id, None) + return self._create_fresh_session_status(session_id, printer_ids) + + # Wenn spezifische Drucker angefragt, filtere diese + if printer_ids: + filtered_status = {} + for printer_id in printer_ids: + if str(printer_id) in session_data.get('printers', {}): + filtered_status[str(printer_id)] = session_data['printers'][str(printer_id)] + + return { + 'timestamp': session_data['timestamp'], + 'session_id': session_id, + 'printers': filtered_status, + 'from_cache': True + } + + return session_data + + except Exception as e: + hardware_logger.error(f"Fehler beim Abrufen des Session-Status: {str(e)}") + return self._create_fresh_session_status(session_id, printer_ids) + + def update_session_status(self, session_id: str, printer_id: int = None) -> bool: + """ + Aktualisiert den Session-Status-Cache + + Args: + session_id: Session-ID + printer_id: Optional - spezifischer Drucker + + Returns: + bool: True wenn erfolgreich + """ + try: + with self._session_cache_lock: + if printer_id: + # Einzelnen Drucker aktualisieren + printer_status = self.get_live_printer_status(use_session_cache=False) + + if session_id not in self._session_cache: + self._session_cache[session_id] = { + 'timestamp': datetime.now(), + 'session_id': session_id, + 'printers': {} + } + + self._session_cache[session_id]['printers'][str(printer_id)] = printer_status.get(printer_id, {}) + self._session_cache[session_id]['timestamp'] = datetime.now() + else: + # Alle Drucker aktualisieren + self._session_cache[session_id] = self._create_fresh_session_status(session_id) + + hardware_logger.debug(f"Session-Status für {session_id} aktualisiert") + return True + + except Exception as e: + hardware_logger.error(f"Fehler beim Aktualisieren des Session-Status: {str(e)}") + return False + + def clear_session_cache(self, session_id: str = None) -> bool: + """ + Löscht Session-Cache + + Args: + session_id: Optional - spezifische Session, sonst alle + + Returns: + bool: True wenn erfolgreich + """ + try: + with self._session_cache_lock: + if session_id: + self._session_cache.pop(session_id, None) + hardware_logger.debug(f"Session-Cache für {session_id} gelöscht") + else: + self._session_cache.clear() + hardware_logger.debug("Kompletter Session-Cache gelöscht") + + return True + + except Exception as e: + hardware_logger.error(f"Fehler beim Löschen des Session-Cache: {str(e)}") + return False + + def _create_fresh_session_status(self, session_id: str, printer_ids: List[int] = None) -> Dict[str, Any]: + """ + Erstellt frischen Session-Status + + Args: + session_id: Session-ID + printer_ids: Optional - spezifische Drucker-IDs + + Returns: + Dict mit frischen Status-Daten + """ + try: + db_session = get_db_session() + + # Alle oder spezifische Drucker laden + if printer_ids: + printers = db_session.query(Printer).filter(Printer.id.in_(printer_ids)).all() + else: + printers = db_session.query(Printer).all() + + session_data = { + 'timestamp': datetime.now(), + 'session_id': session_id, + 'printers': {}, + 'from_cache': False + } + + # Status für jeden Drucker abrufen + status_dict = self.get_live_printer_status(use_session_cache=False) + for printer in printers: + session_data['printers'][str(printer.id)] = status_dict.get(printer.id, {}) + + # In Session-Cache speichern + with self._session_cache_lock: + self._session_cache[session_id] = session_data + + db_session.close() + return session_data + + except Exception as e: + hardware_logger.error(f"Fehler beim Erstellen frischen Session-Status: {str(e)}") + return { + 'timestamp': datetime.now(), + 'session_id': session_id, + 'printers': {}, + 'error': str(e), + 'from_cache': False + } + + def invalidate_cache(self, printer_id: int = None) -> bool: + """ + Invalidiert Cache für spezifischen Drucker oder alle + + Args: + printer_id: Optional - spezifischer Drucker, None = alle Drucker + + Returns: + bool: True wenn erfolgreich + """ + try: + with self._cache_lock: + if printer_id is not None: + # Spezifischen Drucker-Cache löschen + self.cache.pop(printer_id, None) + self._last_check.pop(printer_id, None) + hardware_logger.debug(f"Cache für Drucker {printer_id} invalidiert") + else: + # Alle Caches löschen + self.cache.clear() + self._last_check.clear() + hardware_logger.info("Kompletter Status-Cache invalidiert") + + return True + + except Exception as e: + hardware_logger.error(f"Fehler beim Invalidieren des Cache: {str(e)}") + return False + + def force_network_refresh(self) -> Dict[str, Any]: + """ + Forciert komplette Netzwerk-Neuprüfung aller Drucker + Invalidiert alle Caches und führt echte Netzwerk-Tests durch + + Returns: + Dict mit Refresh-Ergebnissen + """ + try: + hardware_logger.info("Starte Force-Network-Refresh für alle Drucker") + + # Alle Caches invalidieren + self.invalidate_cache() + self.clear_session_cache() + + # Tapo-Controller Cache leeren + try: + tapo_ctrl = get_tapo_controller() + if tapo_ctrl and hasattr(tapo_ctrl, 'clear_cache'): + tapo_ctrl.clear_cache() + hardware_logger.debug("Tapo-Controller Cache geleert") + except Exception as e: + hardware_logger.warning(f"Tapo-Controller Cache konnte nicht geleert werden: {str(e)}") + + # Frischen Status für alle Drucker abrufen + fresh_status = self.get_live_printer_status(use_session_cache=False) + + # Ergebnisse zusammenfassen + results = { + "success": True, + "timestamp": datetime.now().isoformat(), + "printers_refreshed": len(fresh_status), + "printers": fresh_status, + "message": f"Netzwerk-Status für {len(fresh_status)} Drucker erfolgreich aktualisiert" + } + + hardware_logger.info(f"Force-Network-Refresh abgeschlossen: {len(fresh_status)} Drucker aktualisiert") + return results + + except Exception as e: + hardware_logger.error(f"Fehler beim Force-Network-Refresh: {str(e)}") + return { + "success": False, + "error": str(e), + "timestamp": datetime.now().isoformat(), + "message": "Fehler beim Aktualisieren der Netzwerk-Status" + } # ===== GLOBALE INSTANZEN ===== diff --git a/backend/utils/tapo_status_manager.py b/backend/utils/tapo_status_manager.py deleted file mode 100644 index d808869f8..000000000 --- a/backend/utils/tapo_status_manager.py +++ /dev/null @@ -1,817 +0,0 @@ -""" -Tapo Status Manager - Verwaltung der 3 Steckdosen-Status - -Dieser Manager stellt sicher, dass: -1. Alle 6 Drucker/Steckdosen immer angezeigt werden -2. Die 3 Status korrekt verwaltet werden: an, aus, nicht erreichbar -3. Der Status persistent gespeichert wird -4. Die automatische Steuerung basierend auf Jobs funktioniert -""" - -from typing import Dict, Tuple, Optional, List -from datetime import datetime, timedelta -import asyncio -from concurrent.futures import ThreadPoolExecutor -import threading - -from models import Printer, Job, PlugStatusLog, get_db_session -from utils.logging_config import get_logger - -logger = get_logger("tapo_status_manager") - - -class TapoStatusManager: - """ - Zentraler Manager für Tapo-Steckdosen-Status - """ - - # Die 3 möglichen Status-Zustände - STATUS_ON = "on" - STATUS_OFF = "off" - STATUS_UNREACHABLE = "unreachable" - - # Status-Mapping für UI - STATUS_DISPLAY = { - STATUS_ON: {"text": "An", "color": "green", "icon": "power"}, - STATUS_OFF: {"text": "Aus", "color": "gray", "icon": "power-off"}, - STATUS_UNREACHABLE: {"text": "Nicht erreichbar", "color": "red", "icon": "exclamation-triangle"} - } - - def __init__(self): - """Initialisiert den Status-Manager""" - self._status_cache = {} - self._cache_lock = threading.RLock() - self._last_check = {} - self.check_interval = 30 # Sekunden zwischen Status-Checks - - # Session-spezifischer Status-Cache für Benutzer-Sessions - self._session_cache = {} - self._session_cache_lock = threading.RLock() - self._session_cache_ttl = 300 # 5 Minuten für Session-Cache - - # Thread-Pool für asynchrone Operationen - self._executor = ThreadPoolExecutor(max_workers=6) - - logger.info("TapoStatusManager mit Session-Caching initialisiert") - - def get_printer_status(self, printer_id: int, force_refresh: bool = False) -> Dict[str, any]: - """ - Gibt den aktuellen Status eines Druckers zurück - - Args: - printer_id: ID des Druckers - force_refresh: True = Cache umgehen und echten Netzwerk-Test durchführen - - Returns: - Dict mit Status-Informationen - """ - if not force_refresh: - with self._cache_lock: - # Aus Cache holen wenn vorhanden und aktuell - if printer_id in self._status_cache: - cache_data = self._status_cache[printer_id] - if self._is_cache_valid(printer_id): - return cache_data - - # Neuen Status abrufen (mit Cache-Invalidierung bei force_refresh) - if force_refresh: - self.invalidate_cache(printer_id) - return self._fetch_printer_status(printer_id) - - def get_all_printer_status(self, force_refresh: bool = False) -> List[Dict[str, any]]: - """ - Gibt den Status aller Drucker zurück - - Args: - force_refresh: True = Cache für alle Drucker umgehen - - Returns: - Liste mit Status-Informationen aller Drucker - """ - try: - db_session = get_db_session() - printers = db_session.query(Printer).all() - - status_list = [] - - # Status für jeden Drucker abrufen - for printer in printers: - status = self.get_printer_status(printer.id, force_refresh=force_refresh) - status_list.append(status) - - db_session.close() - - return status_list - - except Exception as e: - logger.error(f"Fehler beim Abrufen aller Drucker-Status: {str(e)}") - return [] - - def _fetch_printer_status(self, printer_id: int) -> Dict[str, any]: - """ - Holt den aktuellen Status eines Druckers - - Args: - printer_id: ID des Druckers - - Returns: - Dict mit Status-Informationen - """ - try: - db_session = get_db_session() - printer = db_session.query(Printer).filter(Printer.id == printer_id).first() - - if not printer: - logger.warning(f"Drucker {printer_id} nicht gefunden") - return self._create_error_status(printer_id, "Drucker nicht gefunden") - - # Basis-Status erstellen - status_info = { - "id": printer.id, - "name": printer.name, - "model": printer.model, - "location": printer.location, - "ip_address": printer.ip_address, - "has_plug": bool(printer.plug_ip), - "plug_ip": printer.plug_ip, - "active": printer.active, - "last_checked": datetime.now() - } - - # Wenn keine Steckdose konfiguriert - if not printer.plug_ip: - status_info.update({ - "plug_status": "no_plug", - "plug_reachable": False, - "power_status": None, - "can_control": False - }) - else: - # Tapo-Status abrufen - plug_status = self._check_tapo_status(printer) - status_info.update(plug_status) - - # Aktuelle Jobs prüfen - active_job = self._get_active_job(printer_id, db_session) - if active_job: - status_info["current_job"] = { - "id": active_job.id, - "name": active_job.name, - "user": active_job.user.name, - "start_at": active_job.start_at.isoformat(), - "end_at": active_job.end_at.isoformat(), - "status": active_job.status - } - else: - status_info["current_job"] = None - - # Nächster geplanter Job - next_job = self._get_next_job(printer_id, db_session) - if next_job: - status_info["next_job"] = { - "id": next_job.id, - "name": next_job.name, - "user": next_job.user.name, - "start_at": next_job.start_at.isoformat(), - "starts_in_minutes": int((next_job.start_at - datetime.now()).total_seconds() / 60) - } - else: - status_info["next_job"] = None - - # Status in Cache speichern - with self._cache_lock: - self._status_cache[printer_id] = status_info - self._last_check[printer_id] = datetime.now() - - # Status in Datenbank loggen - self._log_status(printer, status_info.get("plug_status", "unknown")) - - db_session.close() - - return status_info - - except Exception as e: - logger.error(f"Fehler beim Abrufen des Status für Drucker {printer_id}: {str(e)}") - return self._create_error_status(printer_id, str(e)) - - def _check_tapo_status(self, printer: Printer) -> Dict[str, any]: - """ - Prüft den Tapo-Steckdosen-Status mit erweiterten Fallback-Mechanismen - - Args: - printer: Printer-Objekt - - Returns: - Dict mit Tapo-Status - """ - try: - # Tapo-Controller importieren - from utils.hardware_integration import tapo_controller - - if not tapo_controller: - logger.warning(f"Tapo-Controller nicht verfügbar für {printer.name}") - return { - "plug_status": self.STATUS_UNREACHABLE, - "plug_reachable": False, - "power_status": None, - "can_control": False, - "error": "Tapo-Controller nicht verfügbar" - } - - # Status abrufen mit Debug-Informationen - logger.debug(f"Prüfe Tapo-Status für {printer.name} ({printer.plug_ip})") - reachable, plug_status = tapo_controller.check_outlet_status( - printer.plug_ip, - printer_id=printer.id, - debug=False # Weniger Debug-Output für bessere Performance - ) - - if reachable: - # Erfolgreiche Verbindung - logger.debug(f"✅ Tapo-Steckdose {printer.plug_ip} erreichbar - Status: {plug_status}") - - # Status normalisieren - if plug_status in ["on", "true", "1", True]: - normalized_status = self.STATUS_ON - power_status = "on" - elif plug_status in ["off", "false", "0", False]: - normalized_status = self.STATUS_OFF - power_status = "off" - else: - # Unbekannter Status, aber erreichbar - normalized_status = self.STATUS_UNREACHABLE - power_status = "unknown" - logger.warning(f"Unbekannter Tapo-Status '{plug_status}' für {printer.name}") - - return { - "plug_status": normalized_status, - "plug_reachable": True, - "power_status": power_status, - "can_control": True, - "last_check": datetime.now().isoformat() - } - else: - # Steckdose nicht erreichbar - logger.warning(f"⚠️ Tapo-Steckdose {printer.plug_ip} nicht erreichbar für {printer.name}") - return { - "plug_status": self.STATUS_UNREACHABLE, - "plug_reachable": False, - "power_status": None, - "can_control": False, - "error": "Steckdose nicht erreichbar", - "last_check": datetime.now().isoformat() - } - - except ImportError as e: - logger.error(f"Import-Fehler beim Tapo-Controller für {printer.name}: {str(e)}") - return { - "plug_status": self.STATUS_UNREACHABLE, - "plug_reachable": False, - "power_status": None, - "can_control": False, - "error": f"Import-Fehler: {str(e)}", - "fallback_used": True - } - except Exception as e: - logger.error(f"Unerwarteter Fehler beim Prüfen des Tapo-Status für {printer.name}: {str(e)}") - return { - "plug_status": self.STATUS_UNREACHABLE, - "plug_reachable": False, - "power_status": None, - "can_control": False, - "error": str(e), - "last_check": datetime.now().isoformat() - } - - def control_plug(self, printer_id: int, action: str) -> Tuple[bool, str]: - """ - Steuert eine Tapo-Steckdose - - Args: - printer_id: ID des Druckers - action: "on" oder "off" - - Returns: - Tuple (Erfolg, Nachricht) - """ - try: - db_session = get_db_session() - printer = db_session.query(Printer).filter(Printer.id == printer_id).first() - - if not printer: - return False, "Drucker nicht gefunden" - - if not printer.plug_ip: - return False, "Keine Steckdose konfiguriert" - - # Tapo-Controller verwenden - from utils.hardware_integration import tapo_controller - - if not tapo_controller: - return False, "Tapo-Controller nicht verfügbar" - - # Aktion ausführen - success = False - if action == "on": - success = tapo_controller.turn_on_outlet(printer.plug_ip, printer_id) - elif action == "off": - success = tapo_controller.turn_off_outlet(printer.plug_ip, printer_id) - else: - return False, f"Ungültige Aktion: {action}" - - if success: - # Cache invalidieren - with self._cache_lock: - if printer_id in self._status_cache: - del self._status_cache[printer_id] - - # Status loggen - self._log_status(printer, action, source="manual") - - db_session.close() - return True, f"Steckdose erfolgreich {action}" - else: - db_session.close() - return False, "Steckdose konnte nicht gesteuert werden" - - except Exception as e: - logger.error(f"Fehler beim Steuern der Steckdose für Drucker {printer_id}: {str(e)}") - return False, str(e) - - def check_and_control_for_jobs(self): - """ - Prüft alle Jobs und steuert Steckdosen entsprechend - - Diese Methode sollte regelmäßig vom Scheduler aufgerufen werden - """ - try: - db_session = get_db_session() - now = datetime.now() - - # Jobs die starten sollten - jobs_to_start = db_session.query(Job).filter( - Job.status == "scheduled", - Job.start_at <= now - ).all() - - for job in jobs_to_start: - logger.info(f"Starte Job {job.id} für Drucker {job.printer_id}") - success, msg = self.control_plug(job.printer_id, "on") - if success: - job.status = "running" - logger.info(f"Steckdose für Job {job.id} eingeschaltet") - else: - logger.error(f"Fehler beim Einschalten für Job {job.id}: {msg}") - - # Jobs die enden sollten - jobs_to_end = db_session.query(Job).filter( - Job.status == "running", - Job.end_at <= now - ).all() - - for job in jobs_to_end: - logger.info(f"Beende Job {job.id} für Drucker {job.printer_id}") - success, msg = self.control_plug(job.printer_id, "off") - if success: - job.status = "finished" - job.actual_end_time = now - logger.info(f"Steckdose für Job {job.id} ausgeschaltet") - else: - logger.error(f"Fehler beim Ausschalten für Job {job.id}: {msg}") - - db_session.commit() - db_session.close() - - except Exception as e: - logger.error(f"Fehler bei der automatischen Job-Steuerung: {str(e)}") - - def _get_active_job(self, printer_id: int, db_session) -> Optional[Job]: - """Gibt den aktuell aktiven Job für einen Drucker zurück""" - return db_session.query(Job).filter( - Job.printer_id == printer_id, - Job.status == "running" - ).first() - - def _get_next_job(self, printer_id: int, db_session) -> Optional[Job]: - """Gibt den nächsten geplanten Job für einen Drucker zurück""" - return db_session.query(Job).filter( - Job.printer_id == printer_id, - Job.status == "scheduled", - Job.start_at > datetime.now() - ).order_by(Job.start_at).first() - - def _is_cache_valid(self, printer_id: int) -> bool: - """Prüft ob der Cache noch gültig ist""" - if printer_id not in self._last_check: - return False - - age = (datetime.now() - self._last_check[printer_id]).total_seconds() - return age < self.check_interval - - def _create_error_status(self, printer_id: int, error: str) -> Dict[str, any]: - """Erstellt einen Fehler-Status""" - return { - "id": printer_id, - "name": f"Drucker {printer_id}", - "plug_status": self.STATUS_UNREACHABLE, - "plug_reachable": False, - "error": error, - "last_checked": datetime.now() - } - - def _log_status(self, printer: Printer, status: str, source: str = "system"): - """Loggt einen Status in die Datenbank""" - try: - PlugStatusLog.log_status_change( - printer_id=printer.id, - status=status, - source=source, - ip_address=printer.plug_ip - ) - except Exception as e: - logger.error(f"Fehler beim Loggen des Status: {str(e)}") - - def get_status_for_calendar(self, start_date: datetime, end_date: datetime) -> List[Dict]: - """ - Gibt Status-Informationen für die Kalender-Ansicht zurück - - Args: - start_date: Start-Datum - end_date: End-Datum - - Returns: - Liste mit Status-Events für den Kalender - """ - try: - db_session = get_db_session() - - # Jobs im Zeitraum abrufen - jobs = db_session.query(Job).filter( - Job.start_at <= end_date, - Job.end_at >= start_date - ).all() - - events = [] - - for job in jobs: - # Drucker-Status für Job - printer = job.printer - status = self.get_printer_status(printer.id) - - event = { - "id": f"job_{job.id}", - "title": f"{printer.name}: {job.name}", - "start": job.start_at.isoformat(), - "end": job.end_at.isoformat(), - "backgroundColor": self._get_status_color(job.status), - "extendedProps": { - "job_id": job.id, - "printer_id": printer.id, - "printer_name": printer.name, - "printer_status": status.get("plug_status", "unknown"), - "job_status": job.status, - "user": job.user.name, - "plug_reachable": status.get("plug_reachable", False) - } - } - - events.append(event) - - db_session.close() - - return events - - except Exception as e: - logger.error(f"Fehler beim Abrufen der Kalender-Status: {str(e)}") - return [] - - def get_session_status(self, session_id: str, printer_ids: List[int] = None) -> Dict[str, any]: - """ - Holt den gecachten Status für eine Session - - Args: - session_id: Session-ID - printer_ids: Optional - spezifische Drucker-IDs - - Returns: - Dict mit Session-spezifischen Status-Daten - """ - try: - with self._session_cache_lock: - session_data = self._session_cache.get(session_id, {}) - - # Prüfe Cache-Gültigkeit - cache_time = session_data.get('timestamp', datetime.min) - if (datetime.now() - cache_time).total_seconds() > self._session_cache_ttl: - # Cache abgelaufen - self._session_cache.pop(session_id, None) - return self._create_fresh_session_status(session_id, printer_ids) - - # Wenn spezifische Drucker angefragt, filtere diese - if printer_ids: - filtered_status = {} - for printer_id in printer_ids: - if str(printer_id) in session_data.get('printers', {}): - filtered_status[str(printer_id)] = session_data['printers'][str(printer_id)] - - return { - 'timestamp': session_data['timestamp'], - 'session_id': session_id, - 'printers': filtered_status, - 'from_cache': True - } - - return session_data - - except Exception as e: - logger.error(f"Fehler beim Abrufen des Session-Status: {str(e)}") - return self._create_fresh_session_status(session_id, printer_ids) - - def update_session_status(self, session_id: str, printer_id: int = None) -> bool: - """ - Aktualisiert den Session-Status-Cache - - Args: - session_id: Session-ID - printer_id: Optional - spezifischer Drucker - - Returns: - bool: True wenn erfolgreich - """ - try: - with self._session_cache_lock: - if printer_id: - # Einzelnen Drucker aktualisieren - printer_status = self.get_printer_status(printer_id) - - if session_id not in self._session_cache: - self._session_cache[session_id] = { - 'timestamp': datetime.now(), - 'session_id': session_id, - 'printers': {} - } - - self._session_cache[session_id]['printers'][str(printer_id)] = printer_status - self._session_cache[session_id]['timestamp'] = datetime.now() - else: - # Alle Drucker aktualisieren - self._session_cache[session_id] = self._create_fresh_session_status(session_id) - - logger.debug(f"Session-Status für {session_id} aktualisiert") - return True - - except Exception as e: - logger.error(f"Fehler beim Aktualisieren des Session-Status: {str(e)}") - return False - - def clear_session_cache(self, session_id: str = None) -> bool: - """ - Löscht Session-Cache - - Args: - session_id: Optional - spezifische Session, sonst alle - - Returns: - bool: True wenn erfolgreich - """ - try: - with self._session_cache_lock: - if session_id: - self._session_cache.pop(session_id, None) - logger.debug(f"Session-Cache für {session_id} gelöscht") - else: - self._session_cache.clear() - logger.debug("Kompletter Session-Cache gelöscht") - - return True - - except Exception as e: - logger.error(f"Fehler beim Löschen des Session-Cache: {str(e)}") - return False - - def _create_fresh_session_status(self, session_id: str, printer_ids: List[int] = None) -> Dict[str, any]: - """ - Erstellt frischen Session-Status - - Args: - session_id: Session-ID - printer_ids: Optional - spezifische Drucker-IDs - - Returns: - Dict mit frischen Status-Daten - """ - try: - db_session = get_db_session() - - # Alle oder spezifische Drucker laden - if printer_ids: - printers = db_session.query(Printer).filter(Printer.id.in_(printer_ids)).all() - else: - printers = db_session.query(Printer).all() - - session_data = { - 'timestamp': datetime.now(), - 'session_id': session_id, - 'printers': {}, - 'from_cache': False - } - - # Status für jeden Drucker abrufen - for printer in printers: - printer_status = self.get_printer_status(printer.id) - session_data['printers'][str(printer.id)] = printer_status - - # In Session-Cache speichern - with self._session_cache_lock: - self._session_cache[session_id] = session_data - - db_session.close() - return session_data - - except Exception as e: - logger.error(f"Fehler beim Erstellen frischen Session-Status: {str(e)}") - return { - 'timestamp': datetime.now(), - 'session_id': session_id, - 'printers': {}, - 'error': str(e), - 'from_cache': False - } - - def get_session_cache_stats(self) -> Dict[str, any]: - """ - Gibt Session-Cache-Statistiken zurück - - Returns: - Dict mit Cache-Statistiken - """ - try: - with self._session_cache_lock: - stats = { - 'total_sessions': len(self._session_cache), - 'cache_ttl_seconds': self._session_cache_ttl, - 'cache_size_bytes': len(str(self._session_cache)), - 'sessions': {} - } - - for session_id, data in self._session_cache.items(): - stats['sessions'][session_id] = { - 'timestamp': data.get('timestamp', datetime.min).isoformat(), - 'printer_count': len(data.get('printers', {})), - 'age_seconds': (datetime.now() - data.get('timestamp', datetime.now())).total_seconds() - } - - return stats - - except Exception as e: - logger.error(f"Fehler beim Abrufen der Cache-Statistiken: {str(e)}") - return {'error': str(e)} - - def cleanup_expired_session_cache(self) -> int: - """ - Bereinigt abgelaufene Session-Cache-Einträge - - Returns: - int: Anzahl gelöschter Einträge - """ - try: - expired_count = 0 - current_time = datetime.now() - - with self._session_cache_lock: - expired_sessions = [] - - for session_id, data in self._session_cache.items(): - cache_time = data.get('timestamp', datetime.min) - if (current_time - cache_time).total_seconds() > self._session_cache_ttl: - expired_sessions.append(session_id) - - for session_id in expired_sessions: - self._session_cache.pop(session_id, None) - expired_count += 1 - - if expired_count > 0: - logger.info(f"Session-Cache bereinigt: {expired_count} abgelaufene Einträge entfernt") - - return expired_count - - except Exception as e: - logger.error(f"Fehler beim Bereinigen des Session-Cache: {str(e)}") - return 0 - - def invalidate_cache(self, printer_id: int = None) -> bool: - """ - Invalidiert Cache für spezifischen Drucker oder alle - - Args: - printer_id: Optional - spezifischer Drucker, None = alle Drucker - - Returns: - bool: True wenn erfolgreich - """ - try: - with self._cache_lock: - if printer_id is not None: - # Spezifischen Drucker-Cache löschen - self._status_cache.pop(printer_id, None) - self._last_check.pop(printer_id, None) - logger.debug(f"Cache für Drucker {printer_id} invalidiert") - else: - # Alle Caches löschen - self._status_cache.clear() - self._last_check.clear() - logger.info("Kompletter Status-Cache invalidiert") - - return True - - except Exception as e: - logger.error(f"Fehler beim Invalidieren des Cache: {str(e)}") - return False - - def invalidate_all_caches(self) -> bool: - """ - Invalidiert alle Cache-Systeme (Status + Session) - Verwendet bei Netzwerkwechseln oder Force-Refresh - - Returns: - bool: True wenn erfolgreich - """ - try: - # Status-Cache invalidieren - self.invalidate_cache() - - # Session-Cache invalidieren - self.clear_session_cache() - - logger.info("Alle Caches invalidiert (Status + Session)") - return True - - except Exception as e: - logger.error(f"Fehler beim Invalidieren aller Caches: {str(e)}") - return False - - def force_network_refresh(self) -> Dict[str, any]: - """ - Forciert komplette Netzwerk-Neuprüfung aller Drucker - Invalidiert alle Caches und führt echte Netzwerk-Tests durch - - Returns: - Dict mit Refresh-Ergebnissen - """ - try: - logger.info("Starte Force-Network-Refresh für alle Drucker") - - # Alle Caches invalidieren - self.invalidate_all_caches() - - # Tapo-Controller Cache leeren falls vorhanden - try: - from utils.hardware_integration import tapo_controller - if tapo_controller and hasattr(tapo_controller, 'clear_cache'): - tapo_controller.clear_cache() - logger.debug("Tapo-Controller Cache geleert") - except Exception as e: - logger.warning(f"Tapo-Controller Cache konnte nicht geleert werden: {str(e)}") - - # Frischen Status für alle Drucker abrufen - fresh_status = self.get_all_printer_status(force_refresh=True) - - # Ergebnisse zusammenfassen - results = { - "success": True, - "timestamp": datetime.now().isoformat(), - "printers_refreshed": len(fresh_status), - "printers": fresh_status, - "message": f"Netzwerk-Status für {len(fresh_status)} Drucker erfolgreich aktualisiert" - } - - logger.info(f"Force-Network-Refresh abgeschlossen: {len(fresh_status)} Drucker aktualisiert") - return results - - except Exception as e: - logger.error(f"Fehler beim Force-Network-Refresh: {str(e)}") - return { - "success": False, - "error": str(e), - "timestamp": datetime.now().isoformat(), - "message": "Fehler beim Aktualisieren der Netzwerk-Status" - } - - def _get_status_color(self, status: str) -> str: - """Gibt die Farbe für einen Status zurück""" - colors = { - "scheduled": "#3788d8", - "running": "#28a745", - "finished": "#6c757d", - "aborted": "#dc3545" - } - return colors.get(status, "#6c757d") - - -# Globale Instanz -tapo_status_manager = TapoStatusManager() - - -def get_tapo_status_manager() -> TapoStatusManager: - """Gibt die globale TapoStatusManager-Instanz zurück""" - return tapo_status_manager \ No newline at end of file