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

[SOLVED]run action only once every day


Question

Posted

 

Hi!

 

I need run some actions once every day.

 

for example, I put in script header motion ids values and script always running on motions in the room.

but I need run action only once every day in the provided period.

 

UPD: after some period I understand what I need not once every day as well as twice (thrice / xxx daily) a day between the period

 

solution here:

Please login or register to see this code.

 

parameters

checkAction(

 

/// <summary>

/// process name. in english. value stoted at Fibaro global params

/// </summary>

name,

 

/// <summary>

// function for execute

/// </summary>

process,

 

/// <summary>

/// time period in string representation (is not requred)

/// </summary>

time_period,

 

/// <summary>

/// periodic time in minutes. if you wana run every N times (is not requred)

/// <.summary>

periodic

 

 

once every day between 07:00 and 21:00

Please login or register to see this code.

once every day without checking the time

Please login or register to see this code.

 

run every 2h  between 07:00 and 21:00

so if we have motion at 10:35... and next motion will be for example at 12:40 and more - action occurred!

Please login or register to see this code.

 

notice: global values always auto created

 

  • Like 1

1 answer to this question

Recommended Posts

  • 0
Posted

Thank U @10der, very usefull  ! 

Please login or register to see this code.

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