// Use this for initialization public CoffeeMachineActuator(string id, string state, string shortName) : base(id, state, shortName, "Icons/Coffeemaker", "Brew", null) { this.id = id; this.state = state; this.shortName = shortName; request = RESTRequestFactory.createGETRequest(Settings.URL_CoffeeMachine_GET_Brew); }
public DimmerActuator(string id, string state, string shortName) : base(id, state, shortName, "Icons/Dimmer") { this.INCREASErequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_INCREASE); this.DECREASErequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_DECREASE); this.ONrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_ON); this.OFFrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_OFF); }
// Use this for initialization void Start() { request = RESTRequestFactory.createAllItemsGETRequest(Settings.RestBaseURL); myoRequest = RESTRequestFactory.createMyoGETRequest(Settings.URL_MyoArmband_Status); coffeeRequest = RESTRequestFactory.createCoffeemachineGETRequest(Settings.URL_CoffeeMachine_Status); updateCounter = 0; updateCounterCoffee = 0; }
// Use this for initialization public NormalItemActuator(string id, string state, string shortName, string icon, string On = "On", string Off = "Off") : base(id, state, shortName, icon) { this.id = id; this.state = state; this.shortName = shortName; this.ONrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_ON); this.OFFrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, Settings.POST_OFF); }
public IEnumerator sendColor(int h, int s, int v) { string color = h + "," + s + "," + v; this.Colorrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + hueColor.id, color); return(Colorrequest.performAction()); }
public IEnumerator sendDECREASE() { int value; int currentValue; int.TryParse(state, out currentValue); if (currentValue < 10) { value = 0; } else { value = currentValue - 10; } this.DECREASErequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, value.ToString()); return(DECREASErequest.performAction()); }
public IEnumerator sendState(string state) { stateRequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, state); return(stateRequest.performAction()); }
public HueDimmer(string id, string state, string shortName) : base(id, state, shortName, "Icons/Lamp") { this.ONrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, 100.ToString()); this.OFFrequest = RESTRequestFactory.createPOSTRequest(Settings.RestBaseURL + id, 0.ToString()); }