# Problems with Hue Magic

**URL:** <https://discourse.nodered.org/t/problems-with-hue-magic/53779>\
**Category:** General\
**Created:** [15 November 2021 16:39 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779 "2021-11-15T16:39:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schmtterfliege](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Schmtterfliege](https://discourse.nodered.org/u/Schmtterfliege)\
**Post date:** [15 November 2021 16:39 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779/1 "2021-11-15T16:39:07Z")

</div>

Hi,

I have some hickups with the way I try to use the hue magic distrib in node red.  
Probably my fault because I'm missing some basic knowledge about how it works?

I have several rooms, in each room I have added a control "section" to control the light.  
Furthermore, I have a "Wohnung" flow/tab, that shows the state of the lights in each room.  
Example for a room:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/8/b86354f427f2e6033ff593d78a9851cbcaba191c.png)  
The flow for the "Wohnung" overview:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/2/b227ae40a5330b0ffc17d4331fe527176ef47ff1.png)

The problem with this is that sometimes only one of both works.  
E.g. if I change the light using the hue smartphone app, only "Wohnung" gets updated, or the room.  
I noticed this by seeing that e.g. in "Büro" the state was always on, while in "Wohnung" it would update correctly.  
Last night I tried mitigating it by manually triggering the light nodes in "Wohnung". Worked.  
So I changed the trigger to an interval of 1 second. Ultra big mistake. It nearly instantly killed the node red adapter in IoBroker (with lots of errors in the log). Node red crashed, restarted and turned on all of my lights, I guess it triggered the flows in the rooms. At ~ 3.30am. My GF wasn't too happy 😃

But, I think I figured it out and wanted confirmation from you guys.  
See below screenshot.  
I used the light node and sent the output to a debug node.  
Somehow, only the light node I created last would actually get me an output.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e60c83bd70b300dbded229ebcd0d62558413610d.png)

Question: Can I only use _ONE_ node for each light?  
I didn't look at the error messages in detail since my heart was pumping trying to prevent my whole appartment to light up... are those light nodes instanced and therefore only one can be used?

Sorry if this sounds complicated ☹

---

<div class="post-metadata">

**Author:** ![Schmtterfliege](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Schmtterfliege](https://discourse.nodered.org/u/Schmtterfliege)\
**Post date:** [15 November 2021 16:52 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779/2 "2021-11-15T16:52:16Z")

</div>

Maybe I figured something else out:

In the flows in each room the nodes for the switch, color picker etc. were set to pass through the input to the output.  
I guess this created a loop and the 1 second interval I had in "Wohnung" super-boosted the loops?

---

<div class="post-metadata">

**Author:** ![Schmtterfliege](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Schmtterfliege](https://discourse.nodered.org/u/Schmtterfliege)\
**Post date:** [15 November 2021 16:59 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779/3 "2021-11-15T16:59:26Z")

</div>

And another thing.. sorry for the spam.  
I again added a trigger in "Wohnung" (manual, not interval 😃 )

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c16c8cf344b15854a1fe9f8a5b5dc301e5af397f.png)  
The error messages in iobroker:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/c/9cba2be6e5be4a0f0f65e908a97a67fa65fc78db.png)

It always happens for the last 3 light nodes I connect to the trigger.  
Is this an overflow, and it can only handle 9 nodes at a time?

---

<div class="post-metadata">

**Author:** ![Schmtterfliege](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@Schmtterfliege](https://discourse.nodered.org/u/Schmtterfliege)\
**Post date:** [15 November 2021 17:19 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779/4 "2021-11-15T17:19:41Z")

</div>

Last update from me, I promise!

I removed the stuff in "Wohnung" and added the template that only shows the state to each room.  
The flows now look like this:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/2/323b695f7ce66b0528219fdbd8740ce36a93997f.png)

It works, but when switching the lights on/off via the app, this wouldn't change the state of the switch in the room (in my dashboard) or in "Wohnung".  
They only change, if I add a debug node to the splitter that outputs the true/false state of the light.  
Once I added the debug node and triggert the light again via the hue app, it suddenly also updated in the dasboard (room and Wohnung).  
If i then remove the debug node, it still works.

So I basically had to add a debug node - that was just meant to confirm (to _me_ as a humang being) whether I get an output when switching the light via the app - and this made the flow to actually start using the output?  
Is that a thing? Outputting something to a debug node - without changing anything else - makes things suddenly work?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 January 2022 17:19 UTC](https://discourse.nodered.org/t/problems-with-hue-magic/53779/5 "2022-01-14T17:19:56Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
