Open SierraLimaOscar opened 2 years ago
For some time, i have had this issue intermittently, not often enough to be a problem. However, since this week, it has turned into a blocking issue. It seems that my node-red/huemagic setup has not changed, so whatever happened, that was not the (only) cause.
Perhaps the firmware of the bridge was upgraded recently? I don't know how to check that, but my current bridge details are:
I do have a rather large setup (30+ lights, 10+ remotes, 10+ sensors), and have added recently some devices as part of a beta test (I'm in the hue beta community), so it could be that the bridge is now reporting more events, or maybe reporting something unexpected?
Checking my podman log (I'm running a nodered/node-red docker image), i notice the following error that might provide a clue: 29 Sep 14:39:12 - [info] [hue-bridge:Attic Hue V2] Initializing the bridge (192.168.1.41)… 29 Sep 14:39:12 - [info] [hue-bridge:Attic Hue V2] Connected to bridge 29 Sep 14:39:13 - [info] [hue-bridge:Attic Hue V2] Processing bridge resources… 29 Sep 14:39:13 - [info] [hue-bridge:Attic Hue V2] TypeError: Cannot read property 'owner' of undefined
Running node-red manually from a local ubuntu install lists a bit more detail:
2 Oct 16:08:54 - [info] [hue-bridge:Attic Hue V2] TypeError: Cannot read property 'owner' of undefined
at API.fullResource (/home/hurenkam/.node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:178:14)
at API.fullResource (/home/hurenkam/.node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:180:25)
at /home/hurenkam/.node-red/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:237:30
at Array.forEach (
api.js@173 onwards reads:
173 this.fullResource = function(resource, allResources = {})
174 {
175 const scope = this;
176 var fullResource = Object.assign({}, resource);
177
178 if(resource["owner"])
It appears that resource is undefined here.
Hmmm, it seems there are 2 different issues at hand here. On the bridge (v2.0) where i have abovementioned problem, i can also no longer access light status through node-red. I have another bridge however (a v2.1 with only a few lights connected), and that does show the "groups not yet available" message, but does not show the TypeError in the logging, and retrieving light status is still working fine just like with OP.
Using curl to access lights or sensors works fine, and also event reporting using curl seems fine for both bridges. Other apps (Hue app & iConnectHue) also seem to work fine.
Fyi, I published a pull request #409 which, in addition to fixing the problems mentioned here, also improves the way the bridge overload is handled (following +/- recent changes made to the HUE bridge at this level, aka Error 429)...
So if you want to give a try, you can using this one too (installable form FredBlo fork npm install git+https://github.com/fredblo/node-red-contrib-huemagic.git
:-) )
For posterity, node-red-contrib-huemagic-fork
seems the correct way to install this, now.
Describe the bug The Hue Group node is reporting the following: "The group in not yet available. Please wait until HueMagic has established a connection with the bridge or check whether the resource ID in the configuration is valid." This is despite the groups being discovered and selected correctly in the node settings. Using the same hue configuration I can make it work using the Hue Light Node instead.
Flow to Reproduce
Expected behavior To switch a specific group on or off
Screenshots If applicable, add screenshots to help explain your problem.
Please complete the following information:
Additional context Add any other context about the problem here.