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


Question

Posted

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

19 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
  • Inquirer
  • Posted (edited)

    @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
    • 0
    Posted
    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! :-)

    • 0
  • Inquirer
  • Posted

    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'
     

    • 0
    Posted

    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

    • 0
    Posted

    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.

    • 0
    Posted

    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

    • 0
    Posted

    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?

    • 0
    Posted

    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

    • 0
    Posted

    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.

     

    • 0
    Posted

    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

    • 0
    Posted

    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

    • 0
    Posted

    I have a similar issue. I have several dimmers with sceneActivation. All working fine.

     

    One of my dimmers was blown up, I replaced it with a new one (I have noticed although it's still called Dimmer 2, the latest sometimes changes...) and now my sceneActivation doesn't work. Of course parameter 28 set to 1, but no response in the LUA output box.

     

    I have also tried the code with the HomeTable, but also no sign of acknowledgment... what could this be? It's just only a replacement, so changed id in the LUA code and setting the proper parameters...

    • 0
    Posted (edited)
    3 hours ago, jnathalia said:

    I have a similar issue. I have several dimmers with sceneActivation. All working fine.

     

    One of my dimmers was blown up, I replaced it with a new one (I have noticed although it's still called Dimmer 2, the latest sometimes changes...) and now my sceneActivation doesn't work. Of course parameter 28 set to 1, but no response in the LUA output box.

     

    I have also tried the code with the HomeTable, but also no sign of acknowledgment... what could this be? It's just only a replacement, so changed id in the LUA code and setting the proper parameters...

     

    Edit:

    after posting I see you use the HC2. 

     

     

    after activation check that it is visible after using the buttons sometimes :) (just hit the buttons S1 and s2 with 1x, 2x, 3x and hold to update this) 

    go on the remote and see:

    Please login or register to see this attachment.

     

    example without scene activation and no buttons used:

    Please login or register to see this attachment.

     

     

     

     

     

    Edited by Brors94
    • 0
    Posted

    thanks @Brors94

    but it didn't help.

    it's HC2 indeed..., sorry not to be clear enough.

    could it be my z-wave network is too full? I see some parameters are loaded (with this kind of small circle that it's still trying to retrieve). Also the update of the icon whether the light is on or off or dim change is not represented correctly/quickly. I have some suspicion. 

     

    I have done "Read configuration" to make sure parameter 28 is ok.

     

    How can I check wether my z-wave network is "full"?

     

    thanks for all your contributions!

    • 0
    Posted
    7 minutes ago, jnathalia said:

    thanks @Brors94

    but it didn't help.

    it's HC2 indeed..., sorry not to be clear enough.

    could it be my z-wave network is too full? I see some parameters are loaded (with this kind of small circle that it's still trying to retrieve). Also the update of the icon whether the light is on or off or dim change is not represented correctly/quickly. I have some suspicion. 

     

    I have done "Read configuration" to make sure parameter 28 is ok.

     

    How can I check wether my z-wave network is "full"?

     

    thanks for all your contributions!

     

     

    I dont know my ways around HC2, but it sound like the device isnt fully included.

    Have you tried to exclude and re include with the HC2 close to the device? (bring the Hc2 max 1m away from the device, then include it) 
     

     

     

    • 0
    Posted

    I followed your recommendation and indeed this helped! I pressed "Reconfigure" without pressing the B-button and that was fine. I did this with a few other modules as well and also these were fine now.

     

    How can I see if my Z-wave network is "full" or is there no limit? I had a slave installed (HCL2) but because of the battery it doesn't wake up anymore so I had to transfer my HCL devices to the HC2 (master)... not ideal but it is what it is. Fibaro doesn't really support the old stuff as it looks like. I have modules that aren't updated because of new firmware, but even when putting the HC2 next to it, the updates fails... 

    • 0
    Posted

    I dont know what is max recommended devices on the HC2.

    But how many do you have?   
    @jnathalia

    • 0
    Posted

    I have now about 47 Fibaro devices, Satel Integra integrated, 9 Heltun thermostats with several Z-wave functions, about 10 virtual devices, 4 curtain devices, 2 DoorBird intercom, in total 4 CAMs. The highest id numbering is now 966.

     

    I have noticed things became slower and some devices were difficult to approach and therefore not always switching. That's why I inserted an extra HCL as a slave, but also because some devices where too far from the HC2.

     

    From the beginning I had an endless LUA loop (which I have in 2 other houses as well and never gave an issue) which is switching at certain times devices. As you can see in the code below there are into the WHILE-END loop with several IF - ENDIF. I have shortened this example, just to let you know the idea I have created. This loop stops after about 3 weeks without an error code. Like the memory stack is full or so and the entire HC2 is not working anymore, it freezes. Before I rebooted after 2 weeks, problem solved (by the way I hate that kind of solutions, but the problem was never sorted out and I have 2 other houses where it runs flawless). As I have now added a few days ago these Fibaro devices from my HCL-slave, the code already stops now after a day. Which surprises me, as it apparently has to do something with the amount of devices, as this is the only change that was made.

     

    Or can anybody see something odd to the code below or do you have any other advice?

     

    Please login or register to see this code.

     

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