I am trying to program a Philips HUE bulb but I am not even able to send a command to the light. I am programming in C# with the Q42.HueApi.
This is how I tried to turn on the lights if I press a button in my WinForms Application:
namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
IBridgeLocator locator = new HttpBridgeLocator();
ILocalHueClient client = new LocalHueClient("10.1.1.150");
string AppKey = "myappkey";
client.Initialize(AppKey);
}
void commandCreation(object sender, EventArgs e)
{
var command = new LightCommand();
command.On = true;
}
private void button1_Click(object sender, EventArgs e)
{
ILocalHueClient.SendCommandAsync(command);
}
}
}
But at the last line I get the Compiler Error CS0103.