# Multiple Outputs synchronization

**URL:** <https://discourse.nodered.org/t/multiple-outputs-synchronization/10165>\
**Category:** General\
**Created:** [15 April 2019 12:29 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165 "2019-04-15T12:29:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fzigbee](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@fzigbee](https://discourse.nodered.org/u/fzigbee)\
**Post date:** [15 April 2019 12:29 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/1 "2019-04-15T12:29:31Z")

</div>

I have three Philips Hue bulps (Output) in one lamp, all connected to one UI switch. When i switch on the lamps in the UI, these do not switch on synchronously, but one after the other.

Is there a way to turn on all the lights in sync?

Setup: zigbee2mqtt, mosquitto and node-red on a Raspberry Pi

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [15 April 2019 12:32 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/2 "2019-04-15T12:32:22Z")

</div>

They can never be exactly the same time but how have you connected the nodes? In parallel or serial?

---

<div class="post-metadata">

**Author:** ![fzigbee](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@fzigbee](https://discourse.nodered.org/u/fzigbee)\
**Post date:** [15 April 2019 12:44 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/3 "2019-04-15T12:44:15Z")

</div>

![setup01](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex026/uploads/nodered/original/2X/a/a368bbf7775393277e02084c2cd848c50c7ec4ec.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2019 12:48 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/4 "2019-04-15T12:48:37Z")

</div>

How does it get from MQTT to the lights? If that is through zigbee2mqtt then the issue does not lie in node-red but how it gets from MQTT to the lights.

---

<div class="post-metadata">

**Author:** ![fzigbee](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@fzigbee](https://discourse.nodered.org/u/fzigbee)\
**Post date:** [15 April 2019 12:54 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/5 "2019-04-15T12:54:14Z")

</div>

Yes, you are right - through zigbee2mqtt and i guess this is not a node-red problem.

I checked the logs and it sends the commands with a delay of 1 sec

```auto
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM Zigbee publish to device '0x001788010285e1a8', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010285e1a8', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010285e1a8', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010285e1a8', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010285e1a8', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM Zigbee publish to device '0x001788010290a0d5', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010290a0d5', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM Zigbee publish to device '0x00178801029b1f25', genOnOff - off - {} - {"manufSpec":0,"disDefaultRsp":0} - null
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010290a0d5', payload '{"state":"OFF","linkquality":84,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010290a0d5', payload '{"state":"OFF","linkquality":84,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:08 PM MQTT publish: topic 'zigbee2mqtt/0x001788010290a0d5', payload '{"state":"OFF","linkquality":84,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:09 PM MQTT publish: topic 'zigbee2mqtt/0x00178801029b1f25', payload '{"state":"OFF","linkquality":86,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:09 PM MQTT publish: topic 'zigbee2mqtt/0x00178801029b1f25', payload '{"state":"OFF","linkquality":65,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:09 PM MQTT publish: topic 'zigbee2mqtt/0x00178801029b1f25', payload '{"state":"OFF","linkquality":65,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'
  zigbee2mqtt:info 4/15/2019, 1:51:09 PM MQTT publish: topic 'zigbee2mqtt/0x00178801029b1f25', payload '{"state":"OFF","linkquality":65,"brightness":254,"color_temp":366,"color_mode":2,"color":{"x":0.457,"y":0.41}}'

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2019 12:57 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/6 "2019-04-15T12:57:55Z")

</div>

I don't know about zigbee, perhaps it is inherently slow and can only do one thing at a time. I use Sonoff devices (and the many similar products) with the Tasmotta firmware, which use wifi so are effectively instantaneous.

---

<div class="post-metadata">

**Author:** ![zoltansz](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zoltansz/32/7487_2.png) [@zoltansz](https://discourse.nodered.org/u/zoltansz)\
**Post date:** [15 April 2019 17:33 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/7 "2019-04-15T17:33:04Z")

</div>

Can't you use Delay nodes to get the timing aligned to the slowest one?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [15 April 2019 18:17 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/8 "2019-04-15T18:17:27Z")

</div>

Isn't there a node-red node for controlling Phillips hue devices? If so, have you tried it? Surely without the middleware it will be much closer to synchronous?

---

<div class="post-metadata">

**Author:** ![fzigbee](https://avatars.discourse-cdn.com/v4/letter/f/9fc348/32.png) [@fzigbee](https://discourse.nodered.org/u/fzigbee)\
**Post date:** [17 April 2019 20:46 UTC](https://discourse.nodered.org/t/multiple-outputs-synchronization/10165/9 "2019-04-17T20:46:43Z")

</div>

There is`node-red-contrib-huemagic`, but i want to use the devices without the vendors bridge or gateway - that's why i am using zigbee2mqtt.

The whole problem is not related to node-red - but anyway - for those who may encounter the same problem: I solved it by adding the three bulps to one group in zigbee2mqtt. All bulps now switch on and off at the same time.

"Zigbee2mqtt has support for Zigbee groups. By using Zigbee groups you can control multiple devices simultaneously with one command"

> **[Groups](http://www.zigbee2mqtt.io/information/groups.html)**
>
> 📘 Zigbee2mqtt documentation
