Trouble Integrating Philips HUE with node-red-contrib-huemagic on Updated Node-RED & Node.js


I've installed Node-RED alongside openHab on a Raspberry Pi. For Philips HUE, I was using "node-red-contrib-huemagic 4.2.2".

At some point, I noticed that the HUE Bridge / HUE Lamps stopped working. I'm not sure if this was after some reinstallations or updates - the HUE Bridge just couldn't be addressed anymore. Now, I've reinstalled everything:

  • Stopped Node-RED, then removed it with "sudo npm remove -g node-red".

  • Uninstalled Node.js via "apt", cleaned everything up, deleted old directories, rebooted, and reinstalled node.js + Node-RED on the Raspberry Pi:

    • Node-RED version: v3.1.8
    • Node.js version: v18.20.0
    • Linux 5.15.32-v7l+ arm LE
    • Loading palette nodes
    • Settings file: /home/openhabian/.node-red/settings.js
    • Context store: 'default' [module=memory]
    • User directory: /home/openhabian/.node-red
    • Flows file: /home/openhabian/.node-red/flows.json

In the "new" Node-RED, I've only integrated "node-red-contrib-huemagic 4.2.2", no other external nodes or flows!

The IP address of the HUE Bridge was recognized, the API key transmitted. However, I still get the error message "something went wrong, please try again", and I can't select any lights from the HUE Bridge!

With all other systems like openHAB, HUE App, GoogleHome, Home Assistant... the HUE Bridge can be addressed!

Is it because HueMagic was written for Node.js 14+ and Node-RED v2.1+? What can be the solution?


Not sure how open hab plays into this, I run hue on node red 3.1.2 with js 20 and have no problems so it is possible.

Good evening,

and you use too "node-red-contrib-huemagic 4.2.2" ?

Yep, that's the one

Have you read through the issues for that node? This one looks familiar: Internal Server Error when searching for scenes · Issue #386 · Foddy/node-red-contrib-huemagic · GitHub


Thank you for your response.

I've successfully integrated "node-red-contrib-philipshue-events" and was able to configure my HUE Bridge within the node. :slight_smile: However, I'm not sure how to add a HUE light. :frowning:

I also tried the "HUE-CLIP-API.Node-RED-Flows," but it seems very complex to configure everything via an API. I don't know if it was a coincidence, but Node-RED failed to start multiple times, so I had to restore the Raspberry Pi from a backup to get Node-RED running again.


It's stretching my memory but as I remember there was a lot of command line stuff on my windows lap top to identify lights, plugs then using using that info in the nodes.