Thing Status

Has anyone written a rule that monitors that status of all Things, and keeps a list of Things that are not online? I am thinking of a generic rule that any OH user could use, not monitoring specific things. I would use this list for the Main UI.

Check out Rich’s rule template. That sounds like what you’re after.

configuration: {}
  - id: "1"
    label: When ThingStatusInfoChangedEvent is raised
      topic: openhab/things/**
      types: ThingStatusInfoChangedEvent
      source: ""
      payload: ""
    type: core.GenericEventTrigger
conditions: []
  - inputs: {}
    id: "2"
    label: execute a given script
      type: application/javascript
      script: >
        console.log("Rule: ThingStatusOfflineEvent.

        var offlineItem = event.thingUID.toString().replaceAll(":","_").replaceAll("-", "_") + "_offline";
        if (event.statusInfo.toString() == 'ONLINE') {
        } else {
    type: script.ScriptAction

It requires an item for each thing wih the following syntax:


where the ThingUIDs’ colons „:“ need to be replace by underscore „_“

This requires OH4. If you are on v3, very few changes need to be done

1 Like

An of course the corresponding HABApp Rule

1 Like

System which has offline things reaches start level of 70. Once all things are online it will reach 100 (speaking here about default configuration).

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.