first commit

This commit is contained in:
Souti
2025-03-06 11:09:58 +01:00
commit 11f7d440ff
330 changed files with 38306 additions and 0 deletions

38
lua/script_time_Solaire.lua Executable file
View File

@@ -0,0 +1,38 @@
require "scripts/lua/functions"
--recupere les minutes
time=os.time()
seconds=tonumber(os.date('%S',time))
minutes=tonumber(os.date('%M',time))
heures=tonumber(os.date('%H',time))
jour=tonumber(os.date('%w',time))
mois=tonumber(os.date('%M',time))
--Initialise la commande de retour finale
commandArray={}
-- ------------------------------------------------------------------------------
-- Gestion de la production solaire
-- ------------------------------------------------------------------------------
--if (minutes %1 == 0) then
local tab1 = split(otherdevices['CONSOMMATION_GENERALE'], ";")
local watt_consomme = tonumber(tab1[1])
--print("Time Consommation générale "..watt_consomme)
local tab = getValuesInTab('SolaireProduction')
print("Time Production Solaire "..tab[1])
local watt_solaire = tonumber(tab[1])
if watt_solaire ~= nil and watt_solaire > 100 then
if watt_consomme < 80 then
print("Consommation devient faible => routage solaire")
else
print("Consommation encore importante solaire 100% injecté")
end
end
--end
return commandArray