michielpost / Q42.HueApi

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

bug in the GetSensorsAsync() call #79

Closed StefanRademakers closed 8 years ago

StefanRademakers commented 8 years ago

Seems there's is another bug in the GetSensorsAsync() call

Sensor scene = JsonConvert.DeserializeObject (prop.Value.ToString ());

The prop.value:

{ "state": { "daylight": null, "lastupdated": "none" }, "config": { "on": true, "configured": false, "sunriseoffset": 30, "sunsetoffset": -30 }, "name": "Daylight", "type": "Daylight", "modelid": "PHDL00", "manufacturername": "Philips", "swversion": "1.0" }

Some extra info

I did not create any sensors myself, only through the philips hue app. But I noticed a motion sensor that was not initialised in the list of sensors..

Some bridge and other info

Bridge ID: 001788FFFE220F12 Model ID: BSB002 API Version: 1.15.0 Software Version: 01035934 Zigbee Channel: 20 Current Device Name: Nexus 5X OS: Android 7.0

michielpost commented 8 years ago

Which version of Q42.HueApi are you using? With the latest version I can deserialize the posted json to a Sensor object.

Any more details about the exception you're getting?

StefanRademakers commented 8 years ago

My bad, I found the problem, I thought that I was running the latest version 3.2.0, and I am. But, I have multiple PCL projects in this solution and one solution had the previous version referenced.

All is running fine now, lets have some fun with the new motion sensors!

Thanks and sorry for wasting your time.

michielpost commented 8 years ago

np. Let me know if you have an app or something else publicly available so I can add it to the list of apps that use Q42.HueApi: https://github.com/Q42/Q42.HueApi#apps-that-use-q42hueapi