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


  • 0

Block scene: Increase level, only if light is already on


Question

Posted

Hi All, 

 

New Fibaro user, first time setting up Home center 3. So far inclusions and some basic block scenes are going well.

 

As a first step, I've decided to use block scenes and manual push buttons to get the home lighting up and running, currently no Lua experience

 

Generally, I have allocated 3 push buttons, TOP, MIDDLE, BOTTOM per room with the following functions:

TOP:         1 click  -  Lights level 3

TOP:         2 click -  Lights level 4

MIDDLE:   1 click -  Lights level 2

MIDDLE :  2 click -  Lights Level 1

BOTTOM: 1 click -  ALL OFF

 

As the lighting level drops from 4 to 1, certain lights turn off, and the remaining dim if capable. 

 

I have just noticed an output i could assign to the "HOLD" trigger, could "INCREASE LEVEL"

 

The problem i can see, is that if trigger 12: "HOLD" is activated while lights level 4 is active, then 8 lights need to increase brightness. 

But if trigger 12"HOLD" is activated while lights level 1 is running, then only 4 lights need to increase brightness. 

 

So using block scenes, I am essentially trying to get two "DO THE FOLLOWINGS", with both sharing the 1 input trigger, id 12 "HOLD:"

 

Would anyone please be able to share some lua code to say:  increase level of any of the following id's: 49, 54, 80, 85, 109, 110, 121, 156, 164, only if light is already ON? So would work if just 1, or all lights were on. but only increase dimiming of that 1 or all. 

 

sample code with adding one light on as a condition:

{

  conditions = { {

      id = 43,

      isTrigger = true,

      operator = "==",

      property = "sceneActivationEvent",

      type = "device",

      value = 2

    }, {

      id = 49,

      isTrigger = true,

      operator = "==",

      property = "state",

      type = "device",

      value = true

    } },

  operator = "all"

}

 

hub.call(49'startLevelIncrease')
hub.call(54'startLevelIncrease')
hub.call(80'startLevelIncrease')
hub.call(85'startLevelIncrease')
hub.call(109'startLevelIncrease')
hub.call(110'startLevelIncrease')
hub.call(121'startLevelIncrease')
hub.call(156'startLevelIncrease')
hub.call(164'turnOn')

 

Thank you, 

Mke

 

 

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

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