Node red slow response times

Hi all,

I have been trying to create some more complex automations in node-red for my lights around the house. I currently have my bathroom lights set up in the Hue app so they will be triggered by a motion sensor. The app only allows for 2 timeslots per day which is a bummer and the Hue labs option to extend it to 3 timeslots and even setting different times per day doesn’t work for me (lights sometimes don’t turn off). So I tried moving to HA automations, but this seems to become very complex for the application I want to run. So finally I moved the automation to node red and tried to run it there. Unfortunately I am seeing a serious delay between me triggering the motion sensor and the light turning on which I am not seeing in either the Hue app or the HA automation. Here triggering the lights is near instant. Does anyone have/had the same experience and found a solution for this? I have read multiple posts on this topic, but didn’t find a solution that worked for me…

Thanks!

Can you post your flow? There could be some optimizations made that might speed things up.

Even my most complex flows usually execute in less than a second (unless I have delays in there).

I’ve always found the Hue Motion sensor to have a delay: either by using Hue’s API calls directly (via Hue integration) or via Home Assistant nodes. However, the delay issue went away entirely when I converted my Hue Motion sensor to deCONZ (I’m sure: ZHA or zigbee2mqtt would have similar results). I now have all of my Hue Motion sensors converted over to deCONZ and the response is near instant. Someday, I’ll convert my Hue lights over, but that’s such a large endeavor for me that I’ve kept on putting this off.

1 Like

I actually created a complex flow which is slow. Then, just to confirm, I created a simple flow: motion sensor > Light on/off. But this was also really slow. It seems to me that the input from the motion sensor is very much delayed.

Yeah it seems to me that the problem is related to the motion sensor. It looks like the trigger is really slow. I will look into this. Although I don’t quite understand that in the Hue app it’s fine, and also in HA automations there is no delay…

I’m wondering if it’s NodeRed itself. Where do you have it running? Separate server? HA addon? I have mine on on a dedicated server and the only lag I see between Hue, HA and NodeRed when a motion sensor trips is right around 500ms and that is merely traffic time over the network and instantiation of the flow itself.

To be fair, all my Hue motion sensors are directly connected to HA via ZHA because I don’t want to rely on the Hue hub polling.

The reason is the hue integration in HA. Because the hue bridge does not support push notifications, HA has to poll the state of the motion sensor at a given interval, which is afaik 5 seconds. So, there is a delay about two and a half seconds in the middle. I had the same issue and migrated my motion sensors to deconz, which solved this.

EDIT: there are some node-red addons which connect to the hue bridge directly, which you can use. They all have generally the same issue, but for some you can change the poll interval. If I remember right, one of them is node-red-contrib-huemagic:

1 Like

I ordered a Conbee II and configured it with a Philips Hue motion sensor. I now use this in node red and the response is near instant.
Thanks guys!

2 Likes