first commit
This commit is contained in:
30
lua/old/script_time_soleil.lua
Executable file
30
lua/old/script_time_soleil.lua
Executable file
@@ -0,0 +1,30 @@
|
||||
---------------------------------
|
||||
-- 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
|
||||
Reference in New Issue
Block a user