Esempio n. 1
0
        public void SetThermostatHeatSetpoint(CommandContract unit)
        {
            int temp = ((double)unit.value).ToCelsius().ToOmniTemp();

            log.Debug("SetThermostatCoolSetpoint: " + unit.id + " to " + unit.value + "F (" + temp + ")");
            WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.SetLowSetPt, BitConverter.GetBytes(temp)[0], unit.id);
        }
Esempio n. 2
0
        public void SetThermostatHeatSetpoint(CommandContract unit)
        {
            double tempLoad = unit.value;
            string tempUnit = "C";

            if (WebServiceModule.OmniLink.Controller.TempFormat == enuTempFormat.Fahrenheit)
            {
                tempLoad = tempLoad.ToCelsius();
                tempUnit = "F";
            }

            int temp = tempLoad.ToOmniTemp();

            log.Debug("SetThermostatHeatSetpoint: " + unit.id + " to " + unit.value + tempUnit + "(" + temp + ")");
            WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.SetLowSetPt, BitConverter.GetBytes(temp)[0], unit.id);
        }
Esempio n. 3
0
        public void SetThermostatCoolSetpoint(CommandContract unit)
        {
            double tempHigh = unit.value;
            string tempUnit = "C";

            if (WebServiceModule.OmniLink.Controller.TempFormat == enuTempFormat.Fahrenheit)
            {
                tempHigh = tempHigh.ToCelsius();
                tempUnit = "F";
            }

            int temp = tempHigh.ToOmniTemp();

            log.Debug("SetThermostatCoolSetpoint: {id} to {value}{tempUnit} {temp}", unit.id, unit.value, tempUnit, temp);
            WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.SetHighSetPt, BitConverter.GetBytes(temp)[0], unit.id);
        }
Esempio n. 4
0
        public void SetUnit(CommandContract unit)
        {
            log.Debug("SetUnit: " + unit.id + " to " + unit.value + "%");

            if (unit.value == 0)
            {
                WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Off, 0, unit.id);
            }
            else if (unit.value == 100)
            {
                WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.On, 0, unit.id);
            }
            else
            {
                WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Level, BitConverter.GetBytes(unit.value)[0], unit.id);
            }
        }
Esempio n. 5
0
 public void PushButton(CommandContract unit)
 {
     log.Debug("PushButton: " + unit.id);
     WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Button, 0, unit.id);
 }
Esempio n. 6
0
 public void SetThermostatHold(CommandContract unit)
 {
     log.Debug("SetThermostatHold: " + unit.id + " to " + unit.value);
     WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Hold, BitConverter.GetBytes(unit.value)[0], unit.id);
 }
Esempio n. 7
0
 public void SetUnitKeypadPress(CommandContract unit)
 {
     log.Debug("SetUnitKeypadPress: " + unit.id + " to " + unit.value + " button");
     WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.LutronHomeWorksKeypadButtonPress, BitConverter.GetBytes(unit.value)[0], unit.id);
 }
Esempio n. 8
0
 public void SetThermostatFanMode(CommandContract unit)
 {
     log.Debug("SetThermostatFanMode: {id} to {value}", unit.id, unit.value);
     WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Fan, BitConverter.GetBytes(unit.value)[0], unit.id);
 }