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

Scene code crash? Cannot turn off light anymore until reboot


Question

Posted

Hi All,

 

I have this script:

Please login or register to see this code.

And since 2 updates ago, this script won't work anymore..

Output is:

 

[DEBUG] 23:41:25: Motion detected, resetting timer
[DEBUG] 23:41:25: 99
[DEBUG] 23:41:26: Motion detected, resetting timer
[DEBUG] 23:41:26: 99
[DEBUG] 23:41:27: Motion detected, resetting timer
[DEBUG] 23:41:27: 99
[DEBUG] 23:41:28: Dimming, current level = 98
[DEBUG] 23:41:28: 98
[DEBUG] 23:41:29: Dimming, current level = 97
[DEBUG] 23:41:29: 97
[DEBUG] 23:41:31: Dimming, current level = 96
[DEBUG] 23:41:31: 96
[DEBUG] 23:41:36: Dimming, current level = 95
[DEBUG] 23:41:36: 95
 
And then the script just stops.
Manually turning off the light isn't working anymore until I reboot the HC2.
 
Anyone who sees the problem? Or can say I need to alter my script?
 
Many many many many thanks!
 
Regards!!

5 answers to this question

Recommended Posts

  • 0
Posted

I think this part of the code has the potential to send many (identical) commands to the dimmer. While the dimmer doesn't appear to be doing anything, the queue might fill up.

 

Please login or register to see this code.

To confirm that, would it be possible for you to put a fibaro:debug statement in that loop? And as a quick fix, a fibaro:sleep(1000) too?

I haven't tested it, that piece off code just looks suspicious to me...

  • 0
  • Inquirer
  • Posted

    I think this part of the code has the potential to send many (identical) commands to the dimmer. While the dimmer doesn't appear to be doing anything, the queue might fill up.

     

    Please login or register to see this code.

    To confirm that, would it be possible for you to put a fibaro:debug statement in that loop? And as a quick fix, a fibaro:sleep(1000) too?

    I haven't tested it, that piece off code just looks suspicious to me...

     

     

    HERO!

    Seems to be fixed (with the fibaro:sleep(1000))

    Have to wait for a while now to see if it's stable.

    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" />

    Thank you!

    • 0
    Posted

    Glad it helped! Have fun.

    Oh, wait, maybe one thing. Would you mind if I refer some or more people to your topic? I might do that, if you agree, to show a "real example" of how a piece of code that doesn't look very suspicious has the power of bringing down a Z-Wave network... Until know, I could only give examples that I made up myself (like writing an infinite loop).

    • 0
  • Inquirer
  • Posted

    Glad it helped! Have fun.

    Oh, wait, maybe one thing. Would you mind if I refer some or more people to your topic? I might do that, if you agree, to show a "real example" of how a piece of code that doesn't look very suspicious has the power of bringing down a Z-Wave network... Until know, I could only give examples that I made up myself (like writing an infinite loop).

     

    Sure, no problem!

    • 0
    Posted

    Glad it helped! Have fun.

    Oh, wait, maybe one thing. Would you mind if I refer some or more people to your topic? I might do that, if you agree, to show a "real example" of how a piece of code that doesn't look very suspicious has the power of bringing down a Z-Wave network... Until know, I could only give examples that I made up myself (like writing an infinite loop).

     

    Interesting!

     

    From time to time I have problems that (probably) ALL Fibaro motionsensors are not reporting anymore. All are connected tot the main controller HC2, the sensors that are connected to the gateway-HCL are ok and are reporting

     

     

    Q1: Is is possible to use a LUA scene/VD to check if the Z-Wave network is down so that a report can be sent?

    Q2: Is there a possibility to monitor/measure the ZWave performance?

    Q3: Is there a way to restart the Z-wave network (selectively) without manually rebooting?

     

     

    I did not tried the new function HomeCenter.SystemService.reboot() yet as I am on 4.080

     

    Thanks for any help

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