Foddy / node-red-contrib-huemagic

Philips Hue node to control bridges, lights, groups, motion sensors, temperature sensors and Lux sensors using Node-RED.
https://flows.nodered.org/node/node-red-contrib-huemagic
Apache License 2.0
201 stars 67 forks source link

Using two Hue bridges error #299

Closed MBombeck closed 2 years ago

MBombeck commented 2 years ago

Describe the bug My first hue bridge was completely full so I tried to add a second one (both v2) to shift some load to it. After installing the bridge via Hue App and adding some lights and scenes to it I added it to Huemagic without a problem. When I try to discover lights or scenes via light or scene node i get the error "Something went wrong. Please retry" (see error log). Using the bridge directly with Home Assistant or official Hue App works fine. If I remove the new bridge, then everything works again without any problems.

Error Log:

...
24 Jan 22:42:16 - [red] Uncaught Exception:
24 Jan 22:42:16 - [error] TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'TLSSocket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle
    at JSON.stringify (<anonymous>)
    at /config/node-red/node_modules/node-red-contrib-huemagic/huemagic/hue-bridge-config.js:807:31
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
2022/01/24 22:42:16 [error] 544#544: *1213 upstream prematurely closed connection while reading response header from upstream, client: 10.100.0.179, server: a0d7b954-nodered, request: "GET /hue/resources?bridge=10.0.1.176&key=[myApiKeyWasHere]&type=scene HTTP/1.1", upstream: "http://127.0.0.1:46836/hue/resources?bridge=10.0.1.176&key=[myApiKeyWasHere]&type=scene", host: "10.0.1.205:1880", referrer: "http://10.0.1.205:1880/"
...

Please complete the following information:

MBombeck commented 2 years ago

I have not changed anything but since yesterday it works.

Foddy commented 2 years ago

I like those kind of issues 😄