Exemplo n.º 1
0
 public void RecallScene(ushort i)
 {
     try
     {
         if (HueBridge.Authorized == true && HueBridge.Populated == true)
         {
             String payload = String.Format("{0}\"scene\":\"{1}\"{2}", '{', SceneID[i], '}');
             String json    = HueBridge.SetScene(RoomID, payload);
             if (json.Contains("success"))
             {
                 CrestronConsole.PrintLine("Scene changed");
             }
         }
         else
         {
             CrestronConsole.PrintLine("Bridge not authorized");
         }
     }
     catch (Exception e)
     {
         CrestronConsole.PrintLine("Exception is {0}", e);
     }
 }