Пример #1
0
        public void SetThermostatHeatSetpoint(CommandContract unit)
        {
            int temp = Helper.ConvertTemperature(unit.value);

            Event.WriteVerbose("WebService", "SetThermostatCoolSetpoint: " + unit.id + " to " + unit.value + "F (" + temp + ")");
            WebService.HAC.SendCommand(enuUnitCommand.SetLowSetPt, BitConverter.GetBytes(temp)[0], unit.id);
        }
Пример #2
0
        public void SetUnit(CommandContract unit)
        {
            Event.WriteVerbose("WebService", "SetUnit: " + unit.id + " to " + unit.value + "%");

            if (unit.value == 0)
            {
                WebService.HAC.SendCommand(enuUnitCommand.Off, 0, unit.id);
            }
            else if (unit.value == 100)
            {
                WebService.HAC.SendCommand(enuUnitCommand.On, 0, unit.id);
            }
            else
            {
                WebService.HAC.SendCommand(enuUnitCommand.Level, BitConverter.GetBytes(unit.value)[0], unit.id);
            }
        }
Пример #3
0
 public void PushButton(CommandContract unit)
 {
     Event.WriteVerbose("WebService", "PushButton: " + unit.id);
     WebService.HAC.SendCommand(enuUnitCommand.Button, 0, unit.id);
 }
Пример #4
0
 public void SetThermostatHold(CommandContract unit)
 {
     Event.WriteVerbose("WebService", "SetThermostatHold: " + unit.id + " to " + unit.value);
     WebService.HAC.SendCommand(enuUnitCommand.Hold, BitConverter.GetBytes(unit.value)[0], unit.id);
 }
Пример #5
0
 public void SetUnitKeypadPress(CommandContract unit)
 {
     Event.WriteVerbose("WebService", "SetUnitKeypadPress: " + unit.id + " to " + unit.value + " button");
     WebService.HAC.SendCommand(enuUnitCommand.LutronHomeWorksKeypadButtonPress, BitConverter.GetBytes(unit.value)[0], unit.id);
 }