Ejemplo n.º 1
0
 public void EnableValve(string name, int durationMins)
 {
     foreach (IrrigationPort port in currentState.PortsConfiguration.ports)
     {
         if (port.name == name)
         {
             EnablePortMessage mes = new EnablePortMessage();
             mes.number        = port.number;
             mes.configuration = PortConfigurationEnum.On;
             mes.duration      = durationMins;
             WebClientHelper.PostJSONData(this.location + "php/api/set_valves_config.php?access_token="
                                          + accessKey, mes, null);
         }
     }
 }