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


Question

Posted

Please login or register to see this code.

14 answers to this question

Recommended Posts

  • 0
Posted

you need to add the ID of the dimmer under the %%properties tab at the top of the scene and the words 'sceneActivation'

 

then inside the LUA code you would use the following code:

eg dimmer module is ID 22

 

 

Please login or register to see this code.

 

so for me the second switch on single click on gives a code of 21 so it runs that command

code 20 runs a different command when i turn off second switch

 

code 25 is issued when i tripple click the second switch

 

see table in image for all codes and 

 a short video to show it working..

 

 

Please login or register to see this attachment.

  • Like 1
  • 0
  • Inquirer
  • Posted
    6 minutes ago, morpheus75 said:

    you need to add the ID of the dimmer under the %%properties tab at the top of the scene and the words 'sceneActivation'

     

    then inside the LUA code you would use the following code:

    eg dimmer module is ID 22

     

     

     

    Please login or register to see this code.

     

     

    so for me the second switch on single click on gives a code of 21 so it runs that command

    code 20 runs a different command when i turn off second switch

     

    code 25 is issued when i tripple click the second switch

     

    see table in image for all codes and 

     a short video to show it working..

     

     

    Please login or register to see this attachment.

    Please login or register to see this code.

    • 0
    Posted

    I'm running 4.134 beta firmware and this scene still works fine.

    Use my code as your template and try.

    Use the if sa == 25 section of code and use debug commands to check. 

    Use the table to get your correct code values. Remember I have a toggle switch so 20, 21, 24, 25, 10, 11 are my valid codes.

    • 0
  • Inquirer
  • Posted (edited)

    Hear  is my code 

     

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

    local startSource = fibaro:getSourceTrigger();
    if (
     ( tonumber(fibaro:getValue(502, "sceneActivation")) == 26 )
    or
    startSource["type"] == "other"
    )
    then
        fibaro:call(460, "turnOn");
    end

     

    Edited by systemfel
    • 0
    Posted

    code 26 is code for a single click connected to S2 of a dimmer module with a toggle switch.

    assuming you have set parameter 20 to toggle aswell.

    then it should work...

     

    also you dont need autostart and the local startsource line either

     

    • 0
  • Inquirer
  • Posted
    On 2.09.2017 at 1:18 PM, morpheus75 said:

    code 26 is code for a single click connected to S2 of a dimmer module with a toggle switch.

    assuming you have set parameter 20 to toggle aswell.

    then it should work...

     

    also you dont need autostart and the local startsource line either

     

    Please login or register to see this code.

     

    tanx fore the help 

    • 0
    Posted

    Hello,

     

    @systemfel, how did you set up the parameters 28 and 29?

    Please, post the block scene you created.

    • 0
    Posted

    hi

    Please login or register to see this code.

     

    assuming ID of switch is 22 and your switch selection in parameter 20 is correctly selected for your switch.

    the above LUA code will then give you code numbers for your scene activation presses.

     

    • 0
  • Inquirer
  • Posted
    6 hours ago, T.Konopka said:

    Hello,

     

    @systemfel, how did you set up the parameters 28 and 29?

    Please, post the block scene you created.

    Hello  her is the print screen off  the block scen  and the dimmer  2 - ass you can see  parameter 28 and 29 are correct 

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    3 hours ago, morpheus75 said:

    hi

     

    Please login or register to see this code.

     

     

    assuming ID of switch is 22 and your switch selection in parameter 20 is correctly selected for your switch.

    the above LUA code will then give you code numbers for your scene activation presses.

     

    when i run the code i get the number  16 

    Please login or register to see this attachment.

     

    Please login or register to see this code.

    • 0
    Posted

    in your setup the (sa) code you need is 16.

    so you need to change the code 26 from your block scene to 16 and then it will activate

    the code 16 represents  

    single click on momentary switch connected to S1

    OR toggle action on S1 toggle type switch

     

    • 0
  • Inquirer
  • Posted (edited)

    I've solved the problem and it was that I had to add the puck again and ran the code, but everything worked with new id. so that was a installation problem . somthing hade gone wrong whit the soft wear

     

    thanks everyone who helped me .. :) 

    Please login or register to see this code.

     

    Edited by systemfel
    • 0
  • Inquirer
  • Posted

    i have  found what the problem is and its this when  you

    Please login or register to see this image.

    Please login or register to see this image.

    put this lite ting in hide  then its stops working. i tink its are a remote device  but way isit ther ?

     

    Please login or register to see this attachment.

    • 0
    Posted

    Hello,

     

    20 hours ago, systemfel said:

    but everything worked with new id. so that was a installation problem . somthing hade gone wrong whit the soft wear

    Well, the incorrect ID that you chose was the issue. When you changed it to ID 16 it started to work properly. Nothing to do with the installation or software.

     

    18 hours ago, systemfel said:

    i have  found what the problem is and its this when  you

    Please login or register to see this link.

    Please login or register to see this link.

    put this lite ting in hide  then its stops working. i tink its are a remote device  but way isit ther ?

     

    Please login or register to see this attachment.

    What device has ID 504 in your system?

    • 0
    Posted

    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.

    ".

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