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

Start scene on double click or "long" click


orwe

Question

Hello guys. This is my first post so let me just say that I have some experience in development but I'm new when it comes to Lua and Fibaro. Is there a way to start a scene on a double click or holding a button for x seconds? I have 10 blinds and I noticed that I'm using them in several "scenario"s (e.g. closing all except those facing a garden at dusk and closing the remaining just before going to bad). I'd like to write a simple function that will close a group of blinds after some manual action. I know that I can group blinds into groups but this is not what I need as I'd like to preserve the option of closing individual blinds. 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I presume you are using Roller Shutter 3s?  Have a look at the online manual 

Please login or register to see this link.

 

Scroll to "Activating scenes".  You turn on this functionality with parameters 40 and 41 (one parameter for each button - so therefore you can run two scenes).  Then at the start of each LUA scene (which needs to be set to run automatically) you put this code, to tell the scene that it should be triggered by the Roller Shutter scene request:

 

--[[
%% autostart
%% properties
99 sceneActivation
%% weather
%% events
%% globals
--]]

 

Change the 99 to be your particular Roller Shutter deviceID.  There is another syntax you can try as well: "99 CentralSceneEvent 2 Pressed"

 

You could instead create a block scene that is triggered at a certain time (eg sunset), and closes certain blinds, and then create another block scene that closes all blinds at bedtime.  That way you don't need to worry about pressing a button. :-)

Link to comment
Share on other sites

  • 0

PS the LUA code to set an individual blind is:

 

   fibaro:call(99, "setValue", BlindSetPoint);

 

where BlindSetPoint is a value between 0 and 100. 0 is closed, 100 is open. As before, replace 99 with your device's ID.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • @Tim__Thanks, I just came back home and will give it a try on the weekend. So just to make sure, I should start the script with:

    --[[
    %% autostart
    %% properties
    99 CentralSceneEvent 2 Pressed
    %% weather
    %% events
    %% globals
    --]]

     

    and this will start at double click but which button? Close or open? 

    Link to comment
    Share on other sites

    • 0

    Which button? Depends on how you've set up parameters 40 and 41.

     

    I haven't actually done scene activation for a roller shutter, so you'll have to read through the docs and play around a bit.

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