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

it is ok Cag014 i found the setColor command and sent setColor 0,0,0,255 which achieves the same result .

slowly converting as many scenes as i can onto the All in one scene ;)

Link to comment
Share on other sites

  • Topic Author
  • Great.. let me know if you have any issues or questions

    By the way if you need to set variable levels, you can include formula in any value. Have used your global variable as an example.

    Please login or register to see this code.

     

    Edited by cag014
    Link to comment
    Share on other sites

  • Topic Author
  • Lua math library supported as well. like math.max() math.floor() and etc.

    To use math library, just type the math name only . like max()  floor().

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    hi cag014,

    me again ! ;)

          when `frontdoor` is opened and `frontdoor` is NOT armed do this...............

    but when `frontdoor` is opened AND is armed do this ........

    how do i apply this in all in one scene please?

     

    also i wish to have my kitchen under unit leds come on whenever anyone enters kitchen but my kitchen light and pelmet lights on if someone enters one hour before sunset and till sunrise, hopefully stay on for ten minutes when kitchen empties

     

    hope you understand what i mean?

     

    thanks for your help

    Link to comment
    Share on other sites

  • Topic Author
  • OK.. for frontdoor you can use conditions parameter with property armed (armed=true or armed=false):

    Please login or register to see this code.

    Please replace <devList> and <action> according to your needs.
     

    Now regarding kitchen lights, if I understand correctly you want to turn ON kitchen and pelmet lights for 10 minutes (if no one presents) during one hour before sunset till sunrise. If so, then use :

    Please login or register to see this code.

    Please defined ktnMS as kitchen sensor, ktnLights as kitchen light, pltLights as pelmet lights

    Edited by cag014
    Link to comment
    Share on other sites

    On 2/2/2020 at 2:14 AM, cag014 said:

    @vmation.virgin sorry for late response, was on vacation.

    Here is the configuration for you:

    1. Define your wall-plug ID to make jM line more readable.

    (replace number 424 to your device ID and name to whatever suit you)

    jS2n={wPlug=424}

     

    2. Define/add follow line in you jM hash table:

    Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2020_02/image.png.bfdca279a265e41f611826b56ef8d45a.png" />

     

    it's working?,   now to control the duration of on/off , have to adjust  valueModified>5390 ""valueModified>1785"?.  and whats the no "30" for in the beginning?.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 6 hours ago, vmation.virgin said:

    whats the no "30" for in the beginning?.

    It means, the line runs in loop of 30 minutes. Every 30 minutes timeLoopAct{} array executed.

    Link to comment
    Share on other sites

    hi cag014,

    The line below announces through my alexa that the front door has been opened:-

    {0,"`front`",{state="value=true",trueAct={"&keydata","setGlobal","8b38308d7188445fa4c55f3b1b9e464e"}}}

    `front¬ being the front door sensor

    the global value keydata is set to a token key and alexa speaks the announcement the key dictates,this works fine. my question is can i have the system check if the door sensor is armed and if so not announce the message and send a different token key

     

    Thanks for your time

    Link to comment
    Share on other sites

    hi cag014

    Please login or register to see this code.

    Please replace <devList> and <action> according to your needs.

    i am not sure how to add my global into the example you sent me.im missing something i know?

    thanks for your help

     

    Link to comment
    Share on other sites

  • Topic Author
  •  

    Here below an example to set global keydata with token when front door is open and armed.

    Please login or register to see this code.

    Set the second command with token when frontdoor is not armed

     

     

     

    Link to comment
    Share on other sites

    Just now, cag014 said:

     

    Here below an example to set global keydata with token when front door is open and armed.

    Please login or register to see this code.

    Set the second command with token when frontdoor is not armed

     

     

     

    works so well thank you !

    i put & in front of the keydata to show its a global variable did i have to do that?

     

    Link to comment
    Share on other sites

  • Topic Author
  • 2 minutes ago, magicman said:

    works so well thank you !

    i put & in front of the keydata to show its a global variable did i have to do that?

     

    It works with and without

    Link to comment
    Share on other sites

    hi Cag01,

    still busy converting scenes :)

    i have another question

    i have to set a global value then 10 minutes later , reset it

     

    set global value to turn alexa speech off........wait ten minutes......turn alexa speech back on this is done using a global variable , its just the timing i dont now how to do (sleep 3600) etc?

     

    thanks again

     

    Link to comment
    Share on other sites

  • Topic Author
  • 5 hours ago, cag014 said:

     

    Is it in the same line? What your reset value? When you need to reset, I mean if front door open and armed?

    Example below resets global value always.

    Please login or register to see this code.

    keydata will be set to value "speak" after front door has opened  in 10 minutes.

    Is it what you mean?

     

     

     

    Edited by cag014
    Link to comment
    Share on other sites

    hi Cag014

    at times i need alexa not to make announcements so i change a global variable from "speak" to "quiet", but after 10 minutes i need the reverse to happen the variable changed from "quiet" back to "speak". i use a fibaro button at present ID is 44.

    the global variable is alexaspeak

     

    Thank you for your help

    everytime is a light bulb moment ;)

    Link to comment
    Share on other sites

  • Topic Author
  • Please login or register to see this code.

    keydata will be set to value "speak" after front door has opened  in 10 minutes.

    Is it what you mean?

    Link to comment
    Share on other sites

    hi cag014,

     

    have transferred nearly all my scenes into AOS and all working well. would like to set my RGBW led to run a predefined program in a scene this would be …. fibaro:call(26."startProgram",5), can this be done in AOS cant see a command for it?

     

    Thanks Len

    Link to comment
    Share on other sites

  • Topic Author
  • Just start to use the command. AOS will verify if the action is valid and will execute it.

    Please note, parameter(s) should be part of command string separated by comma.

    Please login or register to see this code.

     

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