Scenes “I am home”, “I am leaving”
Example: Scenes “I am home”, “I am leaving”
KNX specific configuration in Logic Machine
- Connect to Logic Machine (Logic Machine) with default access parameters (IP: 192.168.0.10; login/password: admin/admin)
![logic_machine_main_screen Logic machine visualization main screen](https://openrb.com/wp-content/uploads/2011/10/logic_machine_main_screen.png)
Create “Scene Away” script
- In scripting tab click on the Even-based button, then Add new script. In this example the script will be run each time when KNX group address 2/2/2 is activated (push button on 2/2/2 is pressed)
![add_script_away Even-based script Logic Machine](https://openrb.com/wp-content/uploads/2011/10/add_script_away.png)
- After you have saved the script, click on the icon in Editor column to enter into scripting redactor. Using built-in scripting code snippets on the left side its easy to find the one which fits this case – write specific value in group addresses responsible for switching on/off floor heating in two bathrooms. Also IF-ELSE conditional is used to check the state of the windows, if opened then beep on the ABB touch screen.
![scene_Away Scene Away KNX Logic Machine](https://openrb.com/wp-content/uploads/2011/10/scene_Away.png)
Note that you can use binary 0 or 1 instead of true or false for boolean objects.
Create “Scene Home” script
- Add similar script with opposite values and necessary objects
![scene_home Scene Home KNX Logic Machine](https://openrb.com/wp-content/uploads/2011/10/scene_home.png)
- Activate both scripts by clicking on the RED circle on the right of each particular script (if it’s not done yet)
![even_based_scripts Even based scenes Logic Machine](https://openrb.com/wp-content/uploads/2011/10/even_based_scripts.png)