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

Problems with the 1min trigger


Question

Posted (edited)

Hi

If 2 scenes (let's call them A and B) with a cron trigger 1min. is started e.g. like this

Please login or register to see this code.


Then something like this is built into A:

Please login or register to see this code.

Then B will not be started as long as A is still running.


So far so good.

 

Both scenes say "Allow to restart a running scene:?" on No

But when I look at the CPU load, it is almost 0, but I don't understand that anymore.
If we had a multitasking system and the scenes can be triggered individually and run separately from each other, that cannot be the case.
If we don't have a multitasking system, a CPU load of almost 0 is not possible because this one scene actually swallows all CPU time.
If fibaro.sleep puts the scene into sleep mode and everything else at the same time, I could explain that to myself, but then computing time would be wasted.
Can someone explain that to me, please?
Greetings Frank

Edited by FBerges

3 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, FBerges said:

Hi

If 2 scenes (let's call them A and B) with a cron trigger 1min. is started e.g. like this

Please login or register to see this code.


Then something like this is built into A:

Please login or register to see this code.

Then B will not be started as long as A is still running.


So far so good.

 

Both scenes say "Allow to restart a running scene:?" on No

But when I look at the CPU load, it is almost 0, but I don't understand that anymore.
If we had a multitasking system and the scenes can be triggered individually and run separately from each other, that cannot be the case.
If we don't have a multitasking system, a CPU load of almost 0 is not possible because this one scene actually swallows all CPU time.
If fibaro.sleep puts the scene into sleep mode and everything else at the same time, I could explain that to myself, but then computing time would be wasted.
Can someone explain that to me, please?
Greetings Frank

Sleep puts the Linux thread to sleep and it doesn't take any cpu time. Other threads can run (QAs and Scenes).

If A and B are different scenes (different SceneIDs) they will both run in parallell.

  • 0
  • Inquirer
  • Posted (edited)

    Exactly that doesn't work, B is not executed (triggered) when A is in the loop.

    Both have their own IDs and are triggered independently of each other.

    HC3 5.062.40 (beta)

    Edited by FBerges
    • 0
    Posted
    12 minutes ago, FBerges said:

    Exactly that doesn't work, B is not executed (triggered) when A is in the loop.

    Both have their own IDs and are triggered independently of each other.

    HC3 5.062.40 (beta)

    But it does.  Do you look at the correct debug output?

    My A scene look like

    Please login or register to see this code.

     

    and my B look like

    Please login or register to see this code.

     

    I get a "B" in the log every minute and the count-up from A every second in the same log.

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