Event & Rule Matrix

Hi there,
I thought it would be nice to have a List or Table or Matrix of how events will work together.
But I can’t do it on my own. I don’t know how all combinations should behave.

So far I searched in the forum and copied some basics


Possible triggers

Items triggered through UI/ external call:

Switch  MyItem "my item name"
Switch  MyItem "my item name" {autoupdate="false"}
Group:Dimmer:MAX gMyItems "group of my items"

Rules executing code

sendCommand(MyItem,ON)
sendCommand(MyItem,100)
sendCommand(MyItem,"ON")
sendCommand(gMyItems ,ON)
sendCommand(gMyItems ,100)
sendCommand(gMyItems ,"ON")
postUpdate(MyItem,ON)
postUpdate(MyItem,100)
postUpdate(MyItem,"ON")
postUpdate(gMyItems ,ON)
postUpdate(gMyItems ,100)
postUpdate(gMyItems ,"ON")

parts of rules found in the forum which will do something or not

Item MyItem changed
Item MyItem changed to ON
Item PowderRoom changed to 100
Item MyItem received command
Item MyItem received update
Item MyItem  received update TRUE

Result should be something like:


Example 1

Item

Switch  MyItem "my item name"

switched to ON through UI

rule "my rule"
    when Item MyItem changed
then
   logInfo("my rule","something triggered me")
end

Rule will trigger: yes
UI will update: yes


Example 2

Item

Switch  MyItem "my item name" {autoupdate="false"}

switched to ON through UI

rule "my rule"
    when Item MyItem changed
then
   logInfo("my rule","something triggered me")
end

Rule will trigger: ?
UI will update: ?


Example 3

Item

Switch  MyItem "my item name" 

postUpdate through rule

postUpdate(MyItem,ON)
rule "my rule"
    when Item MyItem changed
then
   logInfo("my rule","something triggered me")
end

Rule will trigger: ?
UI will update: ?


Don’t forget to take a look into the docs :slight_smile: :

1 Like