2023-07-18 10:40:18
Example: CoolMasterNet integration
Task
CoolMasterNet device uses TCP instead of RS-232 for communication (as showed in this example), so we’ve updated the script to work with IP.
Create objects on LogicMachine
All objects must have VRV tag set.
Set object names, using the following scheme (full address and function):
L1.101 on/off – 1-bit, unit on/off control
L1.101 setpoint – unit setpoint, 2-byte floating point
L1.101 mode – unit mode, 1-byte (0 = cool, 1 = heat, 2 = fan, 3 = dry, 4 = auto)
L1.101 fspeed – fan speed, 1-byte (0 = low, 1 = medium, 2 = high, 3 = top, 4 = auto)
L1 on/off – 1-bit, on/off control for all units on a given line
L* on/off – 1-bit, on/off control for all units on all lines
You can create status objects by adding “status” to object name, example:
L1.101 on/off status
L1.101 setpoint status
L1.101 mode status
L1.101 fspeed status
L1.101 temp status – room temperature, 2-byte floating point
Note! L1 corresponds to “Line 1” and 101 corresponds to address of A/C unit which are both programmed on CoolMaster device.
Resident script
Create a resident script with 0 sleep interval, change 192.168.3.20 to CoolMasterNet device IP. Status information is polled every 3 seconds.
Source code