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
On 7/18/2023 at 9:50 PM, cag014 said:

Yes, the solution is trickier rather than complicated:

Please define necessary components (as an example or just use it)

global4local={false,gVarName="",varArray={pwrMode="init:idle"}} -- define local variable pwrMode

jS2n={MS1=430, MS2=345, lightSw=500} -- that's an example, please replace that with your real sensors and switch names and IDs

 

When one of the sensors detects motion, the lights turned ON and will be turned OFF 3 minutes after sensors back to safe. (Please change 180 seconds to your desired time)

 Now the tricky part. If you want to switch the lights manually, just make sure the lights are OFF (if the lights are ON, turn OFF by switch) and then turn the switch ON.  The lights will stay on until turned OFF by switch or after 2 hours (as you mentioned if the user forgot to switch it OFF). You can change the 7200 seconds to any other value.

In any case you need to make sure to turn OFF the lights, before it could be turned ON by switch (to set the &pwrMode to "idle")

Please login or register to see this code.

This scenario works fine on latest AOQ 17.2 Please download attached version before running. 

Please login or register to see this attachment.

This version will be released "officially" in a few days.

Hi @cag014,

After installing v17.2 next debugging info showed up, even with dbgInfo =false. 

How to stop this reporting?

Please login or register to see this spoiler.

 

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

    Hi @cag014,

    After installing v17.2 next debugging info showed up, even with dbgInfo =false. 

    How to stop this reporting?

    Oops, my bad... 

    Please download attached:

    Please login or register to see this attachment.

     

    • Thanks 1
    Posted
    14 hours ago, cag014 said:

    Oops, my bad... 

    Please download attached:

    Please login or register to see this attachment.

     

    TNX for the quick repair cag!

    Posted
    On 7/18/2023 at 9:50 PM, cag014 said:

    Please login or register to see this code.

    I have used this solution with a Fibaro dimmer and a Fibaro motion sensor. The latter can be configured to have a delayed true -> false for f.i. 3 minutes, so an extra timer is not necessairy. For a dimmer has the triggering to be changed from state="true" to state="value<>0".

    Please login or register to see this spoiler.

     

  • Topic Author
  • Posted (edited)
    On 8/19/2023 at 3:40 PM, Rover said:

    I have used this solution with a Fibaro dimmer and a Fibaro motion sensor. The latter can be configured to have a delayed true -> false for f.i. 3 minutes, so an extra timer is not necessairy. For a dimmer has the triggering to be changed from state="true" to state="value<>0".

    Please login or register to see this spoiler.

    Looks good, just change the timerLight,-1 to timerLight,x

    Edited by cag014
  • Topic Author
  • Posted

    @Rover

    By the way there is another new feature in this version.

    If you have too many lines in jM table (like I do), it is very difficult to find the line you want to change (at least it takes some time to found it), now you can open new files after user_data for specific scenarios.

    In example below I have added Boiler file for jM lines that taking care of boiler commands.

    Please note to add lines of the new files use:

    jM[#jM+1]={....................................}

     

    Please login or register to see this spoiler.

    Very helpful concept to maintain jM lines. You can add files as you need.

    During the startup you'll should see a message that the lines of the new files are added - like that:

    [19.08.2023] [00:30:00] [DEBUG] [AOQ101]: loading jM from boiler file(s)...

    Posted
    On 8/20/2023 at 4:28 PM, cag014 said:

    @Rover

    By the way there is another new feature in this version.

    If you have too many lines in jM table (like I do), it is very difficult to find the line you want to change (at least it takes some time to found it), now you can open new files after user_data for specific scenarios.

    In example below I have added Boiler file for jM lines that taking care of boiler commands.

    Please note to add lines of the new files use:

    jM[#jM+1]={....................................}

     

    Please login or register to see this spoiler.

     

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

    Hi @cag014,

    Indeed a very nice feature!

    But not yet without problem.

    Addition of one file is working O.K., but adding a second one shows an error with only one JM line:

    Please login or register to see this spoiler.

    Yes, this is a bug... thanks.

    Fixed...

    Please login or register to see this attachment.

    • Thanks 1
    Posted

    Hi @cag014,

    Now we know that it is possible to have more jM-blocks, is it also possible to have more jS2n{}-blocks in order to put a jS2n{}-block in a jM-block?

    In that way it is possible to isolate jM-lines with related device specifications. Then it is easy by commenting out dead (not present) devices, like not connected wall switches, and the related jM-lines.

    Then it would also be nice if:

    jM[#jM+1]={

    --[[

    jM line 1

    ..

    jM line x

    --]]

    }

    so an empty jM-block, would be legal and not an error.

  • Topic Author
  • Posted

    Why you need to include jS2n block in jM...

    There is no problem to continue to send commands to dead devices (of course the hub doesn't send any commands, so no real actions executed).

    Could you post a real -life example?

    Posted
    18 hours ago, cag014 said:

    Why you need to include jS2n block in jM...

    There is no problem to continue to send commands to dead devices (of course the hub doesn't send any commands, so no real actions executed).

    Could you post a real -life example?

    I have made myself not really clear: I do not want to include jS2n block in jM, but I should like to have a jS2n block + a jM block into one file. 

    F.i. I do have a experimental configuration with a set of devices and jM-lines communicating with this devices. After removing this configuration I need to remove the experimental devices from the jS2n block and the experimental jM-lines from the jM block. When these devices and jM-lines are bound into one file, only outcommenting all text of the file will remove the experiment.

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

    I have made myself not really clear: I do not want to include jS2n block in jM, but I should like to have a jS2n block + a jM block into one file. 

    F.i. I do have a experimental configuration with a set of devices and jM-lines communicating with this devices. After removing this configuration I need to remove the experimental devices from the jS2n block and the experimental jM-lines from the jM block. When these devices and jM-lines are bound into one file, only outcommenting all text of the file will remove the experiment.

    OK,,, so you want in extra files to have jS2n table also in addition to jM table.

    Sounds good request.

    Will do it.

    • Thanks 1
    Posted (edited)
    1 hour ago, cag014 said:

    OK,,, so you want in extra files to have jS2n table also in addition to jM table.

    Sounds good request.

    Will do it.

    TNX! Could you also make it possible to have an empty effective content in the file?

    jM[#jM+1]={

    --[[

    jM line 1

    ..

    jM line x

    --]]

    }

    so an empty jM-block, and jS2n-block, in the file would be legal and not an error.

    Or, a possibly impossible solution, to make an extra file active/inactive by choice.

     

    Edited by Rover
  • Topic Author
  • Posted
    2 hours ago, Rover said:

    TNX! Could you also make it possible to have an empty effective content in the file?

    jM[#jM+1]={

    --[[

    jM line 1

    ..

    jM line x

    --]]

    }

    so an empty jM-block, and jS2n-block, in the file would be legal and not an error.

    Or, a possibly impossible solution, to make an extra file active/inactive by choice.

     

    For empty entire jM block just do it as follows:

    --[[

    M[#jM+1]={

    jM line 1

    ..

    jM line x

     

    }

    --]]

    • Thanks 1
  • Topic Author
  • Posted

    @Rover

    Attached version includes the option to mark jM block as you requested. In addition, you can define jS2n and jP2n tables in your new files. Use same syntax as for jM lines

    jS2n[#jS2n+1]={newDev=100,....}

    jP2n[#jP2n+1]={luxLimit=100,....}

     

    Please take a look at attached user guide document also for more info about setTimer command.

    This version has a new feature, an option to set specific condition for specific device(s). Once this condition is set, it will be always verified when the command executed for this device regardless of other standard conditions.  See setCondition in the user guide.

    The first line in Advanced User Guide includes links to the newest features.

    Please also go through the document and read everything marked pink (background). There are some new minor features like dbgCalc debug level and etc.

     

    Please login or register to see this spoiler.

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • Like 2
    • Thanks 1
    Posted
    On 8/27/2023 at 11:58 PM, cag014 said:

    @Rover

    Attached version includes the option to mark jM block as you requested. In addition, you can define jS2n and jP2n tables in your new files. Use same syntax as for jM lines

    jS2n[#jS2n+1]={newDev=100,....}

    jP2n[#jP2n+1]={luxLimit=100,....}

     

    Please take a look at attached user guide document also for more info about setTimer command.

    This version has a new feature, an option to set specific condition for specific device(s). Once this condition is set, it will be always verified when the command executed for this device regardless of other standard conditions.  See setCondition in the user guide.

    The first line in Advanced User Guide includes links to the newest features.

    Please also go through the document and read everything marked pink (background). There are some new minor features like dbgCalc debug level and etc.

     

    Please login or register to see this spoiler.

    Very nice, cag! 👏

    • Thanks 1
    • 3 weeks later...
    Posted

    Hi @cag014 

     

    I am new the HC3 and giving your app a try but having a bit of an issue with the below line. Trying to set it up so that the light will tun on with motion but only between 16:00 and 08:00 when motion is detected: - 

     

    Please login or register to see this code.

     

    When it runs, I am getting this in the debug: - 

     

    Please login or register to see this code.

     

     

    I have also setup the jS2n table with the below and cannot get it to pick up the name. Guessing i am typing in something wrong somewhere when I try.

     

    Please login or register to see this code.

     

    If you could please point out where i am going wrong on these, that would be ace! 

     

    Also, on a separate note, I have a lot of RGBW strips using Fibaro RGBW 1 and 2 units and would like to find out how I can action the same as above but just with RGBW strips where only white would turn on.

     

    Any help would greatly be appreciated. 

     

    Thanks,

     

    Hal 

  • Topic Author
  • Posted (edited)

    Please notice that all commands and rules are case sensitive.

    instead, timeslot it should be timeSlot.

    Please login or register to see this code.

    Edited by cag014
  • Topic Author
  • Posted (edited)

    I have also setup the jS2n table with the below and cannot get it to pick up the name. Guessing i am typing in something wrong somewhere when I try.

     

    To use jS2n names you need to iclude the names within backquotes.

    Please login or register to see this code.

     

    {0, "`KitchenEBM`",{state="value=true",timeSlot="16:00~08:00",trueAct={"209","turnOn",""},falseAct={"209","turnOff","180"}}},

    Edited by cag014
    Posted

    Thanks for the reply on this. i will give this a go when i get home. 

     

    This was my bad for copy and pasting from your original post with the examples on: - 

    Please login or register to see this link.

     Noted for the future and will check the case going forward. 

     

    Thanks for your time on this and I will let you know if I need anything more. 

     

    Thanks again,

     

    Hal 

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