deconz-rest-plugin: Rules not always triggered

Hi,

I have few Hue motion sensors that I have configured through the rest API. They used to work well until v2.05.25 (I’m running v2.05.28 now). Since then, rules are not always triggered. For instance, I have the following rule that changes the status of a ClipGenericStatus from 0 to 1 if it detects presence, if it is dark, and if its status is 0.

{
  "actions": [
    {
      "address": "/sensors/27/state",
      "body": {
        "status": 1
      },
      "method": "PUT"
    }
  ],
  "conditions": [
    {
      "address": "/groups/7/state/any_on",
      "operator": "eq",
      "value": "false"
    },
    {
      "address": "/sensors/15/state/presence",
      "operator": "eq",
      "value": "true"
    },
    {
      "address": "/sensors/15/state/presence",
      "operator": "dx"
    },
    {
      "address": "/sensors/27/state/status",
      "operator": "eq",
      "value": "0"
    },
    {
      "address": "/sensors/14/state/dark",
      "operator": "eq",
      "value": "true"
    }
  ],
  "created": "2018-04-25T00:10:29",
  "etag": "3099bcbc974b119a06d58d57ee83e2f5",
  "lasttriggered": "none",
  "name": "Chaufferie.Motion-on",
  "owner": "me",
  "periodic": 0,
  "status": "enabled",
  "timestriggered": 0
}

When the motion sensors detects presence and conditions are met, it does not trigger the associated action. But, if I turn on the associated group then turn it off, then it starts triggering the rule normally for few minutes.

I have this behaviour happening with 6 sensors.

Any idea what it is misbehaving? PS: lasttriggered and timestriggered are, respectively, set to None and 0 because I restarted the daemon right before getting the info.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19

Most upvoted comments

I want this condition to make the sensor “disabled” if I switch on the light manually.

I use a slightly different approach for this: I set the room’s CLIPGenericStatus sensor to -1 to disable all automations for the room, and I check for this status in every rule related to the room. I programmed my Hue dimmer switches to set the status to -1 when holding the Off button. Also I set this status in my HomeKit Goodnight scene, so my bedroom lights don’t switch on when I’m turning in my sleep.

It shows false in the REST API, but still fails the rule condition eq “false”.

Is that specific to my case or a known issue?

I suspect it might be an issue - I need to do some testing before I know more.