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


QuickApp does not allow interrupts


Recommended Posts

For watering our plants I develop a Virtual Device with HC2 using control buttons to open a valve during 15, 30, 45 and 60sec.
I also had a emergency STOP button to close the valve immediately within the same VD.
When I reproduce the same with HC3, it is not possible to call the STOP button (interrupt) untill the watering in progress is not completed.
Any help?
(and not entionning those buttons are not displayed on the portable Android/IOS...)

Link to comment
Share on other sites

Could you post QA code?

Link to comment
Share on other sites

  • Topic Author
  • Here is the QA code for this application.
    The problem I am facing is that when one of the button call (15, 30, 45 60sec) is executed, action on the STOP button is not taken into account untill the elapsed time is reached, while I would like to interrupt the excuted code in progress.

    Code is documented in French, but so simple that I am sure you will understand!

    Action is in this example is 539 and corresponds to a Fibaro switch activating a valve.

    Thank you if your can help.

    Also the button cretaed in this example are not shown on the tile in the android/ipad application...

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    On 4/29/2020 at 7:08 PM, hubert.pelletier said:

    Here is the QA code for this application.
    The problem I am facing is that when one of the button call (15, 30, 45 60sec) is executed, action on the STOP button is not taken into account untill the elapsed time is reached, while I would like to interrupt the excuted code in progress.

    Code is documented in French, but so simple that I am sure you will understand!

    Action is in this example is 539 and corresponds to a Fibaro switch activating a valve.

    Thank you if your can help.

    Also the button cretaed in this example are not shown on the tile in the android/ipad application...

     

    Please login or register to see this attachment.

     

    Please login or register to see this code.

    You can't do a "while ... end" loop - that will block all other button calls in the QA. You need to restructure the loop with setTimeout to give time to other buttons.

    In other words, you have to learn to loop with setTimeout...

    Please login or register to see this code.

    (bit unsure how you want to update the button4_1 text...)

    You may want to call QuickApp:cancelTimer() to stop timer if any other button is pressed while the timer is running

     

    Long discussion on this topic in another thread 

    Here is an example

     

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • all is fully functional by now, thank you again.

    now just waiting for Fibaro to fix the problem with mobile apps and have the button just created to be displayed :-(

    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
    Reply to this topic...

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