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 activation with Dimmer2


msgasson

Question

Hi,

 

I can't seem to get scene activation on my dimmer module to work. I would like to activate a scene when a light switch is pressed x3. I'm using a momentary switch and have set parameter 28 to allow scene activation on the module. It works is I run the scene in HC2, but not if I click the momentary switch. Any suggestions? The aim is to activate a scene when I leave home.

 

Not sure how to copy the coding - but here is a copy.

 

--[[
%% autostart
%% properties
16 sceneActivation
%% events
%% globals
--]]

local startSource = fibaro:getSourceTrigger();
if (
 ( tonumber(fibaro:getValue(16, "sceneActivation")) == 15 )
or
startSource["type"] == "other"
)
then
    fibaro:call(154, "turnOff");
end

 

Thanks

 

 

 

 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

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.

".

Link to comment
Share on other sites

  • 0

You mean you need something like this:

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi,

     

    Thanks for the feedback. I managed to localise the coding, but the 3 clicks is not working. The scene registers 1 click, 2 clicks and holding down, but not 3 clicks so this can't activate a scene. I have added a scene for 2 clicks and this works. Obviously I then lose the normal function for 2 clicks so this is not ideal, but was required for testing.

     

    Any suggestions what to check next?

     

    By the way, how do I copy coding in the same format you have done to the forum?

     

    --[[
    %% properties
    16 sceneActivation
    %% events
    %% globals
    --]]

    ----------------------------------------- 
    --   SCENE ACTIVATED BY DIMMER SWITCH  --
    -----------------------------------------

    -- Making sure that only one instance of the scene is running.
    if (fibaro:countScenes() > 1) then
      fibaro:abort();
    end
        
    -- setup some local variables
    local startSource = fibaro:getSourceTrigger();
    local deBug = true;

    -- MAIN CODE ---------------------------------------------------------
    if startSource['type'] == "property" then
      local devID = tonumber(startSource["deviceID"])
      local ButtonPressed = fibaro:getValue(devID, "sceneActivation")
      if     ( tonumber(ButtonPressed) == 16) then -- pressed 1 click
        if deBug then fibaro:debug("1 click") end;
      elseif ( tonumber(ButtonPressed) == 14) then -- pressed 2 clicks
      fibaro:startScene(7); -- run scene to turn off garden lights 
        if deBug then fibaro:debug("2 click") end;
      elseif ( tonumber(ButtonPressed) == 15) then -- pressed 3 clicks
        if deBug then fibaro:debug("3 click") end;
      elseif ( tonumber(ButtonPressed) == 12) then -- pressed hold down
        if deBug then fibaro:debug("holding down") end;
      end
    else
      fibaro:debug("Scene activated manually so nothing to do");
    end

    Link to comment
    Share on other sites

    • 0

    In the manual of the FGD-212 is a table, describing the possibilities of "sceneActivation". Triple click exists on S2, but not on S1. I wonder where you got that code from, scene ID 15 is not in that table... Fibaro removed the option from S1 with "Dimmer 2", because that is also the "include" command. Correction: Scene ID 15 exists, but only for "roller blinds switches" (p 20 = 2).

    Edited by petergebruers
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks, found that in the manual. The Fibaro UK site state that you can use 3 click function on both S1 and S2. 

    Please login or register to see this link.

     

    Apart from installing another momentary switch to control S2, is there another way to get around this?

    - Can I bridge S1 and S2 on the relay? or

    - Can I connect the light to S2 and still control the light and activate scenes?

     

    Thanks

     

     

     

    Link to comment
    Share on other sites

    • 0

    I'm certain that swapping S1 and S2 doesn't help, by means of parameter "29. Switch functionality of S1 and S2". I've tried that, the same restriction applies. S2 controls your dimmer, but doesn't send 3-click. Connecting S1 and S2 to the same switch? I'm pretty certain nobody asked that before. Tempting idea! I might be able to try that, but probably not before the weekend. If you want to try, go ahead, the inputs of the dimmer are very well protected. It won't cause any damage. Would it cause timing issues or command issues? I did a quick test. I have a dimmer that uses S1 to dim the main light and S2 to switch on another light using sceneActivation. If I click both switches at the same time both the dimmer and the scene respond, so your idea may work...

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I bridged S1 and S2 and the scene activation works for 3 clicks on the same switch. This is good news, so it saves me adding another switch and gives me control for scene activation.

    • Like 1
    Link to comment
    Share on other sites

    • 0
    18 hours ago, msgasson said:

    I bridged S1 and S2 and the scene activation works for 3 clicks on the same switch. This is good news, so it saves me adding another switch and gives me control for scene activation.

     

    Thanks for reporting back! Seems like an acceptable workaround, right? Have fun with automation!

    Link to comment
    Share on other sites

    • 0
    On 11/27/2016 at 9:46 PM, msgasson said:

    I bridged S1 and S2 and the scene activation works for 3 clicks on the same switch. This is good news, so it saves me adding another switch and gives me control for scene activation.

     hi @msgasson,

     

    i know this is an old post, but can i ask what you mean by 'bridging s1 and s2'? im facing the same issue - i just moved from dimmer 1 to dimmer 2 and losing 3 click functionality is a huge pain. 

     

    ive tried turning on para 29 to switch functionalities of s1 and s2 which works for 3 click,, but takes away the ability to turn on/off and dim with 1 click/click+hold, so thats not ideal

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi,

     

    You need to use a piece of insulated wire and connect S1 to S2. Not sure I'm explaining that properly? S2 should basically also be connected to S1.

     

    Let me know if unclear and I will look for a picture.

     

    Cheers

    Link to comment
    Share on other sites

    • 0
    On 11/28/2016 at 12:46 AM, msgasson said:

    I bridged S1 and S2 and the scene activation works for 3 clicks on the same switch. This is good news, so it saves me adding another switch and gives me control for scene activation.

    I love the outside the box thinking. Just cos the manual doesn't say do it, doesn't mean it wont work :-) 

     

    Thanks for the heads up 

    Link to comment
    Share on other sites

    • 0
    Guest vipernor
    On 11/22/2016 at 3:26 PM, Sankotronic said:

    You mean you need something like this:

    Please login or register to see this code.

     

     

    Ok, so I just managed to delete the scene I had for scene activation of S2 (Home/Away) and S1 (normal momentary dimmer switch) that worked together with smart light or VSL (motion detector). That took me too long to solve, so... Are there anyone out there who has something like it or the same code,  and will like to share?   I haven't backed-up in a while..  

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