SAMPLE

The Thermostat Lock object is connected in series between the UI and the VRF system. Additionally, if the air conditioner has its wired controller, the output points from the VRF are also connected to the Thermostat Lock object. This configuration ensures that even if a command is issued from the air conditioner via the remote, the lock function will still be enforced.

To activate the Thermostat Lock object, it must be enabled via the Enable input.

SCRIPT SAMPLE

In this example, the values from Value 1 and Value 2 inputs are multiplied together, and the result is provided to the Output.

/*Example java script base schema*/
(
  Class.extend({
      /*Port defination*/
      INPUT_1:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'INPUT_1'/*unique name required*/,
                order: 1/*required*/,
                portType: 'input'/*required*/,
                titles: {default: 'Value1'} /*required*/},
      INPUT_2:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'INPUT_2'/*unique name required*/,
                order: 2/*required*/,
                portType: 'input'/*required*/,
                titles: {default: 'value2'} /*required*/},
      OUTPUT_1:{ value:0/*required*/,
                connections: {}/*required*/,
                name: 'OUTPUT_1'/*unique name required*/,
                order: 1/*required*/,
                portType: 'output'/*required*/,
                titles: {default: 'output-1'} /*required*/},
      /*Example 'run' function.*/
      run:function(){
          /*Sample operation.*/
          _this_.setOutputValue('OUTPUT_1',this.INPUT_1.value * this.INPUT_2.value);
      },
      /*All input changed events.*/
      onInputChanged:function(input,value){
          /*Sample operation.*/
          _this_.setOutputValue('OUTPUT_1','Name:'+input.name+' value:'+value);
      }
	})
);

Last updated