initial commit with all the stuff

This commit is contained in:
2025-11-23 13:27:23 +01:00
parent 3f7069b328
commit 1c8a143e7a
5241 changed files with 986176 additions and 0 deletions

45
2B+Software/app/cfg.lua Normal file
View File

@@ -0,0 +1,45 @@
modules = {"panel","app","locale"};
---------------- Application module app configuration ---------------
app = {}
require "app"
function app.apply()
print(
"<br><b><center>Apply module app !</center></b><br>"..
"<center>Damit die &Auml;nderungen wirksam werden, musste die Anwendung neu gestartet werden !</center><br>"
);
os.execute("/root/ctrlapp stop")
os.execute("sleep 2")
os.execute("/root/ctrlapp start")
end
function app.validate()
print("<br><b><center>Validate modlue app !</center></b><br>");
end
---------------- Witty Administration localisation ------------------
locale = {}
require "locale";
---------------- Witty Administration Tabs configuration ------------
tabs = {}
require "tabs";
panel = {};
require "panel"
function panel.apply()
local mqttBroker = app.mqttBroker[1]
local mqttRoot = app.mqttRoot[1]
print(
"<br><b><center>Apply module panel !</center></b><br>"..
"<center>Damit die &Auml;nderungen wirksam werden, wird die Konfiguration via MQTT publiziert !</center><br>"
);
os.execute("mosquitto_pub -h "..mqttBroker.. " -t "..mqttRoot.."/ctrl/cmd/panel/config -m apply")
os.execute("sleep 2")
os.execute("mosquitto_pub -h "..mqttBroker.. " -t "..mqttRoot.."/ctrl/cmd/panel/config -m publish")
end