top of page

Rules 

Openhab gives the possiblity to create rules. Rules is what makes a smart home even smarter. (https://www.openhab.org/docs/configuration/rules-dsl.html).

To make these rules you first have to create the file:

  • open vs code (see menu Openhabian for instructions on how to install)

  • In vs code open map rules

  • create new file {yourname}.rules

  • the map rules can contain multiple .rules files, so you can specify your rules by making different files

​

​

Waking up rule

In the morning I like a relaxing wake up. The music starts playing and gradually increase in volume as does the lighting. This is how ny rule to do this looks like:

Time rule for kitchen appliance

As I take a shower, my toast/tosti can already be made. This is done using the TP-Link plug, a timer, and a time limit. The rule looks like this:

Motion detection rule

In certain rooms, there is no specific time when I enter. Instead I use the motion sensors to activate the lighting. When I enter, the motion sensor detects movement and sends this to the lights, which will then turn on. This is how I programmed it in vs-code:

Attandance rule

In order to activate the security system, I need to show the house that I am not there. I will be doing this by showing connection with my phone, as I don't leave my house without it. This is done using the network binding, which searches for the phones IP on the network. This is how I programmed that rule: 

bottom of page