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

Simple Lua Scene not working


Question

Posted

Hello,

 

i have a simple scene to turn off lights:

Please login or register to see this code.

all of them are fibaro rgbw devices expect for ID 72. this is a fibaro power plug which is configured as "light" type. 

When i start the scene, all lights turn off as expected expect for the power plug with id 73. It stays on. When i manually control the ID 73 i did not experience any problems. The plug also works with the android app when i control lights.

What is wrong with this scene ?

 

Greets

10 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this code.

can you check is console what command it send after pressing button manually?

  • 0
  • Inquirer
  • Posted

    Thank you so i missed the initialisation of "i" i guess. I will try this at home

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted

    Like A.Socha said, you probably forgot to copy paste the initializer for "i". Or "i" was initialized somewhere else, so the loop doesn't start at 1, but at a number obtained somewhere else.

     

    I would write it like this. Use 'ipairs" to iterate, test if device is off so you don't send "off" to an already "off" device, add a small delay.

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted

    Hello, I just checken my scene and i=1 was defined i just did not copy. I also tried the second solution but both scenes do not work. The switch does not react...

    • 0
  • Inquirer
  • Posted

    Okay i just realized that the Power plug id changed after reinclusion.

    My fault....

    • 0
    Posted

    No worries! I'm glad it's solved. Thanks for the feedback.

    • 0
  • Inquirer
  • Posted

    No worries! I'm glad it's solved. Thanks for the feedback.

     

     

    Hello,

     

    i want to thank you for the good idea of scene concept.

    But the strange thing is, i thought it was the wrong ID,

    but even with the correct ID it seems not work.

    I will investigate this problem and keep you up to date.

    • 0
  • Inquirer
  • Posted

    Okay i figuered out whats wrong.

    Sometimes when i manually turn on the switch with the Hardware Button, the Controller Shows the device as being off. Since my new scene checks for on Status before turning off, it does not work.

    The switch is located 3 m away from the hc2... Why does it show as off... Should i write a bug Report? Is it a global Problem or for my specific configuration mmm

    • 0
    Posted

    I try to monitor this forum closely and I can't say there have been many reports with clear causes of "non reporting devices". Or to be more precise... "sometimes non-reporting" devices. As such, I can't say with certainty what to do... If it was *never* reporting back to the controller, I'd check the associations.

     

    At the moment, I have 2 ideas. The first has to do with mesh networking. But since you freshly included the plug and it's close to the controller, well, I am not sure. But it's a bit like rebooting a computer or a phone: try it anyway.

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" /> So could you please go to Z-Wave network configuration, Mesh network reconfiguration, then select "Entire Z-Wave network". Wait at least 15 minutes before you try anything else. You'll see errors in the status bar for your battery operated devices, that is to be expected. You shouldn't see errors for your mains operated modules. If you haven't done this before, you might be surprised that you get status messages many hours after you've launched this command. This happens because the HC2 queues the "update nearest neighbor" to battery operated devices, and when they wake up, a status message appears.

     

    The second possibility is that your Z-Wave network is very busy sometimes. Unfortunately, there is no diagnostic tool to find out. Possible causes are scenes, Vds and reporting from devices (for instances: power usage reporting on a Wall Plug). One possible test is this. Please make a dashboard and add the "scenes" panel. You'll have a quick overview of what is running on your HC2. Now stop all scenes. Or even better, certainly try this if scenes restart themselves quickly (because of a trigger), remove the checkmark next to "Active Scene" on the advanced page of the scene.

     

    I'd like to have an idea of what is on your HC2 (devices,scenes,firmware versions). I'll send you a PM on how to communicate that.

    • 0
  • Inquirer
  • Posted

    Hi Peter,

     

    it is great to have people like you around.

    I did check the assositations of the power plug.

    It looks like this:

     

    Endpoint 0

    -Group 1

    -Group 2

    -Group 3

     

     

    None of these groups had the HC2 set. I checked another power plug that worked and this plug had Group 3 assosiated with HC2 in Single Channel Assosiation.

    I am not sure why Group 3 and not group 1 is used, but anyway.... I also put the HC2 in Group 3 of the non working power plug and now it seeems to work out. But i still have an eye on that.

    Anyway, i do not know why the assosiation was not set because i never changed anything in the assosiation panel.

     

    Greetings

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