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


Recommended Posts

Posted
3 hours ago, cag014 said:

Few questions

1. The second part (marked red) belongs to what?

2. Are you sure the {&XRaamGloriaLamp:value=start} condition is true? Maybe add debug command at this time to verify the condition.

3. Is it runs on HC3?

 

 

1. The second part is just a check per email that triggering conditions of part 1 are met.

2. Yes I have checked that {&XRaamGloriaLamp:value=start} condition is true. That is why al random lights (also XRaamGloriaLamp) were still on in the morning, because the stop of the random lights was not functioning.

3. Yes, it all runs on HC3 (AOQ).

  • Topic Author
  • Posted
    27 minutes ago, Rover said:

    1. The second part is just a check per email that triggering conditions of part 1 are met.

    2. Yes I have checked that {&XRaamGloriaLamp:value=start} condition is true. That is why al random lights (also XRaamGloriaLamp) were still on in the morning, because the stop of the random lights was not functioning.

    3. Yes, it all runs on HC3 (AOQ).

    Do you know what was the random value of the timeSlot when it failed to work?  Could be 03:00?

    It could be possible that timeSlot executes on 03:00 exactly and $24clock still at 02:59 for few milliseconds...

    Let's try to be on safe side...

    Please change $24clock:value>02:59 to $24clock:value>02:58

     

    Posted
    8 hours ago, cag014 said:

    Sometimes all the three lines run? It should run all of them all the time...

    Please take in considerations that hour =18:00 lasts for one minute! So during this minute the state will constantly changes between these lines.

    Could you please elaborate what you're trying to achieve....?

    By the way please see $dayTime user Keyword as defined in user_data.

    userKeyWord={{"$dayTime"},

        {function() return  os.date("*t",os_time()).hour<6 and "Good night," or os.date("*t",os_time()).hour<12 and "Good morning," or os.date("*t",os_time()).hour<18 and "Good afternoon," or os.date("*t",os_time()).hour<=23 and "Good evening," end}}

    You can remove word Good or to chnage the string to wht you need.

     

    I have a global variable, that is the AttilaWork. And I want change this variable's value on every sunday at 18:00. If the variable's value is Day, change to Night. If it is Night, change to Afternoon. If it is Afternoon, change to Day...

     

    Posted
    10 hours ago, cag014 said:

    Do you know what was the random value of the timeSlot when it failed to work?  Could be 03:00?

    It could be possible that timeSlot executes on 03:00 exactly and $24clock still at 02:59 for few milliseconds...

    Let's try to be on safe side...

    Please change $24clock:value>02:59 to $24clock:value>02:58

     

    OK, I will change to 2:58, but it was not the only problem:

    {0, "$24clock",{state="value=04:00",initOnStartup=false,lineState={"if {&XRaamGloriaLamp:value=start}"}, trueAct={

        {"`RandomLichten`","turnOff","if {&Lichten:value=Uit}"},{"`XRandomLichten`","setGlobal","stop"},}}},

    did not work either. It is a safety measure for as the random business would not function. But also this $24clock trigger did not trigger...

    Posted (edited)

    This night the random lights did not stop between 3:00 and 4:00, but I had not set the 2:59 to 2:58 yet. The safety measure at 4:00 worked this time and the random lights were stopped at 4:00.

     

    {0, "$24clock",{state="value=02:55", trueAct={

    {"$lineId","setTimeSlot","?3:00+(random(0,`RandomMaxTijd`)*60)?~","{$24clock:value=02:55}"},

    {"`XRandomLichten`","setGlobal","stop","{$24clock:value>02:58}"}, 

    Is the conditional part in red necessairy, while the $24clock is triggert by the state="value=02:55" anyhow ?

    Edited by Rover
  • Topic Author
  • Posted
    On 1/5/2021 at 9:21 AM, SmartLifeSystems said:

     

    I have a global variable, that is the AttilaWork. And I want change this variable's value on every sunday at 18:00. If the variable's value is Day, change to Night. If it is Night, change to Afternoon. If it is Afternoon, change to Day...

     

     

    May I suggest to add one more condition, modification time (let's say 180 seconds)

    It means when the correct value will be set other lines won't be executed.

    I hope &AttilaWork variable doesn't changed in other lines often...


     

    Please login or register to see this code.

     

    Posted
    1 hour ago, cag014 said:

     

    May I suggest to add one more condition, modification time (let's say 180 seconds)

    It means when the correct value will be set other lines won't be executed.

    I hope &AttilaWork variable doesn't changed in other lines often...


     

    Please login or register to see this code.

     

     

    Wow. That's great idea! Thanks!

    Posted
    9 minutes ago, SmartLifeSystems said:

     

    Wow. That's great idea! Thanks!

     

    Sorry, but I have got an error message.

    What did I wrong?

     

    Please login or register to see this attachment.

    Posted

    {0, "$24clock",{initOnStartup=false,state="value=0",timeSlot="?$sunsetHour-(60*60)?~",

          trueAct={ {"`Achtertuin`","turnOn"},{"`ZonneschermLicht`","turnOn","if {&ZonneschermActief:value=Ja}"},}}},

     

    This line did not trigger this afternoon for the first time: $24clock is faulty!

    Posted (edited)
    5 minutes ago, Rover said:

    {0, "$24clock",{initOnStartup=false,state="value=0",timeSlot="?$sunsetHour-(60*60)?~",

          trueAct={ {"`Achtertuin`","turnOn"},{"`ZonneschermLicht`","turnOn","if {&ZonneschermActief:value=Ja}"},}}},

     

    This line did not trigger this afternoon for the first time: $24clock is faulty!

     

    @Rover, insert the line the onClock=true command. When for me doesn't work, I inserted this command. Since working fine.

     

    {0, "$24clock",{initOnStartup=false,state="value=0",onClock=true,timeSlot="?$sunsetHour-(60*60)?~",

          trueAct={ {"`Achtertuin`","turnOn"},{"`ZonneschermLicht`","turnOn","if {&ZonneschermActief:value=Ja}"},}}},

    Edited by SmartLifeSystems
    • Like 1
  • Topic Author
  • Posted
    1 hour ago, SmartLifeSystems said:

     

    Sorry, but I have got an error message.

    What did I wrong?

     

    Please login or register to see this attachment.

    Wrong syntax, should be

    &AttialWork:valueModified>180

    Posted
    6 minutes ago, cag014 said:

    Wrong syntax, should be

    &AttialWork:valueModified>180

     

    The problem is true. I rewrited the line, and the error message i got.

    Posted
    4 hours ago, SmartLifeSystems said:

     

    @Rover, insert the line the onClock=true command. When for me doesn't work, I inserted this command. Since working fine.

     

    {0, "$24clock",{initOnStartup=false,state="value=0",onClock=true,timeSlot="?$sunsetHour-(60*60)?~",

          trueAct={ {"`Achtertuin`","turnOn"},{"`ZonneschermLicht`","turnOn","if {&ZonneschermActief:value=Ja}"},}}},

    TNX for the help  @SmartLifeSystems, I try your solution.

  • Topic Author
  • Posted (edited)

    in attached version two bugs fixed:

    1. The cosmetic problem found by @Rover (happens when jM line number identification replaced by device name)
    2. Error in calculations when using retrieved device value several time. {?@devID>value + @devID>value?

     

    Please login or register to see this attachment.

    Edited by cag014
    Posted
    8 hours ago, cag014 said:

    in attached version two bugs fixed:

    1. The cosmetic problem found by @Rover (happens when jM line number identification replaced by device name)
    2. Error in calculations when using retrieved device value several time. {?@devID>value + @devID>value?

     

    Please login or register to see this attachment.

     

    Yes. I thinked I don't understand something, because the onClock=true command has solved for me this problem.

    Posted

    This night again problems with $24clock: 

    Please login or register to see this spoiler.

    So nothing happened at 3:15 and 3:19.

     

    {0, "$24clock",{state="value=02:55",onClock=true, trueAct={

    {"$lineId","setTimeSlot","?3:00+(random(0,`RandomMaxTijd`)*60)?~","{$24clock:value=02:55}"},

    {"`XRandomLichten`","setGlobal","stop","{$24clock:value>02:58}"}, 

    {"RandomLichten","sendEmail,2","Stop randomlichten regulair","{$24clock:value>02:58}"},

    {"`RandomLichten`","turnOff","{$24clock:value>02:58}"}}}}, 

    {0, "$24clock",{state="value=02:55",onClock=true, trueAct={

    {"$lineId","setTimeSlot","?3:00+(random(0,`RandomMaxTijd`)*60)?~","{$24clock:value=02:55}"},

    {"Randomlichten","sendEmail,2","Randomlichten uit tussen 3:00 en 4:00"},}}}, 

     

  • Topic Author
  • Posted
    3 hours ago, Rover said:

    This night again problems with $24clock: 

    Please login or register to see this spoiler.

    Let me understand... the timeSlot has set to 3:15 and 3:19, but nothing executed at these times, correct?

    If so then there is nothing wrong with $24clock (it has been executed), but maybe something wrong on timeSlot.

    Have set same lines on my system to monitor that....

    Posted
    1 hour ago, cag014 said:

    Let me understand... the timeSlot has set to 3:15 and 3:19, but nothing executed at these times, correct?

    If so then there is nothing wrong with $24clock (it has been executed), but maybe something wrong on timeSlot.

    Have set same lines on my system to monitor that....

     

    Yes, correct.

    There were troubles with calculations in timeslot before.

    Interesting that it works one night and does not work another night.

    Posted
    On 1/6/2021 at 6:36 PM, cag014 said:

    Wrong syntax, should be

    &AttialWork:valueModified>180

     

    With this problem have you any idea?

    Posted

    So, yesterday @Rover's problem happened to me too. I'am testing now, the AOQv9.6.

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