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


All-in-One Scene: How to do it Better


cag014

Recommended Posts

  • Topic Author
  • 11 hours ago, Mohamed Refaat said:

    My idea is to monitor it through another AOQ running on a seperate processor on the same site. It happens that I have multi processors on the same site, each has its own slaves and its own scenarios.
    So, my idea is to let them monitor each other in a redundant way through AOQ heartbeats to have a better overview about the sight in an automated way.

    That's fine and actual sounds the same as I suggested, but in your case you need same monitoring ability in AOQ as in AOR.

    I will add ability to monitor AOQ by AOR and another AOQ, in this case users that don't have other processor(s) on the same site could use AOR.

    But same question to you - if your gateway as you've mentioned, doesn't response then how other AOQ can monitor the activity of AOQ in the gateway?

    I believe in this case you'll receive a message that the gateway is not accessible. 

     

    Edited by cag014
    Link to comment
    Share on other sites

    19 hours ago, cag014 said:

    It's there as part of delay parameter. 

    See Device Control section.

    It might be explained somewhere else, but didn't find any reasonable paragraph for that. Any suggestion will be appreciated.

    In the AOQ Advanced User’s Guide I use regularly, no word "timer" is present. After downloading the last AOQ Advanced User’s Guide indeed the word "timer" is hidden in the sections ii. Device control, iii. Alarm control, iv. Emit Custom Event and vi. Scene control. 

    I suggest to add in all these sections: "param4: condition to execute the command [optional]. If condition is true the condition will be checked. If also in parameter 3 "timername=" has been added before delay, if condition is true the timer starts and at the end of the delay the same condition will be checked again. Please make sure to define unique timer name (timername) for actions."

     

    Please add in the AOQ Advanced User’s Guide a version number and/or a release date.

    Edited by Rover
    • Thanks 1
    Link to comment
    Share on other sites

  • Topic Author
  • On 3/14/2023 at 11:44 PM, Mohamed Refaat said:

    My idea is to monitor it through another AOQ running on a seperate processor on the same site. It happens that I have multi processors on the same site, each has its own slaves and its own scenarios.
    So, my idea is to let them monitor each other in a redundant way through AOQ heartbeats to have a better overview about the sight in an automated way.

    Ok, let's see if it works as you need.

    Download attached version:

     

    Please login or register to see this attachment.

     

    For example: on slave hub the AOQ ID is 101 and the name of slave hub is shc3.

    Now add jM line on main hub that will monitor the AOQ on slave hub:

        {3,"101'shc3",{timeLoopAct={"","tts","AOQ $name does not respond"}}},
     
    You can change the TTS command to any valid action.
    The maximum heartbeat rate is 2 minutes, but if your system performs many actions then the time is shorter.
    Let me now if it works.
     
    In addition, this version has "cosmetic" change, if any message by any other device displayed on the console, the AOQ will send full message to the console (not only partial message)
     
    Previous version:

    Please login or register to see this spoiler.

    Link to comment
    Share on other sites

    On 3/17/2023 at 11:25 PM, cag014 said:

    Ok, let's see if it works as you need.

    Download attached version:

     

    Please login or register to see this attachment.

     

    For example: on slave hub the AOQ ID is 101 and the name of slave hub is shc3.

    Now add jM line on main hub that will monitor the AOQ on slave hub:

        {3,"101'shc3",{timeLoopAct={"","tts","AOQ $name does not respond"}}},
     
    You can change the TTS command to any valid action.
    The maximum heartbeat rate is 2 minutes, but if your system performs many actions then the time is shorter.
    Let me now if it works.
     
    In addition, this version has "cosmetic" change, if any message by any other device displayed on the console, the AOQ will send full message to the console (not only partial message)
     
    Previous version:

    Please login or register to see this spoiler.

    Thankyou for the update. Unfortunately, implementation onsite will be onhold for some time and I wont be able to update/test this update soon.
    Anyways, Once I can test, I will update here with results and comments if any.

    • Thanks 1
    Link to comment
    Share on other sites

    Hi @cag014,

    It turns out that with the trigAll command, the "All" is a bit too much.

    Please login or register to see this spoiler.

     

    Link to comment
    Share on other sites

  • Topic Author
  • On 3/28/2023 at 12:52 PM, Rover said:

    It turns out that with the trigAll command, the "All" is a bit too much.

    Please login or register to see this spoiler.

    Edited by cag014
    • Thanks 1
    Link to comment
    Share on other sites

    On 3/31/2023 at 1:33 PM, cag014 said:
     

    If no state or property defined, then it triggers on any reported property.

    You can define in the state whatever property you need or to define actual property to trigger and then it triggers only this specific property for any value.

    for example:

    {"wallSwitch",{state="power>0", trigAll=true, trigAct={............}}},

    or

    {"wallSwitch",{property="power", trigAll=true, trigAct={............}}},

     

    There is a huge different between state and property definitions.

    If state defined and trigAll=true, then  trueAct{} and falseAct{} tables are triggered according to the state, while trigAct{} always triggered.

    If property defined then trueAct{} and falseAct{} tables are not triggered, only trigAct{} table triggered.

     

    By the way if you're using trigAct{} table you don't need to define trigAll =true. trigAct{} table executed regardless trigAll definition.

     

    With property and trigAct{} defined and without trigAll =true it works!

    Thank you for the explanation cag014 👍

    Again something to add with examples to the Advanced User Guide?

    Link to comment
    Share on other sites

    @cag014

    Could you consider to swap the order of the device description in the console?

    I mean, to display deviceName:ID:roomName instead of  roomName:ID:deviceName 

    Like below-

    Requested       [DEBUG] 15:06:40: jM{33} Out Door:918:Kitchen[true] ➯ turnOn {dStat)

    Instead             [DEBUG] 15:06:40: jM{33} Kitchen:918:Out Door[true] ➯ turnOn {dStat)
     

    Thanks

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, AR27690 said:

    @cag014

    Could you consider to swap the order of the device description in the console?

    I mean, to display deviceName:ID:roomName instead of  roomName:ID:deviceName 

    Like below-

    Requested       [DEBUG] 15:06:40: jM{33} Out Door:918:Kitchen[true] ➯ turnOn {dStat)

    Instead             [DEBUG] 15:06:40: jM{33} Kitchen:918:Out Door[true] ➯ turnOn {dStat)
     

    Thanks

    That's interesting request, as I understand it probably easier to identify the device, right?

    One question: is this request refers to the debug console? I don't think it's useful in data table or any other place.

     

    Any other users support this request?

    Edited by cag014
    Link to comment
    Share on other sites

    14 minutes ago, cag014 said:

    That's interesting request, as I understand it probably easier to identify the device, right?

    One question: is this request refers to the debug console? I don't think it's useful in data table or any other place.

    Yes, it is more convenient to identify devices and the change for debug console only... 

    Thank you

    Edited by AR27690
    Link to comment
    Share on other sites

  • Topic Author
  • On 4/4/2023 at 5:29 PM, AR27690 said:

    Yes, it is more convenient to identify devices and the change for debug console only... 

    Thank you

    Since I don't see any replies from other users about this change, I have set an option to define the displayed device description format on the console by the user.

    There is a new global parameter added to the user_data file -- devPrt.

    By default, the format will remain the same as have been shown today (even if the global not defined)

    Please add new global parameter to your user_data file according to your request:

    devPrt="name:id:rooom" or devPrt="name:rooom" 

     

    Please login or register to see this spoiler.

    The format could be defined at any order or combination and could include only partial data. 

    For example

    devPrt="name"  -- display only the name of the device.

    devPrt="name:id" -- display name and id of the device

    devPrt="name:room" --diaplay device and room names 

    devPrt=" id" --display only ID of the device

    devPrt="nameid"  -- display the name of the device including slave hub suffix (see details below)

    if want to use device names only (w/o ID)  but you have slave devices (other hub(s) defined) you might have same names on different hubs and that could be hard to identify which device it actually is, then you could use devPtr="nameid" or devPrt="nameid:room". In this case the device name will be accommodated with the suffix of the hub (same as device ID shown today "112'hc2")

    for example:

    If you have device called Motion on HC2 the device name shown Motion'hc2 and etc.

     

    Please note if unknown definition defined in devPrt then "XX" will be shown instead to indicate on the issue.

    devPrt="name:test" will be shown as Motion:XX

     

    Please download attached file

    Please login or register to see this attachment.

     

    Edited by cag014
    • Thanks 1
    Link to comment
    Share on other sites

    • 2 weeks later...

    Hi can anyone help me to update to last version ?

     

    I copy the code after "ADVANCED USER CONFIGURABLE PARAMETERS"

     

    And gives me this error:

     

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    Hi @cag014,

    Please login or register to see this spoiler.

    Why sendEmail is init disabled while initOnStartup=true? Why is falseAct not init disabled?

    Link to comment
    Share on other sites

    Hi does anyone can help me how i can add one more VMC step:

     

    VMC steps are: 
    20 - scheduled speed for morning (07:00~12:00) and afternoon (16:00~21:00). Set VMC to zero at any other time if VMC speed is 20.
    40 - if lights turn ON in kitchen or any bathroom and VMC speed is 20. When all lights Off before 3 minutes, set VMC to 20 after 5 minutes while VMC speed is 40
    60 - if lights are on over 3 minutes in kitchen or any bathroom  and VMC speed below 60. When all lights Off, set VMC to 20 after 15 minutes while VMC speed is 60
    60 - if humidity in any bathroom over 69% and below 80% and VMC speed below 60. Set VMC to 20 when humidity below 70% at all bathrooms

    80- If humidity in any bathroom over 79% and below 90%. Set VMC to 60 when humidity below 80% at all bathrooms.
    99 - if humidity in any bathroom over 89%. Set VMC to 80 when humidity below 90% at all bathrooms.

     

    About the kitchen light i send a veritable to 0 when of and 1 when on, its possible to do like this ?

     

     

     

     

    --========================== USER CONFIGURABLE PARAMETERS 
    --==== GPS mobile to name 
    gpsDevice={["999"]="UserName"} 
    --=== jSon Parameters to number
    jP2n={minHum=20,maxHum="?`minHum`+60?",vmc1=20,vmc2=40,vmc3=60,vmc4=80,vmc5=99}

    --=== jSon String to name
    jS2n={qubino=1147, ktLT=554, bathLT1=56, bathLT2=62, bathLT3=347, bathLT4=207,
        bathHum1=51, bathHum2=66, bathHum3=143, bathHum4=213,
    }

    --=== jSon Main actions table 

    jM={ {"`qubino`",{state="`vmc1`",lineState="if{$24clock:value=21:00~06:59} or {$24clock:value=12:00~13:59}",
          trueAct={"`qubino`","setValue,0"}}},
      
    {0.5,"`qubino`",{state="`vmc2`",
          lineState="if {`bathLT1`,`bathLT2`,`bathLT3`,`bathLT4`,`ktLT`:valueModified>180}",
          timeLoopAct={"`qubino`","setValue,`vmc1`;else;setValue,`vmc3`","if{$isFalse:value=?@`bathLT1`>value+@`bathLT2`>value+@`bathLT3`>value+@`bathLT4`>value+@`ktLT`>value?}"}}},

    {5,"`qubino`",{state="`vmc3`",
          lineState="if {`bathLT1`,`bathLT2`,`bathLT3`,`bathLT4`,`ktLT`:valueModified>180}",
          timeLoopAct={"`qubino`","setValue,`vmc1`","if{$isFalse:value=?@`bathLT1`>value+@`bathLT2`>value+@`bathLT3`>value+@`bathLT4`>value+@`ktLT`>value?}"}}},
    {5,"`qubino`",{state="`vmc4`", timeLoopAct={"`qubino`","setValue,`vmc3`","if {`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<69}"}}},
      
    {5,"`qubino`",{state="`vmc5`",timeLoopAct={"`qubino`","setValue,`vmc4`","if {`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<85}"}}},
      
    {"`qubino`",{initOnStartup=false,state="value=300",lineState="if {`qubino`:value<`vmc2`}",timeSlot="true07:00, false12:00",
          trueAct={"`qubino`","setValue,`vmc1`"},falseAct={"`qubino`","setValue,0"}}},

     {"`qubino`",{initOnStartup=false,state="value=300", lineState="if {`qubino`:value<`vmc2`}", timeSlot="true16:00, false21:00",
          trueAct={"`qubino`","setValue,`vmc1`"},falseAct={"`qubino`","setValue,0",}}},
      
    {"`bathLT1` and `bathLT2` and `bathLT3` and `bathLT4` and `ktLT`",{lineState="if {`qubino`:value<`vmc3`}", state=">0",
          trueAct={"`qubino`","setValue,`vmc2`"}}},
      
    {"`bathHum1` and `bathHum2` and `bathHum3` and `bathHum4`",{ trigAll=true, state=">69",
          trueAct={"`qubino`","setValue,`vmc4`;else; setValue,`vmc5`","if{`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<86}"}}}, 
      

    {0, "$RAM",{state=">85",trueAct={{"RAM>85%","sendNote","Warning. \nSystem memory is $RAM% ",true},{"|$lineId|","setStateValue","80"}},falseAct={{"|$lineId|","setStateValue","85"},{"RAM<80%","sendNote","System memory is $RAM%"}}}},
    {0, "$HC2onLine",{state="true",trueAct={"","tts","$dayTime, Home center is on line","{$24clock:value=?$sunriseHour+7200?~?$sunsetHour+3600?}{$24clock:value=?$sunsetHour+3600?~?$sunriseHour+7200?}"},falseAct={"","tts","$dayTime, Home center is off line"}}}, 
    {0, "$internet",{state="online",trigAct={"","tts","$dayTime, Internet is $internet"}}}, ics
    }

    Link to comment
    Share on other sites

    Hi @cag014,

    This use of timeslot hangs the initiation of AOQ:

    Please login or register to see this spoiler.

    Does there exist a working way of using time in a conditional way?

    Link to comment
    Share on other sites

    7 hours ago, Rover said:

    Hi @cag014,

    This use of timeslot hangs the initiation of AOQ:

    Please login or register to see this spoiler.

    I saw it was an AOQ crash: [25.04.2023] [09:22:00] [ERROR] [QUICKAPP387]: user_data.lua:239: '}' expected near '10'

    Link to comment
    Share on other sites

    On 4/24/2023 at 10:15 AM, Jurassik said:

    Hi does anyone can help me how i can add one more VMC step:

     

    VMC steps are: 
    20 - scheduled speed for morning (07:00~12:00) and afternoon (16:00~21:00). Set VMC to zero at any other time if VMC speed is 20.
    40 - if lights turn ON in kitchen or any bathroom and VMC speed is 20. When all lights Off before 3 minutes, set VMC to 20 after 5 minutes while VMC speed is 40
    60 - if lights are on over 3 minutes in kitchen or any bathroom  and VMC speed below 60. When all lights Off, set VMC to 20 after 15 minutes while VMC speed is 60
    60 - if humidity in any bathroom over 69% and below 80% and VMC speed below 60. Set VMC to 20 when humidity below 70% at all bathrooms

    80- If humidity in any bathroom over 79% and below 90%. Set VMC to 60 when humidity below 80% at all bathrooms.
    99 - if humidity in any bathroom over 89%. Set VMC to 80 when humidity below 90% at all bathrooms.

     

    About the kitchen light i send a veritable to 0 when of and 1 when on, its possible to do like this ?

     

     

     

     

    --========================== USER CONFIGURABLE PARAMETERS 
    --==== GPS mobile to name 
    gpsDevice={["999"]="UserName"} 
    --=== jSon Parameters to number
    jP2n={minHum=20,maxHum="?`minHum`+60?",vmc1=20,vmc2=40,vmc3=60,vmc4=80,vmc5=99}

    --=== jSon String to name
    jS2n={qubino=1147, ktLT=554, bathLT1=56, bathLT2=62, bathLT3=347, bathLT4=207,
        bathHum1=51, bathHum2=66, bathHum3=143, bathHum4=213,
    }

    --=== jSon Main actions table 

    jM={ {"`qubino`",{state="`vmc1`",lineState="if{$24clock:value=21:00~06:59} or {$24clock:value=12:00~13:59}",
          trueAct={"`qubino`","setValue,0"}}},
      
    {0.5,"`qubino`",{state="`vmc2`",
          lineState="if {`bathLT1`,`bathLT2`,`bathLT3`,`bathLT4`,`ktLT`:valueModified>180}",
          timeLoopAct={"`qubino`","setValue,`vmc1`;else;setValue,`vmc3`","if{$isFalse:value=?@`bathLT1`>value+@`bathLT2`>value+@`bathLT3`>value+@`bathLT4`>value+@`ktLT`>value?}"}}},

    {5,"`qubino`",{state="`vmc3`",
          lineState="if {`bathLT1`,`bathLT2`,`bathLT3`,`bathLT4`,`ktLT`:valueModified>180}",
          timeLoopAct={"`qubino`","setValue,`vmc1`","if{$isFalse:value=?@`bathLT1`>value+@`bathLT2`>value+@`bathLT3`>value+@`bathLT4`>value+@`ktLT`>value?}"}}},
    {5,"`qubino`",{state="`vmc4`", timeLoopAct={"`qubino`","setValue,`vmc3`","if {`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<69}"}}},
      
    {5,"`qubino`",{state="`vmc5`",timeLoopAct={"`qubino`","setValue,`vmc4`","if {`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<85}"}}},
      
    {"`qubino`",{initOnStartup=false,state="value=300",lineState="if {`qubino`:value<`vmc2`}",timeSlot="true07:00, false12:00",
          trueAct={"`qubino`","setValue,`vmc1`"},falseAct={"`qubino`","setValue,0"}}},

     {"`qubino`",{initOnStartup=false,state="value=300", lineState="if {`qubino`:value<`vmc2`}", timeSlot="true16:00, false21:00",
          trueAct={"`qubino`","setValue,`vmc1`"},falseAct={"`qubino`","setValue,0",}}},
      
    {"`bathLT1` and `bathLT2` and `bathLT3` and `bathLT4` and `ktLT`",{lineState="if {`qubino`:value<`vmc3`}", state=">0",
          trueAct={"`qubino`","setValue,`vmc2`"}}},
      
    {"`bathHum1` and `bathHum2` and `bathHum3` and `bathHum4`",{ trigAll=true, state=">69",
          trueAct={"`qubino`","setValue,`vmc4`;else; setValue,`vmc5`","if{`bathHum1`,`bathHum2`,`bathHum3`,`bathHum4`:value<86}"}}}, 
      

    {0, "$RAM",{state=">85",trueAct={{"RAM>85%","sendNote","Warning. \nSystem memory is $RAM% ",true},{"|$lineId|","setStateValue","80"}},falseAct={{"|$lineId|","setStateValue","85"},{"RAM<80%","sendNote","System memory is $RAM%"}}}},
    {0, "$HC2onLine",{state="true",trueAct={"","tts","$dayTime, Home center is on line","{$24clock:value=?$sunriseHour+7200?~?$sunsetHour+3600?}{$24clock:value=?$sunsetHour+3600?~?$sunriseHour+7200?}"},falseAct={"","tts","$dayTime, Home center is off line"}}}, 
    {0, "$internet",{state="online",trigAct={"","tts","$dayTime, Internet is $internet"}}}, ics
    }


     

     

    hi Guys no help on this ? 🥲

    Edited by Jurassik
    Link to comment
    Share on other sites

    On 3/14/2023 at 4:00 PM, Rover said:

    Yes, this is the functionality I have needed 😀. (Would you add this to the AOQ Advanced User’s Guide?)

    I looks like there is still a problem:

    Please login or register to see this spoiler.

     

    Link to comment
    Share on other sites

  • Topic Author
  • Guys, 

    sorry was in Sheffield (England) for two weeks... watching World Snooker Championship.

    Will try to answer on your questions ASAP. 

    Edited by cag014
    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...