michielpost / Q42.HueApi

C# helper library to talk to the Philips Hue bridge
MIT License
411 stars 114 forks source link

GetNewLightsAsync broken in API v. 1.7 #37

Closed ddivita closed 9 years ago

ddivita commented 9 years ago

The Light object collection comes back with 0 items when there are new lights. I think the JSON coming back may be different than previous versions.

michielpost commented 9 years ago

Can you post the json the bridge is returning? I don't have a v1.7 bridge here.

Is it only the GetNewLightsAsync that returns 0 items? Or is the GetLightsAsync also returning 0 items?

ddivita commented 9 years ago

I only noticed this for new lights. Here is the JSON

{ "11": { "name": "LightStrips 1" }, "lastscan": "2015-04-30T14:29:36" }

michielpost commented 9 years ago

I did some testing and it's a valid response and works fine here. It returns a collection with 1 Light. Are you able to debug it to see where it goes wrong?

ddivita commented 9 years ago

It did end up working for me, by the way. For some reason it was taking longer than a minute to come back with new lights. I had to adjust the wait time in my app. Using the API Debug tool that is built into the bridge took less time so I assumed it may have been an issue with the library.