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
200 stars 67 forks source link

API.init probably using a bug in the bridge firmware #354

Closed ptweety closed 2 years ago

ptweety commented 2 years ago

In api.js the resource /api/config is called. This seems to be no valid use of the Hue V1 API which tells us to use something like /api/<username>/config https://github.com/Foddy/node-red-contrib-huemagic/blob/6b5789710539396c2bc71953dcce0f56ad024098/huemagic/utils/api.js#L27-L32

Probably the coding should be something like this: "url": "https://" + config.bridge + "/api/" + config.key + "/config",

Since I'm not sure if this is really an issue (or more me, not knowing all the inner workings of the node and the api) I hesitate to just create a PR

ptweety commented 2 years ago

Sorry, I misread the api specification. This is totally valid use of the api and it's event documented in various places in the hue developers documentation.