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

HC3 Lua sceneActivation


ArjanC
 Share

Question

On the HC2 i was using multiple lua scenes with sceneActivation. 

This because i have multiple dimmers in one room and want to use both buttons (and twice/tripple click) to activate different scenes.

 

But i cant seem to get this working on the HC3, in fact, even the button press in LUA doesn't seem to do anything.

 

i've used the examples from the fibaro website for button press (

Please login or register to see this link.

)

 

is someone using this 'feature' on the HC3? or is there a different way to start scenes in the HC3?

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

Yes, works for me. If this is a dimmer 2 check if parameter 28 (scene activation) is set to 1. For other devices, check the manual. Then look up the ID of the button press in the manual, in my case "single click S2 with momentary switch" is 26. See manuals.fibaro.com. Use that in a block scene on the device that looks like a black remote controller. Here is a screenshot of such a scene:

 

Please login or register to see this spoiler.

 

Edited by petergebruers
  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thanks! i was already using this in the  hc2. i had to recreate the lua scenes after migration to hc3.

     

    the blockscene  seems to work, but, it won't switch off. what do you use for that? and do you know how I get the value  of sceneactivationevents  in LUA? I get 'nil' every time :-(

    Link to comment
    Share on other sites

    • 0
    W dniu 3.03.2020 o 21:54, ArjanC napisał:

     do you know how I get the value  of sceneactivationevents  in LUA? I get 'nil' every time :-(

     

    I have the same issue.

    I can't retrieve the particular sceneActivationEvent from the dimmer Remote Controller.

    In HC2 it was like that: 

    local IDofRemoteController = 79

    fibaro:getValue(IDofRemoteController, "SceneActivation")

     

    In HC3 I have tried to use

    fibaro.getValue(IDofRemoteController, "SceneActivation")

    or 

    fibaro.getValue(IDofRemoteController, "sceneActivationEvent")

     

    In both cases I received nil value...

     

    It is really disappointing because a condition like that is working:

    {
      conditions = { {
          id = 79,
          isTrigger = true,
          operator = "==",
          property = "sceneActivationEvent",
          type = "device",
          value = 10
        } },
      operator = "any"
    }
    Link to comment
    Share on other sites

    • 0
    Guest numberior

    Has there been any progress on this yet?

    I'm also having the same problem. My Double Switch 2 always activate block scene to Turn ON HueStrip reliably; but cannot activate the scene to turn it OFF. 

     

    Is the HC3 a brick? Even though I'm a newbie, I did not expect to struggle with such a simple scene.

    Edited by numberior
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • no, no progress.. it does work in blocks but you need to create multiple block scenes for something that has worked in one lua code :(

     

    Link to comment
    Share on other sites

    • 0
    Guest numberior

    How did you resolve the turning off problem in the end?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I have four block scenes for a dimmer : 

     

    Please login or register to see this image.

    /monthly_2020_03/628386514_Aantekening2020-03-26164244.jpg.68adea2604f81470312e68f0dc2b8ff7.jpg" />

     

    and two global variables : 

     

    Please login or register to see this attachment.

     

    If the S1 button is pressed, the global variable S11 is set to 1, and S12 is set to 0.

    If the S2 button is pressed, the global variable S12 is set to 1, and S11 is set to 0.

     

    looks like this

    177159139_Aantekening2020-03-26164244-.jpg.3ab1a1845e4bc15f7ee2b8d37c28c903.jpg

     

    There is probably a better way to do this... but for now this version works.
     

     

    Link to comment
    Share on other sites

    • 0
    Guest numberior

    Thanks ArjanC,

    After contacted FibaroSupport,

    they provided a LUA version that works to turnoff:

    Please login or register to see this attachment.

     

    Are these the typical problems we expect to face in the early phase of a Home Center?

    When is the next software update coming?

    Link to comment
    Share on other sites

    • 0

    I can't see the black remote controller for my Dimmer 2. Is their any solution to activate the black remote controller for the Dimmer 2?

    I have checked the Parameter 28. Parameter is set to 1. I am surprised, because I see the black remote controller for e.g. a roller shutter in the device list. So, I can configure the shutter in the block scene with regard to sceneactivation.

     

    I would also be interested in a LUA solution for sceneactivation.

    Link to comment
    Share on other sites

    • 0
    On 4/28/2020 at 9:41 PM, Mickler said:

    I can't see the black remote controller for my Dimmer 2. Is their any solution to activate the black remote controller for the Dimmer 2?

    I have checked the Parameter 28. Parameter is set to 1. I am surprised, because I see the black remote controller for e.g. a roller shutter in the device list. So, I can configure the shutter in the block scene with regard to sceneactivation.

     

    I would also be interested in a LUA solution for sceneactivation.

    I have the same problem for my dimmer 2's

    Link to comment
    Share on other sites

    • 0
    On 4/28/2020 at 9:41 PM, Mickler said:

    I can't see the black remote controller for my Dimmer 2. Is their any solution to activate the black remote controller for the Dimmer 2?

    I have checked the Parameter 28. Parameter is set to 1. I am surprised, because I see the black remote controller for e.g. a roller shutter in the device list. So, I can configure the shutter in the block scene with regard to sceneactivation.

     

    I would also be interested in a LUA solution for sceneactivation.

    I have found the problem!

    I thought i was only hiding the device from the main view. But it hides it everywhere!

     

    Please login or register to see this image.

    /monthly_2020_09/image.png.41b11b58c40f95f347804382ad0f9c60.png" />

     

    Edited by ArjanP
    Link to comment
    Share on other sites

    • 0

    Hi

    this is the LUA i use for scene activation

    CONDITIONS

     

    {
        conditions = { {
              id = 51,
            isTrigger = true,
            operator = "==",
            property = "sceneActivationEvent",
            type = "device",
            value = 24
            },
               {
               id = 51,
            isTrigger = true,
            operator = "==",
            property = "sceneActivationEvent",
            type = "device",
            value = 25
          } },
        operator = "any"
      }
     
    so 51 is my Remote Controller ID number for the Dimmer 2 in question
    24 and 25 represent the sceneActivation ID as 2x click and 3xclick
     
    ACTIONS
     
    local sa = tonumber(json.encode(sourceTrigger.value))
    -- fibaro.debug("Scene141", sa)
     
    i then use the statements:
     
    if (sa == 24) then DO SOMETHING end
    if (sa == 25) then DO SOMETHING end
     
    can create everything on 1 scene.
     
    Hope this helps......
     
    Link to comment
    Share on other sites

    • 0

    Hi @morpheus75, is this still working with the lastest firmware?

    I set everything correct, parameter 26 and your code with the device id from the controller and the scene is not fired by the double click.

    Link to comment
    Share on other sites

    • 0

    I got it. It works. I used the wrong id. It was late yesterday. I have to use id 14 with a Dimmer 2 and 2x click.

    Link to comment
    Share on other sites

    • 0

    I use this.

     

    Please login or register to see this code.

     

    Please login or register to see this code.

     

    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.

     Share

    ×
    ×
    • Create New...