Problems with Hue Magic

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:


The flow for the "Wohnung" overview:

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 :smiley:

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.

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 :frowning:

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?

1 Like

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


The error messages in iobroker:

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?

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:

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?