Use a table under the conditions of a rule

Concerning the Aqara DJT11LM vibration sensor, how can you test the sensor’s orientation under the conditions of a ruler ?

    "state": {
        "lastupdated": "2025-05-08T11:01:53.339",
        "orientation": [
            76,
            -4,
            13
        ],
        "tiltangle": 6,
        "vibration": false,
        "vibrationstrength": 91
    }

I tried…

{
    "address": "/sensors/463/state/orientation/0",
    "operator": "gt",
    "value": "0"
}

…to test the first value, but it doesn’t work.

Almost there, for arrays like this and the color xy attributes, it is a bit different than expected. While the REST-API shows an array internally and in rules these are separate state attributes.

In this case /sensors/463/state/orientation_x

The respective internal item is described in: https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/generic/items/state_orientation_x_item.json

Perfect, it registers the rule without error.
Testing begins… Thanks a lot!

If I have a problem I’ll come back here.

1 Like

To test the orientation of the Aqara DJT11LM vibration sensor using a ruler, you can perform the following steps:

  1. Place the sensor flat on a table with a known orientation (e.g., X facing forward).
  2. Use a ruler to tilt the sensor gradually along one axis (X, Y, or Z).
  3. Observe the changes in the "orientation" array:
    • The first value corresponds to the X-axis.
    • The second value corresponds to the Y-axis.
    • The third value corresponds to the Z-axis.

By carefully tilting and noting the values, you can calibrate or map the sensor’s orientation. Use the "tiltangle" to verify how much angular change occurs. This is particularly useful if you plan to trigger automation based on movement or angle.