Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Scene to leave bathroom for 30 minutes by double clicking


Question

Posted

Hi

 

I want to make a scene for the bathroom that if I double click the lights will stay on for 30 minutes.This is what I have in Lua but the lights are always switch of earlier than the 30 minutes. What am I doing wrong?

 

thanks

 

--[[
%% properties
72 value
%% globals
--]]

if (fibaro:countScenes()>1) then 
  fibaro:abort(); 
end

local dimid = 72 -- ID for the dimmer you want to operate 

if (tonumber(fibaro:getValue(dimid, "value"))) > 0 then
  local timer = 1800; 
  fibaro:debug("Lights on at level "..timer);

repeat 
   fibaro:sleep(1000); 
   timer=timer-1; 

       fibaro:debug("Countdown, current level = "..timer);  
  until (timer<1)

  --Once the timer has finished and dimlevel reaches 1, the light will be turned off 
  fibaro:call(dimid, "turnOff"); 
  fibaro:debug("Lights out"); 
  fibaro:killScenes(25);
  end

 

 

 

7 answers to this question

Recommended Posts

  • 0
Posted

Is there a specific reason why you don’t use a motion sensor in your bathroom?

  • 0
Posted

The topic has been moved from "

Please login or register to see this link.

" to "

Please login or register to see this link.

".

 

Temat został przeniesiony z "

Please login or register to see this link.

" do "

Please login or register to see this link.

".

  • 0
  • Inquirer
  • Posted

    Hi Sjekke,

     

    I have a motion sensor but I would like to have 2 scenes with this. One which is one for only 5 min (works) and double click for 30 min. 

     

    • 0
    Posted

    Hi @SanSuus I use the VSL scene of  @Sankotronicin my Living room. Take a look … 

     

     

     

    • 0
  • Inquirer
  • Posted

    thanks :-) I will look in to this

    • 0
    Posted

    I don't like the motion sensor because the motion has to be continuous for the light to stay on. Where can I order one that stays on for more than a few seconds?

     

    Please login or register to see this link.

     

    #fürdőszoba #csaptelep

    • 0
    Posted
    3 hours ago, lilah_donat said:

    I don't like the motion sensor because the motion has to be continuous for the light to stay on. Where can I order one that stays on for more than a few seconds?

     

    Please login or register to see this link.

     

    #fürdőszoba #csaptelep

     

    There is (of-course) no need for continuous motion. You can change the PIR "save time" to whatever you want. 

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...