Open effen28 opened 2 years ago
This is a known behavior. Check all the recent bug reports.
Here my repository for https HUE API V2. It's just a flow with everything you need. https://github.com/andesse/node-red-hue-api.v2-flows
@Foddy Can you take a look at this please? I have the exact same problems. Is there any help needed upgrading to the new API of Hue?
@effen28 I do have the exact same issue and haven't found a solution so far. My Hue-Lights don't work anymore from their huemagic-nodes in Node Red :-(
@xyzo here. Very easy. You will be happy. https://github.com/andesse/hue-clip-api.node-red-flows
@andesse I discovered that 30 mins ago. I already AM happy now :-D Thanks for your work!!
@xyzo cool, it won’t take long to set it up and you have zero issue for a long time, cause the api is brand new
@andesse It works. Honestly I'd appreciate if there would be features like selecting rooms/lights/zones from within the nodes menus instead of copy and pasting UIDs everywhere.
To make sure: it works perfectly if you have digged yourself through everything what might be a bit difficult for people who are "only users". It's just a matter of being user friendly/intuitive...
@andesse BTW: the comment node "lights - DOUBLE CLICK FOR INFO" is empty... no info on double-click :-)
@xyzo this is not a contrib. This is a flow that you change for your needs. I want that the users get contrib free and independent. So they have no struggle in the future when contribs don’t get updated.
Light Doubleclick. Can happen. I already have it in the readme at the end, that there could be mistakes. Lights are almost the same setup like rooms.
Follow my recommendation. Trigger scenes, not lights separate if possible. It’s important to read the full readme.
@andesse I got you and I didn't want to upset you. Just saying that someone who doesn't have a clue about what is going on "inside" and just used huemagic before is now looking for something which works the same like huemagic. Some persons might be looking for similar solutions only.
You did great work with your tidy flow - really! It's just not a simple out-of-the-box-solution like before and still I see the advantages.
@andesse It works. Honestly I'd appreciate if there would be features like selecting rooms/lights/zones from within the nodes menus instead of copy and pasting UIDs everywhere.
To make sure: it works perfectly if you have digged yourself through everything what might be a bit difficult for people who are "only users". It's just a matter of being user friendly/intuitive...
I will never add this kind of features. These are parsed nodes again, that will not work some day if they are not maintained. If you want that, wait for HueMagic update.
@andesse I won't wait :-) What I got now with your work is for MY needs perfect. More perfect then huemagic was before :-)
...I was just giving my thoughts and I didn't want to blame anyone instead of saying thank you.
Haha, yeah I got that. No worries. For me this solution has so many flows and examples now, that even only user people can do it when figured out. most work is Label link in nodes.
Thanks for your second comment. :) I am happy for everybody who can end struggling.
Initializing the bridge (192.168.1.122)… Connected to bridge Processing bridge resources… TypeError: Cannot read properties of undefined (reading 'owner')
Same here, since upgrading to the latest verion of nodered and huemagic, the connection to the brigde is broken. The Node status is "connecting". hue brigde Version 1.53.1953188020 nodejs 3.0.2 huemagic 4.2.2
Downgrade to 4.2.1 doesn´t fix the problem.
I have two bridges with the same current firmware. The first one works with no issues, the second have above problem
I´ve found the issue. If you add debug logs in the function this.fullResource in utils/api.js it is a lot easier to determine the problem! You should add something like that below on log stage debug:
//load the util function at the beginning of the api.js:
const util = require('util');
... around line 185: // GET FULL/ROOT RESOURCE this.fullResource = function(resource, allResources = {}) { const scope = this; var fullResource = Object.assign({}, resource);
console.log("before Owner: " + util.inspect(resource,false, null, true /* enable colors */));
if(resource["owner"])
{
console.log("in Owner: " + util.inspect(resource["owner"],false, null, true /* enable colors */));
fullResource = scope.fullResource(allResources[fullResource["owner"]["rid"]], allResources);
}
Now we can see, witch is the case: Here in the group 6 a private group as owner is defined, witch can not processed by the huemagic api:
nodered-local-node-red-1 | vor Owner: {
nodered-local-node-red-1 | id: 'beda2532-950b-4f9e-b8e1-653e1fcd5bbd',
nodered-local-node-red-1 | id_v1: '/groups/6',
nodered-local-node-red-1 | owner: {
nodered-local-node-red-1 | rid: '867613e6-172e-4ae8-80e4-e8a8dc18cee1',
nodered-local-node-red-1 | rtype: 'private_group'
nodered-local-node-red-1 | },
nodered-local-node-red-1 | on: { on: false },
nodered-local-node-red-1 | alert: { action_values: [ 'breathe' ] },
nodered-local-node-red-1 | signaling: {},
nodered-local-node-red-1 | dynamics: {},
nodered-local-node-red-1 | type: 'grouped_light'
nodered-local-node-red-1 | }
nodered-local-node-red-1 | im Owner: { rid: '867613e6-172e-4ae8-80e4-e8a8dc18cee1', rtype: 'private_group' }
nodered-local-node-red-1 | vor Owner: undefined
nodered-local-node-red-1 | 16 Oct 13:46:03 - [info] [hue-bridge:vxhue2] TypeError: Cannot read properties of undefined (reading 'owner')
nodered-local-node-red-1 | 16 Oct 13:46:03 - [red] Uncaught Exception:
nodered-local-node-red-1 | 16 Oct 13:46:03 - [error] TypeError: Cannot read properties of undefined (reading 'owner')
nodered-local-node-red-1 | at API.fullResource (/data/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:187:14)
nodered-local-node-red-1 | at API.fullResource (/data/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:190:25)
nodered-local-node-red-1 | at /data/node_modules/node-red-contrib-huemagic/huemagic/utils/api.js:247:30
nodered-local-node-red-1 | at Array.forEach (
Therefore Object.assign() is the place, where the exception throwed
Quick fix: Ingore undefined objects like private_groups in api.js:
line 176ff. in utils/api.js if (resource === undefined ) { console.log("huemagic: ignore undefined resources"); return allResources; }
I'd love for a fix for this, just begun setting up my flow and getting th "Connected to bridge" then the owner error.
Hallo together,
since a few days ago (maybe since the update), I can not longer choose a lamp in the drop down. => it says, there went something wrong, try again
also the Hue Bridge-Node says always connecting, but without success
Hope someone can support/help me
Thank you