AboutBlogContact

Actions

What are actions?

What it's all about?

Actions are best way to made some simple core automations inside of your controller. With them its possible to made some cricital automations inside of your boneIO Black.

To make it easy i will give you some example and will describe it:

- id: IN_01_living_room1
   boneio_input: IN_01
   actions:
     single:
       - action: output
         pin: OUT_01_living_room_light_1
     double:
       - action: output
         pin: OUT_02_living_room_light_2
     long:
       - action: output
         pin: OUT_03_living_room_light_3
 - id: IN_02_living_room2
   boneio_input: IN_02
   actions:
     single:
       - action: output
         pin: OUT_04_living_room_light_4
     long:
       - action: output
         pin: OUT_01_living_room_light_1
         action_output: off
       - action: output
         pin: OUT_02_living_room_light_2
         action_output: off
       - action: output
         pin: OUT_03_living_room_light_3
         action_output: off
       - action: output
         pin: OUT_04_living_room_light_4
         action_output: off

What have we achived? By using just 2 buttons we can independly turn on 4 lights, an by single long click of one of them you can turn all of them off.

In the case of IN_01_living_room1 its really simple, we define each action fo each action type, in our case for single click Living room light 1 for double Living room light 2 and for long click Living room light 3. The default action for - action: output type its toogle So by simple click of the button you will change the state of light from on to off etc.

In the case of button 2 - IN_02_living_room2 with single click you will change state of Living room light 4. But intresting thing will happen if you long click that button. That will turn off all 4 defined lights in living room. There are many possibilities with actions! If you want to know more - please check documentation.