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.
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"
},
and so on,. and so on....