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

Question

Posted

Dear,
I have an HC2 and I need a Scene when a Motion sensor is violated it turns on a dimmer in 100%, after 5 minutes without movement the dimmer reduces its light by 50% and another 5 minutes without movement the light goes out, but if this interval the Motion sensor is violated again the dimmer returns to 100% and the time counting resumes. I believe that this Scene is only possible through the Moon, if someone has a Scene like this or indicates a similar one I would be very grateful.

thanks!

8 answers to this question

Recommended Posts

  • 0
Posted

maybe?
 

--[[
%% properties
88 value
%% killOtherInstances
--]]

local light=67

local sensor=88

If fibaro:getValue(sensor,”value”) > 0 then

    fibaro:call(67,”setValue”,100)

else

    fibaro:sleep(5*60*1000)

    fibaro:call(light,”setValue”,50)

    fibaro:sleep(5*60*1000)

    fibaro:call(light,”setValue”,0)

end

  • 0
Posted

@jgab

IMHO 100 - restore prev value for dimmer. IMHO should be 99.

  • 0
Posted
1 hour ago, 10der said:

@jgab

IMHO 100 - restore prev value for dimmer. IMHO should be 99.

right

  • 0
  • Inquirer
  • Posted

    Dear, 

    jgab@ e 10der@
    thank you for your help, Cena worked perfect ....

     

    • 0
    Posted

    Please login or register to see this code.

    • 0
    Posted

    Hi @jgab

    off-topic, sorry but i have never seen %% killOtherInstances""

    Is that the same as checking only 1 instance is running?

    • 0
    Posted (edited)

    %% killOtherInstances

    will kill any other instance of the scene that is already running.

    In the case of the scene example above if the sensor is breached it will turn on light and terminate the scene.

    When the scene trigger next because sensor becomes safe, it will go into a sleep/set light state that will take ~10min, and the scene will be active/run all the time

    However, if the sensor becomes breached again, it will kill the sleeping/set light scene (if it's running) and turn on the light and wait for the sensor to be safe again to enter the sleep/set light state again...

     

    Edited by jgab
    • Like 1
    • 0
    Posted

    Great to know, thanks @jgab!!!

    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...