Exemple #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);
        }
        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);
        }
        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);
        }
Exemple #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);
            }
        }
Exemple #5
0
 public void PushButton(CommandContract unit)
 {
     log.Debug("PushButton: " + unit.id);
     WebServiceModule.OmniLink.Controller.SendCommand(enuUnitCommand.Button, 0, unit.id);
 }
Exemple #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);
 }
Exemple #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);
 }
 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);
 }