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

Sceneactivation not starting LUA scene


kevin

Question

Hi,

 

I have create a LUA scene with scene-activation. The scene starts when I press the play button in the UI so the scene works, but doesn't start when double click (S1) on the wall switch?. In the debug window no errors.

Yes I have enabled scene-activation on this Fibaro Dimmer 2, checked it multiple times to be sure?

 

I use the code below

Please login or register to see this code.

 

Who can tell me what is wrong and how to solve it?

 

Thank you in advance and have a nice sunday evening.

 

Kevin

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Hi @kevin ,

 

You might check your HomeTable. it is possible that device ID is not properly set because in other case it should work. But to make it easier here is universal code that does not relay on HomeTable since it is possible to read device ID from response table:

Please login or register to see this spoiler.

 

Scene will run also if activated manually but will tell you that there is nothing to do :-)

 

Enjoy coding! :-)

Edited by Sankotronic
Changed code
  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • @Sankotronic

     

    Thank you for the quick and extensive response. So if I understand it correctly I can use this scene for all switches with the Fibaro Dimmer 2 scene-activation and control all the S1 and S2 actions by only using this scene?

     

    Do I need to add my part of the code between these 2 lines? 

    Please login or register to see this code.

     

    Like:

    Please login or register to see this code.

    Edited by kevin
    Link to comment
    Share on other sites

    • 0
    9 hours ago, kevin said:

    Thank you for the quick and extensive response. So if I understand it correctly I can use this scene for all switches with the Fibaro Dimmer 2 scene-activation and control all the S1 and S2 actions by only using this scene?

     

    Do I need to add my part of the code between these 2 lines? 

     

    Hi @kevin ,

     

    Above scene includes all possible switch operations with dimmer 2 set to use momentary (push) switches. I have also added to scene comments where user code needs to be inserted.

     

    Enjoy coding! :-)

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thank you for the code. I'm getting an error on the last part of the code about the scene activated manually.

     

     

    [DEBUG] 10:27:13: 2019-10-06 10:27:13.917178 [ fatal] Unknown exception: /opt/fibaro/scenes/221.lua:153: expected near 'else'
     

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic

    i know that the post is older. But I have a question. I have tried a lot of times run a similar code (to your posted) to my HC2 and Dimmer 2 device but i have not success. The debug window doesn´t show any message. I have not sceneActivation property for my Dimmer 2 only have the sceneActivationEvent and i don´t know how use this property. Could you tell me where is the wrong? Thank in advance. 

     

                                         Hernán

    Link to comment
    Share on other sites

    • 0

    Hi @Herni ,

     

    Check dimmer 2 parameter 28 and set it to 1 - functionality activated. By default this parameter is set to 0. After setting parameter 28 above code should work. Also scene activation ID value depends on switch type if is momentary or toggle. Please check here for more details: 

    Please login or register to see this link.

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic

    Thanks for the answer. Yes, I have previouly set the parameter 20 to 0 (Defaul), and parameter 28 to 1 (scene activation actived). But the scene doesn´t run in automatic mode only manual. I must say that the scene is running in the Master HC2 and the dimmer 2 is in another Z-Wave network (in a HCL slave). Could be that the problem? Thaks very much. 

     

                                             Hernán

    Link to comment
    Share on other sites

    • 0

    Hi @Herni ,

     

    it is possible that problem is related to master/slave configuration, but I do not have experience with such setup. When you change state of the dimmer 2 that is connected to the slave HCL is that state properly shown on master HC2?

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic

    I deleted the Dimmer 2 to the slave HCL and added it to master HC2. Now the trigger is Ok. But The trigger have not done from "sceneActivation" property  it was from "SceneActivationEvent". The problem is that i don´t know the structure of "startSource" table to access to "sceneId" field succesfully. Do you know about the structure of the table or you know some document that detail it? Thaks you very much. 

     

                                            Hernán

    Link to comment
    Share on other sites

    • 0

    Hello @Herni ,

     

    I'm aware of SceneActivation property and CentralSceneEvent.

    Dimmer 2 is using SceneActivation property and scene header is:

    Please login or register to see this code.

    NOTE - replace 66 with ID number of your Dimmer 2 in scene header

     

    CentralSceneEvent is used by other devices like Fibaro KeyFob, or Remotec:

    Please login or register to see this code.

    NOTE - replace 246 with ID number of your device ID in scene header

     

    debug will print received trigger table.

     

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic

     

    Yes, I know that "CentralSceneEvent" is used by Double Switches, KeyFob, Button devices. I have tried a few scenes with these devices and worked well. 

    But I have not success with "sceneActivation". I will try to run the code above to see the table structure in the debug. Thanks very much. 

     

                                               Hernán

    Link to comment
    Share on other sites

    • 0

    Hi @Sankotronic

     

    We have resolved the problem. I couldn´t enter successfully to all fields of the "startSource" table. I have printed the code that you shared. After that, i could enter to "sceneId" parameter (see the image below). I don´t know why i could not enter to "sceneActivation" property using the "fibaro:getValue(66,"sceneActivation")" property. Otherwise I could to enter to any field how the image show below. Thank you so much for you help me.

     

                                              Hernán

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