Class Thermoregulation


  • public class Thermoregulation
    extends BaseOpenMessage
    OpenWebNet Thermoregulation messages (WHO=4)
    Author:
    M. Valla - Initial contribution, G. Cocchi - Contribution for new lib, A. Conte - Added fancoil speed support
    • Constructor Detail

      • Thermoregulation

        protected Thermoregulation​(String value)
    • Method Detail

      • requestWriteSetpointTemperature

        public static Thermoregulation requestWriteSetpointTemperature​(String where,
                                                                       double newSetPointTemperature,
                                                                       Thermoregulation.Function function)
                                                                throws MalformedFrameException
        OpenWebNet message to Manual setting of "N" zone to T temperature *#4*where*#14*T*M## .
        Parameters:
        where - Zone between #1 and #99
        newSetPointTemperature - temperature T between 5.0° and 40.0° (with 0.5° step)
        function - HEATING/COOLING/GENERIC
        Returns:
        message
        Throws:
        MalformedFrameException - in case of error in parameters
      • requestWriteFanCoilSpeed

        public static Thermoregulation requestWriteFanCoilSpeed​(String where,
                                                                Thermoregulation.FanCoilSpeed newFanCoilSpeed)
        OpenWebNet to set the Fan Coil Speed *#4*where*#11*speed##.
        Parameters:
        where - WHERE string
        newFanCoilSpeed - Speed of the Fan Coil
        Returns:
        message
      • requestFanCoilSpeed

        public static Thermoregulation requestFanCoilSpeed​(String where)
        OpenWebNet message request the Fan Coil Speed *#4*where*11##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestWriteFunction

        public static Thermoregulation requestWriteFunction​(String where,
                                                            Thermoregulation.Function newFunction)
        OpenWebNet to set the funcion.
        Parameters:
        where - WHERE string
        newFunction - Function (HEATING, COOLING, GENERIC). HEATING *4*102*where## COOLING *4*202*where## GENERIC *4*302*where##
        Returns:
        message
      • requestWriteMode

        public static Thermoregulation requestWriteMode​(String where,
                                                        Thermoregulation.OperationMode newOperationMode,
                                                        Thermoregulation.Function currentFunction,
                                                        double setPointTemperature)
        OpenWebNet to set the operation mode.
        Parameters:
        where - WHERE string
        newOperationMode - Operation mode (MANUAL, PROTECTION, OFF). MANUAL *#4*where*#14*T*M## (requestWriteSetPointTemperature) PROTECTION *4*302*where## (generic protection) OFF *4*303*where## (generic OFF)
        currentFunction - current thermostat function (HEATING/COOLING/GENERIC)
        setPointTemperature - temperature T between 5.0° and 40.0° (with 0.5° step) to be set when switching to function=MANUAL
        Returns:
        message
      • requestMode

        public static Thermoregulation requestMode​(String where)
        OpenWebNet message request set-point temperature with local offset and operation mode *#4*where*12##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestValveStatus

        public static Thermoregulation requestValveStatus​(String where)
        OpenWebNet message request valves status (conditioning (CV) and heating (HV)) *#4*where*19##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestTurnOff

        public static Thermoregulation requestTurnOff​(String where)
        OpenWebNet message request to turn off the thermostat OFF *4*303*where## .
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestTemperature

        public static Thermoregulation requestTemperature​(String where)
        OpenWebNet message request temperature *#4*where*0##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestSetPointTemperature

        public static Thermoregulation requestSetPointTemperature​(String where)
        OpenWebNet message request the current Thermostat Set Point temperature *#4*where*14## .
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestStatus

        public static Thermoregulation requestStatus​(String where)
        OpenWebNet message N zone device status request *#4*where##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestValvesStatus

        public static Thermoregulation requestValvesStatus​(String where)
        OpenWebNet message N zone valves status request *#4*where*19##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • requestActuatorStatus

        public static Thermoregulation requestActuatorStatus​(String where)
        OpenWebNet message N actuator status request *#4*where*20##.
        Parameters:
        where - WHERE string
        Returns:
        message
      • getActuator

        public int getActuator()
        Returns the actuator form the message WHERE part. WHERE=Z#N --> returns N
        Returns:
        id (int 1-9) of the actuator
      • getActuatorStatus

        public int getActuatorStatus​(int n)
                              throws FrameException
        Extracts status of actuator N from message
        Parameters:
        n - the actuator number
        Returns:
        0=OFF, 1=ON
        Throws:
        FrameException - in case of frame error
      • decodeTemperature

        public static double decodeTemperature​(String _temperature)
                                        throws NumberFormatException
        Convert temperature from BTicino format to number For example: 0235 --> +23.5 (°C) and 1048 --> -4.8 (°C)
        Parameters:
        _temperature - the temperature as String
        Returns:
        the temperature as Double
        Throws:
        NumberFormatException
      • encodeTemperature

        public static String encodeTemperature​(double temp)
        Encodes temperature from float to BTicino format
        Parameters:
        temp - temperature
        Returns:
        String