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

Lua Smooth Dimming curve


FabianM

Question

Hi

Is There a simple way to make a smooth Dimming curve over (for example) 60seconds?

I do it like this, but it is a lot of single commands. Is there a easier way??

Please login or register to see this code.

-- obviously "354" is My Dimmer Device.

 

Thanks for any Ideas...

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Yes there is! You can use a "for" loop, have a play with this:

Please login or register to see this code.

Please login or register to see this code.

Please login or register to see this code.

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks Tim.

    Can you make me an Example and explain me the commands? At the moment it do not work with this Code.

    Link to comment
    Share on other sites

    • 0

    I think it's a "Dawn Simulator" that you need :-). This is my favorite.
    You can dim up or down the light by changing the start and end values.

     

    Please login or register to see this image.

    /monthly_2020_10/299599394_Dawnsimulatormodes.png.e384f69930810e0895a9292d57e84167.png" />

    Please login or register to see this code.

     

    Edited by RH_Dreambox
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • thanks @RH_Dreambox.  actually not exactly what i am looking for.

    Well, i have a scene with mutliple Actions (example: Lamp 1 at 50%, Lamp 2 at 25%, LED Strip at Magenta with 50% Dimming, etc.). Now i want when i Start the Scene (Starting Home Cinema with Electric screen - needs time to come up) that part of the Actions (Dimming of a Lamp) will go over 1-2 Minutes.

    I Think @RH_Dreambox  your Scene is great, but a Little Oversized for my needs.

     

    Any other ideas?

    Link to comment
    Share on other sites

    • 0

    RH_Dreambox @

    Please, I would inform you where I should change the code if it is to reverse the order, that is, lamps turned on and gradually turn off until turning off (I would like to use it at the end of the night in the garden). thank's

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • a Possible solution - for me now Working:

    Please login or register to see this code.

    Thanks @Tim__ i think you gave me the right hint. :-)

     

    Link to comment
    Share on other sites

    • 0

    Apologies I missed putting in the 'i' at the end of this line:

    Please login or register to see this code.

    Details of LUAs FOR function are here

    Please login or register to see this link.

    , noting that not all LUA functions are implemented in Home Centre (and i did not have access to test at this time)

     

    Looks like you solved it using a similar approach, well done.

     

    Link to comment
    Share on other sites

    • 0

    @jorge rintaro

    You must change startValue and endValue to dim the light up or down, see the example below.

    Wake up (increase the light slowly)
    -----------------------------------
    local startValue = 0;    -- Begin value = 0
    local endValue   = 100;    -- End value = 100


    Sleep (reduce light slowly)
    ---------------------------
    local startValue = 99;    -- Begin value = 99
    local endValue   = 0;    -- End value = 0


    If you do not want to turn the light on or off completely, you can select an optional start and end value

    Wake up (increase the light slowly)
    -----------------------------------
    local startValue = 40;    -- Begin value
    local endValue   = 80;    -- End value

    or

    Sleep (reduce light slowly)
    ---------------------------
    local startValue = 70;    -- Begin value
    local endValue   = 25;    -- End value

    Link to comment
    Share on other sites

    • 0

    Hi,

    How I can do to a momentary switch trigger an scene at the same time that i push the switch (connected in S2 input of Dimmer 2 Device) the light start dim up? And not after the release the button. Could you help me? Thanks in advance.

    PD: Sorry for my english.

    Link to comment
    Share on other sites

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