Delay between shelly relay activation

I have several shelly relays tied together via node-red in home assistant.

There is just under a 1 second delay from the time the input on the primary relay is activated to the time all the other relays activate. Is this normal?

My basement has 8 lights and only a single light switch. The other 7 lights are on pull chains. I put a shelly 1 relay on the switched light. It is bound to the switch input. Then I have other shelly relays attached to the other lights. Using node-red I’m capturing the state change of the switch input and then turn the other lights on and off. The primary light, probably because it is directly bound, turns on instantly from the switch. All the other lights turn on after about 1 second.

My HA is running in a Virtual Box virtual machine. It has plenty of memory and 2 processor cores. The shelly relays are set to static IPs. I’m using the native shelly integration in HA.

I’m very new to HA. If this is normal I guess I’ll live with it. I’m wondering if this can be improved. Is one of the links in the chain slow, node-red or perhaps the native integration.

It may be node red. Try it in home assistant.

I am having a similar problem, Shelly 2.5 Relay bound to a wall switch. I have two simple Automations (one for On and one for Off) in HA, no node-red, that say when the wall switch is turned on or off (Trigger) two Wiz Bulbs in the room also turn on/off (Action). This should be the simplest thing in the world. There is a variable and NOTICABLE delay before the Action happens, anywhere from 1 to as much as 15 or 20 seconds, if the action fires AT ALL, which it often doesn’t. This makes the Automation essentially useless.
I am using the native Integration for both WIZ and Shelly. This is what it looks like:

alias: Bathroom Paring (off)
description: ''
trigger:
  - platform: device
    type: turned_off
    device_id: 405819253c903f13a47912cdf8c667a8
    entity_id: switch.shellyswitch25_48551902e6be_channel_1
    domain: switch
condition: []
action:
  - type: turn_off
    device_id: d7f564af7b547e8c396218bed85c8e68
    entity_id: light.wiz_rgbw_tunable_8c512a
    domain: light
  - type: turn_off
    device_id: 2d01babb5c32b072671f2cc5cfd1e5db
    entity_id: light.wiz_rgbw_tunable_8d310f
    domain: light
mode: single

What does the automation debug say?

Have you tried service.light_turn_on?

Yes I have. With that one, rather than having two separate Actions, one for each bulb, I have the Service target the Group of bulbs. This makes the Automation more reliable, in that the Action fires every time, but it has done nothing to address the delay. t looks like this:

alias: Bathroom Light Paring  (On)
description: ''
trigger:
  - platform: state
    entity_id:
      - switch.shellyswitch25_48551902e6be_channel_1
    from: 'off'
    to: 'on'
condition: []
action:
  - service: homeassistant.turn_on
    data: {}
    target:
      entity_id: light.bathroom_lights
mode: single

The debug says the automation takes .14 Seconds:

Triggered by the state of switch.shellyswitch25_48551902e6be_channel_1 at May 27, 2022, 4:33:12 PM

Call service homeassistant.turn_on on entities light.bathroom_lights

Bathroom Light Left (light.wiz_rgbw_tunable_8d310f) turned on
Bathroom Lights (light.bathroom_lights) turned on

Bathroom Light Right (light.wiz_rgbw_tunable_8c512a) turned on

Finished at May 27, 2022, 4:33:12 PM (runtime: 0.14 seconds)

But that does not translate to the real world time it takes to see the results.

Also, if I select “RUN ACTION” from the Automation tab in HA, the Action is instantaneous.
If I turn on the switched light from the HA App on my phone, instantaneous.
If I ask Google, with a voice command, the Action fires and all three lights turn on with zero delay.
To troubleshoot, I set up an Automation to be to be triggered by another (TP-Link) wall switch in my house:
Trigger: TP-Link on/off
Action: Text to Speech - All Speakers - “Bingo”

It behaves exactly as the original Automation, intermittent lag time between Trigger and Action.

I tried it in HA as an automation. It’s better. Maybe down to a half second.

Any further way to improve it?

and for @viniisiggs

That is not the debug! Click on Trace in the automations page.

Trace under debug shows me something similar. Runtime: 0.26 seconds

So I painstakingly converted all the Shelly’s to MQTT. That seems to have helped a bunch. I used ha-shellies-discovery to auto discover them.

With MQTT and using a HA automation the delay is variable between instant and about quarter second. I think that is good enough. I would say the native shelly integration was the culprit.

Sorry if I posted the wrong thing.