Delay when using Hue motion sensor in HA automation

New user here. - I have written my first automation, a simple one to turn on my passageway lights when motion is detected and to dim them after 5 mins of no_motion and then turn them off a minute later.

I had this all set up in the Philips hub and it worked well but some of the lights were not compatible with the Hue (they were Wi-Fi Tasmota bulbs). Hence my use of HA and an automations.yaml script.

The issue I have run into is a delay, sometimes a second or two, between the LED on the Hue motion sensor flashing, ie detecting motion, and the lights turning on, by which time I’ve tripped over something in the dark ;-).

I suspect this is either a polling issue or maybe the sensor has a delay to avoid false triggers, although the Philips app never showed any delay.

So I’m wondering if there is a better way to do this, maybe I could install a ConBee 2 on the RPi, and talk directly to all the devices, cutting out the Hue hub altogether, is that a good idea?
These are my present lines of code:

- id: '1577460350906'
  alias: Select scene Hall bright
  description: ''
  trigger:
  - device_id: e3803637b1094829fa353bbf2d1c60f0
    domain: binary_sensor
    entity_id: binary_sensor.hall_motion_sensor_motion
    platform: device
    type: motion
  condition: []
  action:
  - scene: scene.walking_hall_bright
- id: '1577461092488'
  alias: Select scene Hall dim
  description: ''
  trigger:
  - device_id: e3803637b1094829fa353bbf2d1c60f0
    domain: binary_sensor
    entity_id: binary_sensor.hall_motion_sensor_motion
    for:
      hours: 0
      minutes: 5
      seconds: 0
    platform: device
    type: no_motion
  condition: []
  action:
  - scene: scene.walking_hall_dim
  - delay: '60'
  - scene: scene.hall_off

This is a very good idea, I can highly recommend it. With the ConBee you get instant feedback from your motion sensors/lights, whereas with the Hue Hub Home Assistant polls the state at a defined interval, that’s why you get a delay.

2 Likes

Thanks for that, yes I’ve been Googling for hours and came to the conclusion that a ConBee would be a good investment. Will sleep on it and order it in the morning.

1 Like

This is still polling the state, just with a higher frquency than the official component. I can only recommend using ConBee, there you have state changes pushed to HA, you can include many non-hue devices such as the Xiaomi Door/Window sensors (very cheap, long battery life) and you can have smooth dimming functionality throug a special deconz service (I can long press the dim down button and it dims until I release the button).

1 Like

Thank I will look into that.
I prefer push

I can confirm the same behavior. I have several Hue motion sensors and a Conbee stick as well. I compared them. I control my Hue lights through the Hue hub with the default hue component and have the same delay if I use the Hue motion sensors. The custom component you mentioned is a bit better.

However I bought some very cheap Xiaomi Mija Motion sensors for less than $10 and they work great with the Conbee stick. Since then I use only these sensors as they are really instantaneous and good quality. I still control the Hue lights with the Hub. So what I can tell is that sending commands to Hue hub has almost no delay. The problem is somewhere between the Hue sensor response time and the default Hue component.

Use the Conbee and some cheap sensor like Xiaomi for real time sensing.

If you already have hue motion sensors, there’s no need to buy the Xiaomi ones, you can just include them into the ConBee and than it works perfectly fine (I have one Hue motion sensor and it works instantly, no delay).

May I ask why you did not migrate your bulbs to ConBee?

Sending commands to Hue should be instant, however receiving a response from hue will only be received at the specified polling nterval and can therfore have a delay.

If you already have hue motion sensors, there’s no need to buy the Xiaomi ones, you can just include them into the ConBee and than it works perfectly fine (I have one Hue motion sensor and it works instantly, no delay).

I realized that after a while :slight_smile: but I needed more sensors anyway and now I use the Hue motions as brightness and sunlight sensors around the house and the Xiaomi sensors for motion detection.

May I ask why you did not migrate your bulbs to ConBee?

I have 45 hue bulbs and if I need to control them with ConBee at the same time especially with rapid changes, I experienced some lag between many bulbs and not always turning on/off or changing color at the same time or rate. I found a topic somewhere which stated that HA has to send out commands via ConBee for every bulb individually, but if I make a scene call by the Hue component only one request is made to the Hue hub and the hub commands the lights. There is some limit in the Hue hub for paralell calls and frequency for 3rd party apps. For me it worked better this way and I have no issues since then.

This is partially correct. You can create groups with the ConBee as well and when you send a command to the group the behaviour is the same as the hue hub.

1 Like

Do you know if the Philips Hue Dimmer switch can be paired to ConBee too, so I could read the button presses and functions like short hold, long hold, etc? Currently I do this with a custom addon huesensor, but if this also works with ConBee I would start thinking about throwing the hue hub.

Yes they do, immediate feedback, I have around 7 of them installed. I even wrote an app available in HACS to provide smooth dimming functionality when long pressing the dim up/down button and stop dimming when you release it, call services with button etc… In case you are interested you can find more info here: DeCONZ Hue Dimmer Switch app with smooth dimming functionality

Also let me know in case you need help setting things up.

1 Like

Amazing. Thanks!