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

FGS212


Lyonmarco

Question

Good morning everybody.

 

I have bought a Fibaro FGS212 and I want to control a lamp from two or three different button.

 

Can somebody explain me how is the cable connection for this specific case? 

 

Is this device able to manage a switch or a button?

 

Thank you!

 

Marco

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Hi Reinhold,

    thank you for Answering

     

    I would like to use a button, I don’t know the exact terminology in English. I press the button and switch on the lamp, if I press again the lamp will switch off. No switch but button.

     

    Thanks,

    Marco

    Link to comment
    Share on other sites

    • 0

    If you make a scene for the button and put the next code.

    Replace ID button for the id from the button and replace ID lamp for the id from the switch

     

    --[[
    %% properties
    %% events
    ID button CentralSceneEvent    
    %% globals
    --]]
     
    fibaro:debug("The button pressed")
    local button_source = fibaro:getSourceTrigger()["event"]["data"]
     
    if (tostring(button_source["keyAttribute"]) == "Pressed") then
          fibaro:debug("Fibaro Button 1x")

     


     if(tonumber(fibaro:getValue(ID lamp, "value")) >= 1)
    then
    fibaro:call(ID lamp, "turnOff")
    else
    then
    fibaro:call(ID lamp, "turnOn")
    end 


    elseif (tostring(button_source["keyAttribute"]) == "Pressed2") then
          fibaro:debug("Fibaro Button 2x")
      
    elseif (tostring(button_source["keyAttribute"]) == "Pressed3") then
          fibaro:debug("Fibaro Button 3x")
      
    elseif (tostring(button_source["keyAttribute"]) == "Pressed4") then
          fibaro:debug("Fibaro Button 4x")
      
    elseif (tostring(button_source["keyAttribute"]) == "Pressed5") then
          fibaro:debug("Fibaro Button 5x")
      
    elseif (tostring(button_source["keyAttribute"]) == "HeldDown") then
          fibaro:debug("Fibaro Button HeldDown")
      
    elseif (tostring(button_source["keyAttribute"]) == "Released") then
          fibaro:debug("Fibaro Button Released")
    else
          fibaro:debug('Fibaro Button unknown action')
    end

    Edited by Reinhold
    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...