Suddenly Node-RED flows delayed

Hi,

automations which worked previously stopped being consistent/reliable.

I have a simple Node-RED flow with MQTT message as the trigger turning off Home Assistant entity.

Interestingly, when troubleshooting, this Home Assitant entity now has “Sending” (yellow) status for a few seconds, until it shows expected “lights.turn_on called at: …” status.

I have indcluded a debug node in parallel to this HA entity, receiving input from the same node - debug shows activity immediatly, but HA node status is delayed.

I should mention that HA nodes are created manually in config.yml as MQTT definitions which worked fine before. I was doing updates to a lot of Home Assistant and related components, but lost track and didn’t make a backup prior to the updates, unfortunately. I have also installed HACS and quite a few things via HACS for HomeKit Infused panel.

What could be the cause for this “Sending” status which stays for a few seconds?

2022-02-10 00_28_18-Node-RED – Home Assistant

2022-02-10 00_28_27-Node-RED – Home Assistant

just guessing, try deleting msg.payload and msg.data right before the service call.

Finally I have figured out what was the cause. Interestingly, the delay would only appear with Home Assistant entities which are custom defined entity groups, and only those groups which have other groups in them.

Had no issues before, but started having issues after some Home Assistant update. Will register a bug.

Before the update this definition worked fine, but after update started having this delay as described before:

  # Office Top Strip Group
  - platform: group
    name: "Office Top Strip"
    entities:
      - light.office_top_warm
      - light.office_top_cool

  # Office Side Strip Group
  - platform: group
    name: "Office Side Strip"
    entities:
      - light.office_sides_warm
      - light.office_sides_cool

  # Office All Lights Group
  - platform: group
    name: "Office Lights"
    entities:
      - light.office_top_strip
      - light.office_side_strip
      - light.office_main
      - light.office_bed

No I have changed the definition to have a single-level group, without referencing other group deifintions and it started working just fine.

  # Office All Lights Group
  - platform: group
    name: "Office Lights"
    entities:
      - light.office_top_warm
      - light.office_top_cool
      - light.office_sides_warm
      - light.office_sides_cool
      - light.office_main
      - light.office_bed

I have been strugging with this too for a year or so, it seems there is some kind of anti-flood thing going on where transmissions are delayed. It seems to be worse if you retrigger a complex flow every few seconds, lengthening the interval of repeat triggers seems to help. Any update on this one?

There is a flow floating around here that shows how many commands can be executed in a minute. It’s well into the thousands, so it’s not being overwhelmed or delayed because of a complex flow.

It’s likely there is some bad coding in a node somewhere causing the problems. You can start by disabling tabs and testing to see if you can isolate the tab with the problem, then narrow it down to the flow from there.

It also could be the install itself and if the above fails, a clean install may be warranted.