Okay, double click helped....
I selected "PhilipsHue"-App
Worked basically now, but do not really now how to get informations about hue-app shown...most of the times it's interrupting in automation-scripts but nothing really shown for hue at all....
(Unless I completely misunderstood this whole tool)
Philips Hue app?
Re: Philips Hue app?
Just a console.log should work - place a console.logJS(...) as mentioned above to see the structure of the object.
-
- Posts: 126
- Joined: 30 Sep 2016 23:49
Re: Philips Hue app?
I've no clue how this nodedebugger really works and how to use it properly. After playing around with it some time, i simply choosed to redirect stuff to console.log to get at least some results.
So finally I simply added console.log(+JSON.stringify(rsp)); to get some further object informations...
Here the results:
1. "deviceLights" is empty
2. "rsp.lights" is also empty
only
3. console.log(+JSON.stringify(rsp)); gave me the following results (shortened...)
So, that looks good to me so far.
and so on,. and so on....
So finally I simply added console.log(+JSON.stringify(rsp)); to get some further object informations...
Here the results:
1. "deviceLights" is empty
2. "rsp.lights" is also empty
only
3. console.log(+JSON.stringify(rsp)); gave me the following results (shortened...)
So, that looks good to me so far.
Code: Select all
{
"status": 200,
"statusText": "OK",
"url": "http://192.168.1.54/api/XXXXXXXXXXXXX",
"headers": {
"Access-Control-Allow-Credentials": "true",
"Access-Control-Allow-Headers": "Content-Type",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS, PUT, DELETE, HEAD",
"Access-Control-Allow-Origin": "*",
"Access-Control-Max-Age": "3600",
"Cache-Control": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
"Connection": "close",
"Content-type": "application/json",
"Expires": "Mon, 1 Aug 2011 09:00:00 GMT",
"Pragma": "no-cache"
},
"contentType": "application/json",
"data": {
"lights": {
"1": {
"state": {
"on": true,
"bri": 150,
"hue": 10233,
"sat": 154,
"effect": "none",
"xy": [0.4945, 0.3911],
"ct": 432,
"alert": "none",
"colormode": "hs",
"reachable": true
},
"type": "Extended color light",
"name": "Stehlampe Kühlschrank",
"modelid": "LCT007",
"manufacturername": "Philips",
"uniqueid": "00:17:88:01:10:25:5a:2a-0b",
"swversion": "5.50.1.19085"
},
"2": {
"state": {
"on": true,
"bri": 150,
"hue": 10497,
"sat": 133,
"effect": "none",
"xy": [0.4775, 0.3902],
"ct": 399,
"alert": "none",
"colormode": "hs",
"reachable": true
},
"type": "Extended color light",
"name": "Stehlampe Esszimmer",
"modelid": "LCT007",
"manufacturername": "Philips",
"uniqueid": "00:17:88:01:10:4a:bd:13-0b",
"swversion": "5.50.1.19085"
},
"3": {
"state": {
"on": false,
"bri": 254,
"hue": 11799,
"sat": 254,
"effect": "none",
"xy": [0.5568, 0.4299],
"alert": "none",
"colormode": "xy",
"reachable": true
},
"type": "Color light",
"name": "Aussenschrank",
"modelid": "LST001",
"manufacturername": "Philips",
"uniqueid": "00:17:88:01:00:ce:38:72-0b",
"swversion": "5.23.1.13452"
},
Re: Philips Hue app?
I've been looking into the app as well, found the following additional issues in the createDevices function:
- The "lights" are located in the "data" structure, so change rsp.lights --> rsp.data.lights (line ~97)
- The deviceLights array is indexed incorrectly, change "deviceLights.lightId.state --> deviceLights[lightId].state"
- The call to createDevice uses an incorrect param, change the last one to "uniqueId"
Overall, my createDevices function now looks like this:
...and devices are now created for my Hue lamps. Unfortunately, there seems to be more issues when attempting to use the created devices. For the moment, i'm having more luck with the app by Minux, which is working well.
- The "lights" are located in the "data" structure, so change rsp.lights --> rsp.data.lights (line ~97)
- The deviceLights array is indexed incorrectly, change "deviceLights.lightId.state --> deviceLights[lightId].state"
- The call to createDevice uses an incorrect param, change the last one to "uniqueId"
Overall, my createDevices function now looks like this:
Code: Select all
PhilipsHue.prototype.createDevices = function(rsp){
console.log("PhilipsHue Create Devices");
var moduleName = "PhilipsHue",
self = this,
deviceLights = rsp.data.lights;
var lightId = 1;
while (deviceLights[lightId].state != "undefined" && lightId < 5) {
var device = deviceLights[lightId],
state = device.state.on,
brightness = device.state.bri,
color = device.state.hue,
saturation = device.state.sat,
uniqueId = device.uniqueid,
name = device.name;
self.createDevice('light', lightId, name, uniqueId);
lightId++;
}
};
Re: Philips Hue app?
Indeed, looking on the logJS output rsp.lights -> rsp.data.lights wil be the correct fix.
Re: Philips Hue app?
Hello, can someone explain me where come from the official version ? Just by curiosity. I will add github repo as soon as possible.
-
- Posts: 126
- Joined: 30 Sep 2016 23:49
Re: Philips Hue app?
Uuhh...have been debugging a bit further, and to be true:
The current version of this app/module is not working well with Hue-Lights at all.
After some further tweaking, at least now it works so far, although there is no status-refresh implemented and also no "real" color selections.
However, before I am going to tune this up for myself only, is there a github-Project page for this app to branch somewhere or should I rewrite it only for myself?
The current version of this app/module is not working well with Hue-Lights at all.
After some further tweaking, at least now it works so far, although there is no status-refresh implemented and also no "real" color selections.
However, before I am going to tune this up for myself only, is there a github-Project page for this app to branch somewhere or should I rewrite it only for myself?
Re: Philips Hue app?
I don't know who is owning this in git. Will ask colleagues. But if you make that fix, we will with pleasure accept your pull request to share with others
Re: Philips Hue app?
Sorry for a quick of topic.
I'm looking for the "PhilipsHue" app on the AppStore but I can't find it!
I'm coming from Domoticz and very new to Z-WAVE>Me.
Can someone point me out the way to get that app which is the main reason I was on Domoticz?
LP
I'm looking for the "PhilipsHue" app on the AppStore but I can't find it!
I'm coming from Domoticz and very new to Z-WAVE>Me.
Can someone point me out the way to get that app which is the main reason I was on Domoticz?
LP
Re: Philips Hue app?
It is called Philips Hue. Make sure to look in Online Apps and reset "Featured" filter (check All)