Files
Domoticz/lua/old/script_time_soleil.lua
2025-03-06 11:09:58 +01:00

31 lines
900 B
Lua
Executable File

---------------------------------
-- Script de collecte de quelques indicateurs solaire
-- Auteur : Sébastien Joly
-- Adapté pour Domoticz par Neutrino
-- Date : 29 août 2015
-- Eléments de calculs :
-- http://www.plevenon-meteo.info/technique/theorie/enso/ensoleillement.html
-- http://herve.silve.pagesperso-orange.fr/solaire.htm
-- http://www.domotique-info.fr/2015/09/ou-est-le-soleil-pour-votre-homecenter-2/
---------------------------------
require "scripts/lua/functions"
commandArray = {}
time = os.date("*t")
local idxLux="320"
if ((time.min % 5)==0) then
if (timeofday['Nighttime']) then
--il fait nuit
LuxPondere = 0
--mise a jour du dispositif
commandArray[1] = {['UpdateDevice'] = idxLux..'|0|' .. tostring(LuxPondere)}
else
os.execute("lua /opt/domoticz/scripts/lua/soleil.lua "..uservariables['octa'].." &")
end
end
return commandArray