public void EnableLight(byte r = 255, byte g = 255, byte b = 255, int brightness = 100) { var rgb = (uint)brightness << 24 | r << 16 | g << 8 | b; if (brightness < 1 || brightness > 100) { throw new ArgumentException("Brightness must be in range 1 - 100"); } _transport.SendWriteCommand(Sid, Type, new GatewayLightCommand(rgb)); }
public void TurnOff() { _transport.SendWriteCommand(Sid, Type, new SocketPlugCommand("off")); }