michielpost / Q42.HueApi

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

Uri and command send to bridge is case-sensitive #145

Closed jurgen-kluft closed 6 years ago

jurgen-kluft commented 6 years ago

When sending a light or group command with Q42.HueApi to the bridge it always results in an error. When inspecting the command send to the bridge it looks like this: "/groups/1/action/On". This seems to be wrong and should have the 'On' part as 'on'. If i use the HUE debug tool i see that with the 'On' in the command i get an error, but with 'on' it results in success.

Is this something that others have encountered ?

Btw. i am compiling and running this with .NET Core 2.0 on Mac OS using Visual Studio Code.

jurgen-kluft commented 6 years ago

Hmm, found it. I did not have all the correct 'DefineConstants' in my project to have NewtonSoft.JSON build in such a way that it uses the DefaultSerializationBinder which results in code paths that take the property name instead.