Aller au contenu

Shad

Recommended Posts

Et le débug en appuyant toujour sur bouton 1 télécommande 3 'parents':

  • [DEBUG]: Valeur startSource: property
  • [DEBUG]: On allume la lumière de Marie

 

Avec le code modifié:

--[[
%% properties
184 sceneActivation
245 sceneActivation
248 sceneActivation
255 sceneActivation
%% globals
--]]


-- Id des MINIMOTES
local TelcoMarie = 184;
local TelcoMael = 245;
local TelcoParents = 248;
local TelcoEntree = 255;
-- Id des LUMIERES des chambres
local LightMarie = 138;
local LightMael = 143;
local LightParents = 130;
local LightEntree = 34;
-- Id des VD HUE
local VdHueMarie = 240;
local VdHueMael = 246;
local VdHueParents = 249;
local VdHueEntree = 256;



-- Choix de la télécommande MINIMOTE
local startSource = fibaro:getSourceTrigger();
if (startSource['type']=='property') then
   print('Valeur startSource:' ..startSource["type"])
  if     (startSource['deviceID']==tostring(TelcoMarie)) then
         fibaro:debug("Numéro telco Chambre Marie: " ..NumSceneMarie)
  elseif (startSource['deviceID']==tostring(TelcoMael)) then
         fibaro:debug("Numéro telco Chambre Maà«l: " ..NumSceneMael)
  elseif (startSource['deviceID']==tostring(TelcoParents)) then
          fibaro:debug("Numéro telco Chambre Parents: " ..NumSceneParents) 
  elseif (startSource['deviceID']==tostring(TelcoEntree)) then
         fibaro:debug("Numéro telco Entree: " ..NumSceneEntree) 
   end 
  end  
    
    
---------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE MARIE --
---------------------------------------
local EtatLightMarie = fibaro:getValue(LightMarie, "value");
local NumSceneMarie = fibaro:getValue(TelcoMarie, "sceneActivation")
    
    if (tonumber(NumSceneMarie) == 1) then
      local IntensiteMarie= 50
         -- si égal à  0 (lumière éteinte) alors on allume 
      if (EtatLightMarie == "0") then
          fibaro:call(LightMarie, "turnOn") 
          fibaro:debug("On Allume la lumière de Marie!")
          
      else
          -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightMarie, "turnOff")
          fibaro:debug("On éteint la lumière de Marie")
          fibaro:debug("Minimote Marie bouton 2 appuyé")
      end
  
  elseif (tonumber(NumSceneMarie) == 2) then
  
         -- si égal à  50  
      if  IntensiteMarie == 50 then
          fibaro:call(VdHueMarie, "setSlider", "3", "50") 
          fibaro:debug("On allume à  50% la lumière de Marie!")
      else
        -- dans le cas contraire 25
          fibaro:call(VdHueMarie, "setSlider", "3", "25") 
          fibaro:debug("On allume à  25% la lumière de Marie")
          fibaro:debug("Minimote Marie bouton 2 appuyé")
	  end
            
  
  elseif (tonumber(NumSceneMarie) == 3) then
  fibaro:call(VdHueMarie, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Marie bouton 3 appuyé")
    
  elseif (tonumber(NumSceneMarie) == 4) then
  fibaro:call(VdHueMarie, "pressButton", "13") -- orange
  fibaro:debug("Minimote Marie bouton 4 appuyé")
  
  elseif (tonumber(NumSceneMarie) == 5) then
  fibaro:call(VdHueMarie, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Marie bouton 5 appuyé")
  
  elseif (tonumber(NumSceneMarie) == 6) then
  fibaro:call(VdHueMarie, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Marie bouton 6 appuyé")
  
  elseif (tonumber(NumSceneMarie) == 7) then
  fibaro:call(VdHueMarie, "pressButton", "18") -- violet
  fibaro:debug("Minimote Marie bouton 7 appuyé")
  
  elseif (tonumber(NumSceneMarie) == 8) then
  fibaro:call(VdHueMarie, "pressButton", "19") -- rose
  fibaro:debug("Minimote Marie bouton 8 appuyé")
 
 -- end
---------------------------------------
-- FIN CODE MINIMOTE CHAMBRE MARIE --
---------------------------------------


---------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE MAEL --
---------------------------------------
local EtatLightMael = fibaro:getValue(LightMael, "value");
local NumSceneMael = fibaro:getValue(TelcoMael, "sceneActivation")
--if    
elseif (tonumber(NumSceneMael) == 1) then

local IntensiteMael = 50

      -- si égal à  0 (lumière éteinte) alors on allume 
      if (EtatLightMael == "0") then
          fibaro:call(LightMael, "turnOn") 
          fibaro:debug("On Allume la lumière de Maà«l!")
          
      else
      -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightMael, "turnOff")
          fibaro:debug("On éteint la lumière de Maà«l")
		  fibaro:debug("Minimote Maà«l bouton 1 appuyé")
      end
    
elseif (tonumber(NumSceneMael) == 2) then
  
          -- si égal à  50  
      if  IntensiteMael == 50 then
          fibaro:call(VdHueMael, "setSlider", "3", "50") 
          fibaro:debug("On allume à  50% la lumière de Maà«l!")
          fibaro:debug("Minimote Maà«l bouton 2 appuyé")
      else
          -- dans le cas contraire 25
          fibaro:call(VdHueMael, "setSlider", "3", "25") 
          fibaro:debug("On allume à  25% la lumière de Maà«l")
          fibaro:debug("Minimote Maà«l bouton 2 appuyé")
       end
    
elseif (tonumber(NumSceneMael) == 3) then
  fibaro:call(VdHueMael, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Maà«l bouton 3 appuyé")
    
elseif (tonumber(NumSceneMael) == 4) then
  fibaro:call(VdHueMael, "pressButton", "13") -- orange
  fibaro:debug("Minimote Maà«l bouton 4 appuyé")
  
elseif (tonumber(NumSceneMael) == 5) then
  fibaro:call(VdHueMael, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Maà«l bouton 5 appuyé")
  
elseif (tonumber(NumSceneMael) == 6) then
  fibaro:call(VdHueMael, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Maà«l bouton 6 appuyé")
  
elseif (tonumber(NumSceneMael) == 7) then
  fibaro:call(VdHueMael, "pressButton", "18") -- violet
  fibaro:debug("Minimote Maà«l bouton 7 appuyé")
  
elseif (tonumber(NumSceneMael) == 8) then
  fibaro:call(VdHueMael, "pressButton", "19") -- rose
  fibaro:debug("Minimote Maà«l bouton 8 appuyé")
 
--end
---------------------------------------
-- FIN CODE MINIMOTE CHAMBRE MAEL --
---------------------------------------
---------------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE DES PARENTS --
---------------------------------------------
local EtatLightParents = fibaro:getValue(LightParents, "value");
local NumSceneParents = fibaro:getValue(TelcoParents, "sceneActivation")

 --if 
elseif (tonumber(NumSceneParents) == 1) then

local IntensiteParents = 50

          -- si égal à  0 (lumière éteinte) alors on allume 
      if (EtatLightParents == "0") then
          fibaro:call(LightParents, "turnOn") 
          fibaro:debug("On Allume la lumière de la chambre des Parents!")
		  fibaro:debug("Minimote Parents bouton 1 appuyé")
      else
          -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightParents, "turnOff")
          fibaro:debug("On éteint la lumière de la chambre des parents")
		  fibaro:debug("Minimote Parents bouton 1 appuyé")
      end
    
elseif (tonumber(NumSceneParents) == 2) then
  
  -- si égal à  50  
      if IntensiteParents == 50 then
          fibaro:call(VdHueParents, "setSlider", "3", "50") 
          fibaro:debug("On allume à  50% la lumière de la chambre des parents!")
          fibaro:debug("Minimote Parents bouton 2 appuyé")
      else
      -- dans le cas contraire 25
          fibaro:call(VdHueParents, "setSlider", "3", "25") 
          fibaro:debug("On allume à  25% la lumière de la chambre des parents")
		  fibaro:debug("Minimote Parents bouton 2 appuyé")
      end
  
elseif (tonumber(NumSceneParents) == 3) then
  fibaro:call(VdHueParents, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Maà«l bouton 3 appuyé")
    
elseif (tonumber(NumSceneParents) == 4) then
  fibaro:call(VdHueParents, "pressButton", "13") -- orange
  fibaro:debug("Minimote Parents bouton 4 appuyé")
  
elseif (tonumber(NumSceneParents) == 5) then
  fibaro:call(VdHueParents, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Parents bouton 5 appuyé")
  
elseif (tonumber(NumSceneParents) == 6) then
  fibaro:call(VdHueParents, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Parents bouton 6 appuyé")
  
elseif (tonumber(NumSceneParents) == 7) then
  fibaro:call(VdHueParents, "pressButton", "18") -- violet
  fibaro:debug("Minimote Parents bouton 7 appuyé")
  
elseif (tonumber(NumSceneParents) == 8) then
  fibaro:call(VdHueParents, "pressButton", "19") -- rose
  fibaro:debug("Minimote Parents bouton 8 appuyé")
 
--end

-------------------------------------------
-- FIN CODE MINIMOTE CHAMBRE DES PARENTS --
-------------------------------------------



--------------------------------
-- DEBUT CODE MINIMOTE ENTREE --
--------------------------------
local EtatLightEntree = fibaro:getValue(LightEntree, "value");
local NumSceneEntree = fibaro:getValue(TelcoEntree, "sceneActivation")

    
local VoletsTous = {16, 18, 20, 22, 24, 26};
local VoletsRDC = {22, 24, 26};
local VoletsJardin = {18, 20, 22, 24, 26}; --tous sauf chambre parents 
local LumieresToutes = {32, 28, 237, 138, 143, 130, 34, 194, 19, 36};
local LumieresRDC = {32, 28, 34};
local VoletMarie = 18;
local VoletMael = 20;
local LumiereMarie = 138;
local LumiereMael = 143;
local VdMarie = 240;
local VdMael = 246;

  --if ...
elseif (tonumber(NumSceneEntree) == 1) then
       for i = 1, #LumieresToutes do
       fibaro:call(LumieresToutes[i], "turnOff")
       fibaro:debug("On éteint toutes les lumières de la maison")
       fibaro:debug("MiniMote Entree: bouton 1 appuyé")
       end
    
elseif (tonumber(NumSceneEntree) == 2) then
       for j = 1, #VoletsTous do
       fibaro:call(VoletsTous[j], "turnOff")
       fibaro:debug("On ferme tous les volets")
       fibaro:debug("MiniMote Entree: bouton 2 appuyé")
       end
  
elseif (tonumber(NumSceneEntree) == 3) then 
       fibaro:debug("MiniMote button 3 appuyé: DEBUT ALERTE")
       fibaro:call(LumiereMarie, "turnOn")
       fibaro:call(LumiereMael, "turnOn")
       fibaro:call(VoletMarie, "close")
       fibaro:call(VoletMael, "close")	   
	   fibaro:sleep(2000)
	   fibaro:call(VdMarie, "pressButton", "12")
       fibaro:call(VdMael, "pressButton", "12")
       fibaro:call(VdMarie, "pressButton", "8")  
       fibaro:call(VdMael, "pressButton", "8")
       fibaro:sleep(29000)
       fibaro:call(LumiereMarie, "turnOff")
       fibaro:call(LumiereMael, "turnOff")
       fibaro:debug("MiniMote Entree: bouton 3 - FIN ALERTE ")
  
elseif (tonumber(NumSceneEntree) == 4) then
       fibaro:call(LumiereMarie, "turnOff")
       fibaro:call(LumiereMael, "turnOff")
       fibaro:debug("MiniMote Entree: bouton 4 appuyé: lumières enfants éteintes")
  

elseif (tonumber(NumSceneEntree) == 5) then
       for m = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[m], "close") --fermeture volets RDC
       fibaro:debug("MiniMote Entree: bouton 5 appuyé: FERMETURE volets RDC")
       end

elseif (tonumber(NumSceneEntree) == 6) then
       for n = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[n], "stop")
       fibaro:debug("MiniMote Entree: bouton 6 appuyé: STOP fermeture")
       end

elseif (tonumber(NumSceneEntree) == 7) then
       for o = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[o], "open")
       fibaro:debug("MiniMote Entree: bouton 7 appuyé: OUVERURE volets RDC")
       end

elseif (tonumber(NumSceneEntree) == 8) then
       for p = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[p], "stop")
       fibaro:debug("MiniMote Entree: bouton 8 appuyé: STOP ouverture")
       end
  
end
------------------------------
-- FIN CODE MINIMOTE ENTREE --
------------------------------
Lien vers le commentaire
Partager sur d’autres sites

Fais un essai avec ça:

--[[
%% properties
184 sceneActivation
245 sceneActivation
248 sceneActivation
255 sceneActivation
%% globals
--]]
 
 
-- Id des MINIMOTES
local TelcoMarie = 184;
local TelcoMael = 245;
local TelcoParents = 248;
local TelcoEntree = 255;
-- Id des LUMIERES des chambres
local LightMarie = 138;
local LightMael = 143;
local LightParents = 130;
local LightEntree = 34;
-- Id des VD HUE
local VdHueMarie = 240;
local VdHueMael = 246;
local VdHueParents = 249;
local VdHueEntree = 256;


local startSource = fibaro:getSourceTrigger();
local telcoID = tonumber(startSource['deviceID']);

if (startSource['type']=='property') then
	
---------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE MARIE --
---------------------------------------
  if (telcoID == TelcoMarie) then
    
    local NumSceneMarie = fibaro:getValue(TelcoMarie, "sceneActivation")
    local EtatLightMarie = fibaro:getValue(LightMarie, "value");
    fibaro:debug("Numéro telco Chambre Marie: " ..NumSceneMarie)
  if (tonumber(NumSceneMarie) == 1) then
      local IntensiteMarie= 50
         -- si égal à0 (lumière éteinte) alors on allume
      if (EtatLightMarie == "0") then
          fibaro:call(LightMarie, "turnOn")
          fibaro:debug("On Allume la lumière de Marie!")
          
      else
          -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightMarie, "turnOff")
          fibaro:debug("On éteint la lumière de Marie")
          fibaro:debug("Minimote Marie bouton 2 appuyé")
      end
 
  elseif (tonumber(NumSceneMarie) == 2) then
 
         -- si égal à50  
      if  IntensiteMarie == 50 then
          fibaro:call(VdHueMarie, "setSlider", "3", "50")
          fibaro:debug("On allume à50% la lumière de Marie!")
      else
        -- dans le cas contraire 25
          fibaro:call(VdHueMarie, "setSlider", "3", "25")
          fibaro:debug("On allume à25% la lumière de Marie")
          fibaro:debug("Minimote Marie bouton 2 appuyé")
      end
            
 
  elseif (tonumber(NumSceneMarie) == 3) then
  fibaro:call(VdHueMarie, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Marie bouton 3 appuyé")
    
  elseif (tonumber(NumSceneMarie) == 4) then
  fibaro:call(VdHueMarie, "pressButton", "13") -- orange
  fibaro:debug("Minimote Marie bouton 4 appuyé")
 
  elseif (tonumber(NumSceneMarie) == 5) then
  fibaro:call(VdHueMarie, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Marie bouton 5 appuyé")
 
  elseif (tonumber(NumSceneMarie) == 6) then
  fibaro:call(VdHueMarie, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Marie bouton 6 appuyé")
 
  elseif (tonumber(NumSceneMarie) == 7) then
  fibaro:call(VdHueMarie, "pressButton", "18") -- violet
  fibaro:debug("Minimote Marie bouton 7 appuyé")
 
  elseif (tonumber(NumSceneMarie) == 8) then
  fibaro:call(VdHueMarie, "pressButton", "19") -- rose
  fibaro:debug("Minimote Marie bouton 8 appuyé")
 
 end
---------------------------------------
-- FIN CODE MINIMOTE CHAMBRE MARIE --
---------------------------------------
 
 
-- Choix de la télécommande MINIMOTE MAEL
  elseif (telcoID == TelcoMael) then
  	local NumSceneMael = fibaro:getValue(TelcoMael, "sceneActivation")
  	local EtatLightMael = fibaro:getValue(LightMael, "value");
    fibaro:debug("Numéro telco Chambre Maël: " ..NumSceneMael)
 
---------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE MAEL --
---------------------------------------
 
if (tonumber(NumSceneMael) == 1) then
 
local IntensiteMael = 50
 
      -- si égal à0 (lumière éteinte) alors on allume
      if (EtatLightMael == "0") then
          fibaro:call(LightMael, "turnOn")
          fibaro:debug("On Allume la lumière de Maël!")
          
      else
      -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightMael, "turnOff")
          fibaro:debug("On éteint la lumière de Maël")
          fibaro:debug("Minimote Maël bouton 1 appuyé")
      end
    
elseif (tonumber(NumSceneMael) == 2) then
 
          -- si égal à50  
      if  IntensiteMael == 50 then
          fibaro:call(VdHueMael, "setSlider", "3", "50")
          fibaro:debug("On allume à50% la lumière de Maël!")
          fibaro:debug("Minimote Maël bouton 2 appuyé")
      else
          -- dans le cas contraire 25
          fibaro:call(VdHueMael, "setSlider", "3", "25")
          fibaro:debug("On allume à25% la lumière de Maël")
          fibaro:debug("Minimote Maël bouton 2 appuyé")
       end
    
elseif (tonumber(NumSceneMael) == 3) then
  fibaro:call(VdHueMael, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Maël bouton 3 appuyé")
    
elseif (tonumber(NumSceneMael) == 4) then
  fibaro:call(VdHueMael, "pressButton", "13") -- orange
  fibaro:debug("Minimote Maël bouton 4 appuyé")
 
elseif (tonumber(NumSceneMael) == 5) then
  fibaro:call(VdHueMael, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Maël bouton 5 appuyé")
 
elseif (tonumber(NumSceneMael) == 6) then
  fibaro:call(VdHueMael, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Maël bouton 6 appuyé")
 
elseif (tonumber(NumSceneMael) == 7) then
  fibaro:call(VdHueMael, "pressButton", "18") -- violet
  fibaro:debug("Minimote Maël bouton 7 appuyé")
 
elseif (tonumber(NumSceneMael) == 8) then
  fibaro:call(VdHueMael, "pressButton", "19") -- rose
  fibaro:debug("Minimote Maël bouton 8 appuyé")
 
end
---------------------------------------
-- FIN CODE MINIMOTE CHAMBRE MAEL --
---------------------------------------
 
-- Choix de la télécommande MINIMOTE PARENTS

  elseif (telcoID == TelcoParents) then
  	local NumSceneParents = fibaro:getValue(TelcoParents, "sceneActivation")
  	local EtatLightParents = fibaro:getValue(LightParents, "value");
    fibaro:debug("Numéro telco Chambre Parents: " ..NumSceneParents)
 
 
---------------------------------------------
-- DEBUT CODE MINIMOTE CHAMBRE DES PARENTS --
---------------------------------------------
 
if (tonumber(NumSceneParents) == 1) then
 
local IntensiteParents = 50
 
          -- si égal à0 (lumière éteinte) alors on allume
      if (EtatLightParents == "0") then
          fibaro:call(LightParents, "turnOn")
          fibaro:debug("On Allume la lumière de la chambre des Parents!")
          fibaro:debug("Minimote Parents bouton 1 appuyé")
      else
          -- dans le cas contraire (lumière allumée) on éteint
          fibaro:call(LightParents, "turnOff")
          fibaro:debug("On éteint la lumière de la chambre des parents")
          fibaro:debug("Minimote Parents bouton 1 appuyé")
      end
    
elseif (tonumber(NumSceneParents) == 2) then
 
  -- si égal à50  
      if IntensiteParents == 50 then
          fibaro:call(VdHueParents, "setSlider", "3", "50")
          fibaro:debug("On allume à50% la lumière de la chambre des parents!")
          fibaro:debug("Minimote Parents bouton 2 appuyé")
      else
      -- dans le cas contraire 25
          fibaro:call(VdHueParents, "setSlider", "3", "25")
          fibaro:debug("On allume à25% la lumière de la chambre des parents")
          fibaro:debug("Minimote Parents bouton 2 appuyé")
      end
 
elseif (tonumber(NumSceneParents) == 3) then
  fibaro:call(VdHueParents, "pressButton", "12") -- rouge
  fibaro:debug("Minimote Maël bouton 3 appuyé")
    
elseif (tonumber(NumSceneParents) == 4) then
  fibaro:call(VdHueParents, "pressButton", "13") -- orange
  fibaro:debug("Minimote Parents bouton 4 appuyé")
 
elseif (tonumber(NumSceneParents) == 5) then
  fibaro:call(VdHueParents, "pressButton", "16") -- ciel
  fibaro:debug("Minimote Parents bouton 5 appuyé")
 
elseif (tonumber(NumSceneParents) == 6) then
  fibaro:call(VdHueParents, "pressButton", "17") -- bleu
  fibaro:debug("Minimote Parents bouton 6 appuyé")
 
elseif (tonumber(NumSceneParents) == 7) then
  fibaro:call(VdHueParents, "pressButton", "18") -- violet
  fibaro:debug("Minimote Parents bouton 7 appuyé")
 
elseif (tonumber(NumSceneParents) == 8) then
  fibaro:call(VdHueParents, "pressButton", "19") -- rose
  fibaro:debug("Minimote Parents bouton 8 appuyé")
 
end
 
-------------------------------------------
-- FIN CODE MINIMOTE CHAMBRE DES PARENTS --
-------------------------------------------
 
 
-- Choix de la télécommande MINIMOTE ENTREE  
  
  elseif (telcoID == TelcoEntree) then
  	local NumSceneEntree = fibaro:getValue(TelcoEntree, "sceneActivation")
  	local EtatLightEntree = fibaro:getValue(LightEntree, "value");
    fibaro:debug("Numéro telco Entree: " ..NumSceneEntree)
 
--------------------------------
-- DEBUT CODE MINIMOTE ENTREE --
--------------------------------
 
local VoletsTous = {16, 18, 20, 22, 24, 26};
local VoletsRDC = {22, 24, 26};
local VoletsJardin = {18, 20, 22, 24, 26}; --tous sauf chambre parents
local LumieresToutes = {32, 28, 237, 138, 143, 130, 34, 194, 19, 36};
local LumieresRDC = {32, 28, 34};
local VoletMarie = 18;
local VoletMael = 20;
local LumiereMarie = 138;
local LumiereMael = 143;
local VdMarie = 240;
local VdMael = 246;
 
if (tonumber(NumSceneEntree) == 1) then
       for i = 1, #LumieresToutes do
       fibaro:call(LumieresToutes[i], "turnOff")
       fibaro:debug("On éteint toutes les lumières de la maison")
       fibaro:debug("MiniMote Entree: bouton 1 appuyé")
       end
    
elseif (tonumber(NumSceneEntree) == 2) then
       for j = 1, #VoletsTous do
       fibaro:call(VoletsTous[j], "turnOff")
       fibaro:debug("On ferme tous les volets")
       fibaro:debug("MiniMote Entree: bouton 2 appuyé")
       end
 
elseif (tonumber(NumSceneEntree) == 3) then
       fibaro:debug("MiniMote button 3 appuyé: DEBUT ALERTE")
       fibaro:call(LumiereMarie, "turnOn")
       fibaro:call(LumiereMael, "turnOn")
       fibaro:call(VoletMarie, "close")
       fibaro:call(VoletMael, "close")       
       fibaro:sleep(2000)
       fibaro:call(VdMarie, "pressButton", "12")
       fibaro:call(VdMael, "pressButton", "12")
       fibaro:call(VdMarie, "pressButton", "8")  
       fibaro:call(VdMael, "pressButton", "8")
       fibaro:sleep(29000)
       fibaro:call(LumiereMarie, "turnOff")
       fibaro:call(LumiereMael, "turnOff")
       fibaro:debug("MiniMote Entree: bouton 3 - FIN ALERTE ")
 
elseif (tonumber(NumSceneEntree) == 4) then
       fibaro:call(LumiereMarie, "turnOff")
       fibaro:call(LumiereMael, "turnOff")
       fibaro:debug("MiniMote Entree: bouton 4 appuyé: lumières enfants éteintes")
 
 
elseif (tonumber(NumSceneEntree) == 5) then
       for m = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[m], "close") --fermeture volets RDC
       fibaro:debug("MiniMote Entree: bouton 5 appuyé: FERMETURE volets RDC")
       end
 
elseif (tonumber(NumSceneEntree) == 6) then
       for n = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[n], "stop")
       fibaro:debug("MiniMote Entree: bouton 6 appuyé: STOP fermeture")
       end
 
elseif (tonumber(NumSceneEntree) == 7) then
       for o = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[o], "open")
       fibaro:debug("MiniMote Entree: bouton 7 appuyé: OUVERURE volets RDC")
       end
 
elseif (tonumber(NumSceneEntree) == 8) then
       for p = 1, #VoletsRDC do
       fibaro:call(VoletsRDC[p], "stop")
       fibaro:debug("MiniMote Entree: bouton 8 appuyé: STOP ouverture")
       end
 
 
end
 
------------------------------
-- FIN CODE MINIMOTE ENTREE --
------------------------------
 
 
  end
end
  • Upvote 1
Lien vers le commentaire
Partager sur d’autres sites

×
×
  • Créer...