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
4 minutes ago, cag014 said:

If global not defined then is nil, means false. with one exception for dbgInitState, if not defined then set to true.

 

What do you think it should be set to if not defined?

 

By the way, for shortcut lovers, you can use shortcut for each level in jM line (case sensitive)

 

dbgInfo -> dIf

dbgTruestate -> dTs

dbgFalseSTate -> dFs

dbgInitState -> dIs

dbgCmdFalse -> dCf

 

for example - instead 

JM={{“motion”,{state=”true”,dbgInfo=false, dbgTrueState=true, trueAct={“light”,”turnOn”}}},}

you can use

JM={{“motion”,{state=”true”,dIf=false, dTs=true, trueAct={“light”,”turnOn”}}},}

 

At the moment I do not get any debug messages, just the init state messages. Also if i set dbgInfo =true in the AOQ parameters (where was a question), no debug messages are to be seen.

I think it should be set to if not defined as it was before, so all debug messages visible.

Shortcuts are nice.

Posted (edited)
12 hours ago, Rover said:

I think you have to set the global debugging parameters in the AOQ parameters?

What is the default value of the debugging parameters (value if not defined globally)?

@cag014 

I think there is something wrong when global level is not defined at all. 

Wow, during initialization, I noted a huge difference to previous versions. Indeed trueActState (probably others too) are considered and action are not executed. I so  few other commands executed after   jM{} states validation... is shown. I assume these lines are affected by other lines that executed commands during init stage and some devices states have been changed.

Edited by AR27690
  • Topic Author
  • Posted (edited)

    @AR27690, @Rover

    Guys, you're absolutely right, something strange going on when not defined.

    Attached version includes redefinition for levels to true (as suggested by @Rover) if not defined at all

     

    Please login or register to see this attachment.

     

     

    Another change per user's request, when conditions failed then instead of "-> no actions" shown "" sign. Seems like it makes it easy to identify lines where conditions are not met.

     

    Again, let me know if it works

     

    Thanks for your time and patience 

    Edited by cag014
    • Thanks 2
    Posted
    11 hours ago, cag014 said:

    @AR27690, @Rover

    Guys, you're absolutely right, something strange going on when not defined.

    Attached version includes redefinition for levels to true (as suggested by @Rover) if not defined at all

     

    Please login or register to see this attachment.

     

     

    Another change per user's request, when conditions failed then instead of "-> no actions" shown "" sign. Seems like it makes it easy to identify lines where conditions are not met.

     

    Again, let me know if it works

     

    Thanks for your time and patience 

    initial: works!

    dbgInfo checked: works!

    • Thanks 1
    Posted

    Yes, works here also....

    Posted

    Hi @cag014 I downloaded AOS 8.6 to try and find whatever is causing a random 503 error and I'm running this scene as is (without any changes) just to monitor and to identify z-wave “dead” and/or NACK occurrences.

     

    Please see below the output:

    Please login or register to see this spoiler.

    I don't see any reported problems. Is my interpretation correct that no errors have thus far been reported or am I missing something?

  • Topic Author
  • Posted
    12 hours ago, nicopret said:

    Hi @cag014 I downloaded AOS 8.6 to try and find whatever is causing a random 503 error and I'm running this scene as is (without any changes) just to monitor and to identify z-wave “dead” and/or NACK occurrences.

     

    Please see below the output:

    Please login or register to see this spoiler.

    Please wait a while m I would say couple of hours at least,

    Please note - The table refreshed every 5 minutes (by default) or you can refresh it manually by pressing button Refresh (in AOS it appears instead of Clear button) 

    Posted

    HI cag,

     

    I have a question for you. I have a line.

     

    {0"`gardenTemp`",{state="value>17",timeSlot="m=10;06:30~21:28",trueAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,21","","{&LivingroomThermostat:value>19.5}"},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","21","{&LivingroomThermostat:value<>21}"}},falseAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,22","","{`diningThermostat`:heatingThermostatSetpoint<>22|&LivingroomThermostat:value<>19.5}"},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","22","{&LivingroomThermostat:value<>22|&LivingroomThermostat:value<>19.5}"}}}},

     

    Everything when the AOQ is restarted, the falseAct line is runing, but the timeSlot is --timeSlot="m=10;06:30~21:28"--

     

    What do you think, what is the problem?

  • Topic Author
  • Posted (edited)
    1 hour ago, SmartLifeSystems said:

    HI cag,

     

    I have a question for you. I have a line.

     

    {0"`gardenTemp`",{state="value>17",timeSlot="m=10;06:30~21:28",trueAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,21","","{&LivingroomThermostat:value>19.5}"},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","21","{&LivingroomThermostat:value<>21}"}},falseAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,22","","{`diningThermostat`:heatingThermostatSetpoint<>22|&LivingroomThermostat:value<>19.5}"},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","22","{&LivingroomThermostat:value<>22|&LivingroomThermostat:value<>19.5}"}}}},

     

    Everything when the AOQ is restarted, the falseAct line is runing, but the timeSlot is --timeSlot="m=10;06:30~21:28"--

     

    What do you think, what is the problem?

    The time slot ignored during initialization - to set the device in the correct state.

    You can disable initialization by setting global or command to false - like that:

    1. initOnStartup=false
    2. ,falseAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,22","","{`diningThermostat`:heatingThermostatSetpoint<>22|&LivingroomThermostat:value<>19.5}", false},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","22","{&LivingroomThermostat:value<>22|&LivingroomThermostat:value<>19.5}", false}

     

     

    That's interesting situation... is anyone has an idea what will be better, to ignore timeSlot or not?

     

    Edited by cag014
  • Topic Author
  • Posted (edited)

    @SmartLifeSystems

    My bad... there is another option to avoid falseACt{} execution by defining specific initAct{} table. In your case something like that:

    initAct={"","debug","No action taken"}

    Edited by cag014
    Posted
    3 hours ago, cag014 said:

    The time slot ignored during initialization - to set the device in the correct state.

    You can disable initialization by setting global or command to false - like that:

    1. initOnStartup=false
    2. ,
      2 hours ago, cag014 said:

      @SmartLifeSystems

      My bad... there is another option to avoid falseACt{} execution by defining specific initAct{} table. In your case something like that:

      initAct={"","debug","No action taken"}

     

     

    That's interesting situation... is anyone has an idea what will be better, to ignore timeSlot or not?

     

     

    How can I put this initAct table?

  • Topic Author
  • Posted
    1 hour ago, SmartLifeSystems said:

     

    How can I put this initAct table?

    As I understand you don't want to execute falseAct{}, right?

    Posted
    1 hour ago, cag014 said:

    As I understand you don't want to execute falseAct{}, right?

     I do, but only in timeSlot. This line it worked in the past.

  • Topic Author
  • Posted (edited)
    4 hours ago, SmartLifeSystems said:

     I do, but only in timeSlot. This line it worked in the past.

    There is no change on execution of trueAct or falseAct{} tables on startup 

    The initialization done also at the beginning of the timeSlot (every beginning). Maybe that's the reason that you saw the initialization....

     

    Anyhow, I do suggest adding false parameter at the end of each command in falseAct{} table. It means, that on startup, the initialization won't work (as you need) and at the beginning of the  timeSlot  initialization will be executed for this line (in your case falseAct). Exactly what you need 

     

     falseAct={{"`livingRoomThermostat`|`livingRoomThermostat1`|`diningThermostat`|`bathRoomThermostat`","setHeatingThermostatSetpoint,22","{`diningThermostat`:heatingThermostatSetpoint<>22|&LivingroomThermostat:value<>19.5}", false},{"&LivingroomThermostat|&BathroomThermostat","setGlobal","22","{&LivingroomThermostat:value<>22|&LivingroomThermostat:value<>19.5}", false}

     

     

    Edited by cag014
    Posted (edited)
    14 hours ago, cag014 said:

     

    That's interesting situation... is anyone has an idea what will be better, to ignore timeSlot or not?

     

    Since there are many options to avoid initialization, on startup ignore timeSlot (as delay time ignored too).

    By ignoring timeSlot, the code sets the devices to  "known" state.

    Edited by AR27690
    • 2 weeks later...
  • Topic Author
  • Posted (edited)

    Hi again,

    Attached version includes 

    Bug fix

    • LED status does not display
    • "when" statement defined in action state does not work             trueActState="when {`wallSW`=true}"
    • When statement includes or conditions, only passed condition displayed.

    New features

    Now inside statement no need to define value for all types of devices. Previous "{`wallSW`:value=true}"  Current   {`wallSW`=true}. Any other property should be defined as before

    • added $newSw and $newBeta  availability values true/false
    • added $initMode (true/false) . During initialization $initMode=true, so you can perform actions accordingly. 
    • added extra debug level:  dbgCmdTrue ("dCt"). Now if dbgTrueState=false, the executed commands still could be seen using dbgCmdTrue=true
    • added an option to set timer, means you can set/change same timer in different lines by different devices. Very useful if you've few sensors which controls the same devices. Like to turn off lights 

      for example:

    {"`motion1`,{state="true", trueAct={"`lights`,"turnOn"}, falseAct("`lights`,"turnOff", "timer1,300"}}}, means when motion1 back to safe, turn OFF the lights after 300 seconds.

    {"`motion2`,{state="true", trueAct={"`lights`,"turnOn"}, falseAct("`lights`,"turnOff", "timer1,300"}}}, means when motion2 back to safe, turn OFF the lights after 300 seconds. Re-set the timer

     Now the lights will turn OFF by the last sensor that back to safe.

    You can define as many timers as you need, but keep the syntax timerXXXX,(seconds). You can define names also like timerGPS,100

    Use proper names for timers to keep it easy to remember.

    to cancel the timer, set the timer to zero. timerGPS,0 - will cancel the timer and the command won't be executed.

     

    Major "face lifting" for debug information (feels and looks like code) 

    Please try it before release.

     

    Please login or register to see this attachment.

     

    Please backup your working code 😀

    Let me know if it works and looks better. Your feedback appreciated.

     

    Edited by cag014
    • Like 1
    Posted (edited)

    Hi! I'm trying to run scene several times a day with checking one singe condition but nothing happening:

     

    quickCondition = true
    quickConditionStr = (quickCondition and '&alwaysZero:value=0' or '&alwaysZero:value>0')

    ...

     

    {0,"$blank",{
    timeSlot="18:10~18:15, 19:30~19:31, 20:40~20:41, 21:07~21:08, 22:00~22:01, 23:30~23:31",
    trueAct={
    {"_55","startScene", quickConditionStr}
    }
    }}

     

    What I'm doing wrong?

    Edited by hellower
  • Topic Author
  • Posted (edited)

    I am trying to understand your definition and that's what looks like you did

    {true and '&alwaysZero:value=0' or '&alwaysZero:value>0')

    First of all, the entire statement should be in double quotes and not parts of conditions.  When using or conditions the statements between should be within brackets {} or {}.

    The and conditions used in the same brackets {... and ... and ...} or {.... and ... }

    Another question, what do you mean just by true?

    Please tr as below

    ("_55","startScene", "{&alwaysZero:value=0} or {y &alwaysZero:value>0}"

    By the way in case your property is value you can skip that

    ("_55","startScene", "{&alwaysZero=0} or {&alwaysZero>0}"

     

    Still don't understand where/why you are using Boolean true?

    May I suggest shorter option

    ("_55","startScene", "{&alwaysZero>-1}"

     

     

     

    Edited by cag014
    Posted

    Looks just great!!! More understandable.

    Have user the timer option - thanks solved some issues with my three motion sensors in hallway.

    Any chance to have same option in AOS (for HC2 )?

     

  • Topic Author
  • Posted (edited)
    32 minutes ago, AR27690 said:

    Looks just great!!! More understandable.

    Have user the timer option - thanks solved some issues with my three motion sensors in hallway.

    Any chance to have same option in AOS (for HC2 )?

     

    Have user the timer option - thanks solved some issues with my three motion sensors in hallway.

    Hopefully you have condition to turn OFF the hallway lights (If that what I think you do) only when all sensors are safe "{'ms1','ms2','ms3'=false}". 

    Using timer solves the issue of using delay when one of the sensors back to safe.

     

    Any chance to have same option in AOS (for HC2 )?

    Working on that (including same debug view)

    Edited by cag014

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