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

Generic QuickApp device stops looping and processing without error messages


leegoo

Question

Hi,

 

I have a quickapp that implements a infinite processing loop like below. However, since some days it stops occasionally the processing (e.g. observing of control inputs and acting upon it) without showing any error messages in the device log.

Has anyone experienced the same? How can I regularly reinitialize the device automatically?

 

Thanks

 

Please login or register to see this code.

 

Edited by leegoo
correction
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

It can be your self:process() that crashes. Unfortunately, when called from within a setTimeout it may not show an error in the console.

Try this

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0
1 hour ago, leegoo said:

Hi,

 

I have a quickapp that implements a infinite processing loop like below. However, since some days it stops occasionally the processing (e.g. observing of control inputs and acting upon it) without showing any error messages in the device log.

Has anyone experienced the same? How can I regularly reinitialize the device automatically?

 

Thanks

 

Please login or register to see this code.

 

I am not fully sure, but i think settimeout function has different argument order...it should be setTimeout(delay, function() --some styuuf here -- end)..but i am not sure...

Link to comment
Share on other sites

  • 0
  • Inquirer
  • thanks for the hint, interestingly it works with that initial function for a few days and then it suddenly stops. I now changed it to hub.setTimeout which indeed seems to have a different signature...

     

    Please login or register to see this code.

    let's see for a few days if that is stable now.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • thanks, will try pcall, using hub.setTimeout by itself did not solve it

    Link to comment
    Share on other sites

    • 0
    2 hours ago, leegoo said:

    thanks, will try pcall, using hub.setTimeout by itself did not solve it

    I will be interested in how you go.  I have now fixed all my errors in a particular QA.  But it still seems to crash, without errors, especially if user events are involved. I have to keep reloading it on the App, because the screen goes blank.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I can confirm that the proposal from @jgab worked for me. It caught an error in the function without breaking the settimeout loop. I can also see the error message in the log

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