backend rework- full test 1

This commit is contained in:
derlole
2025-05-07 11:08:43 +00:00
parent f7d9a640ee
commit 76bfa50995
19 changed files with 397 additions and 127 deletions

16
modules/socketio.py Normal file
View File

@@ -0,0 +1,16 @@
# extensions.py
from flask_socketio import SocketIO
from modules.persistence import esp_conn_infos,load_dict, save_dict
socketio = SocketIO(cors_allowed_origins="*", async_mode='threading')
def resend_static_data():
water = load_dict("water")
beans = load_dict("beans")
machine = load_dict("machine")
socketio.emit('static_data', {
'water': water,
'beans': beans,
'machine': machine,
'esp_conn_infos': esp_conn_infos
})