Connecting GREE air conditioner systems with H1, H2 connector to Wiren Board

From Wiren Board
This is the approved revision of this page, as well as being the most recent.
Other languages:
ONOKOM-AIR-GR-5-MB-B

Purpose

The ONOKOM-AIR-GR-5-MB-B gateway lets you control GREE air conditioner systems with H1, H2 connector and integrate them into a centralized management system over Modbus RTU.

The six-channel relay modules WB-MR6C v.3 are designed for industrial and home automation systems and are intended for direct control of LED, fluorescent lamps, incandescent lamps, and other loads with a rating of up to 10 A (2 kW). They can also be used as general-purpose input-output modules.

The six-channel WB-MR6C v.3 relay modules are designed for industrial and home automation systems and intended for direct control of LED, fluorescent and incandescent lamps and other loads rated up to 10 A (2 kW). They can also be used as general-purpose IO modules.

Each output can carry continuous current up to 16 A and inrush currents up to 80 A. Note that due to the terminal block design, the total nominal switching current per group of three relay outputs is 20 A.

The device is available on the manufacturer's website: ONOKOM-AIR-GR-5-MB-B, where you can also find additional information and technical support.

List of supported devices

Specifications

Parameter Value
Power
Supply voltage 9–28 V DC
Power consumption up to 1 W
Control
Control interface RS-485
Interface isolation Isolated
Communication protocol Modbus RTU, address is set programmatically, factory settings (Modbus address: 1)
RS-485 interface parameters Set programmatically, defaults:
  • baud rate — 9600 bps;
  • data — 8 bits;
  • parity bit — none (N);
  • stop bits — 2
Operating conditions
Air temperature From 0 to +40 °C
Warranty period 2 years
Service life 5 years

Device data sheet

Connecting to the Wiren Board controller

Safety rules:

  • before connecting, disconnect power from the air conditioner and gateway;
  • verify the correctness of connections before applying power;
  • connect the device only to the connectors specified in the instructions;
  • observe the recommended power supply level for device operation;
  • do not place the device in damp locations.

Connection instructions

Connection diagram

Connection procedure

  1. Connect the interface cable from the GR-A5 adapter to the H1, H2 terminals of the wired remote control.
  2. Connect power to the gateway.
  3. Use the interface cable to connect the GR-A5 adapter to the ONOKOM gateway.
  4. Use Ethernet Cat6 UTP or RS-485 cable to connect the ONOKOM gateway to the Wiren Board controller.

Troubleshooting

  1. Check that the interface cable is properly connected to the air conditioner socket:
    • the connector is firmly seated in the air conditioner control board
    • the connector is firmly seated in the gateway
    • the connector is not broken
    • the interface cable wires enter the connector at both ends of the cable
  2. Check the power supply to the gateway. If necessary, measure the voltage at the terminal.
  3. Check that the A and B wires of the RS485 bus are connected correctly, both on the gateway and on the control controller.
  4. Check that the RS485 terminal is firmly seated in the gateway.
  5. Make sure you are using the correct cable for the RS485 bus connection.

Changing the Modbus address of the gateway

By default, all ONOKOM gateways have address 1. The change can be made in several ways:

  1. Changing the Modbus address by writing it to a register
    • Stop the wb-mqtt-serial driver. From the console this can be done with:
      systemctl stop wb-mqtt-serial
      
    • Write the desired Modbus address of the gateway to register 128. From the console this can be done using modbus_client with:
      modbus_client --debug -mrtu -b9600 -pnone -s2 /dev/ttyRS485-1 -a1 -t0x06 -r128 12
      
      This will set address 12 on the device with address 1 connected to port RS485-1.
    • Resume driver operation with:
      systemctl start wb-mqtt-serial
      
  2. Changing the Modbus address using the gateway serial number
    • Stop the wb-mqtt-serial driver. From the console this can be done with:
      systemctl stop wb-mqtt-serial
      
    • Start the bus scanner. From the console this can be done using modbus-scanner with:
      wb-modbus-scanner -d /dev/ttyMOD3 -b 9600
      
    • Perform the address change with:
      wb-modbus-scanner -d /dev/ttyMOD3 -b 9600 -s 305882 -i 3
      
      The serial number should be specified after the -s flag
    • Resume driver operation with:
      systemctl start wb-mqtt-serial
      

Changing the gateway operating speed

To change the gateway operating speed, do the following:

  1. Stop the wb-mqtt-serial driver. From the console this can be done with:
    systemctl stop wb-mqtt-serial
    
  2. Write to register 110 a value that, when multiplied by 100, gives the speed you need. From the console this can be done using modbus_client with:
    modbus_client --debug -mrtu -b9600 -pnone -s2 /dev/ttyRS485-1 -a12 -t0x06 -r110 1152
    
    This will set speed 115200 on the device with address 12 connected to port RS485-1.
  3. Resume driver operation with:
    systemctl start wb-mqtt-serial
    

Display in the Wiren Board controller web interface

Connection parameters
Default
value
Parameter name Parameter
baud_rate 9600 Speed, bps
parity None Parity bit
data_bits 8 Number of data bits
stop_bits 2 Number of stop bits
modbus_adress 1 Default Modbus address
ONOKOM-AIR-GR-5-B display in the device tab

Adding the gateway

Choose "Settings → Configuration files → Configure serial device driver". If the Settings tab is not displayed, check the access level.

wb-mqtt-serial.conf configuration file


Select the serial port to which the device is connected. If the device is connected to ports MOD1/2/3, remember to activate the modules.

Port selection


Check that the port is enabled and configure the communication parameters with the device.

Port parameters


Click "Add any devices manually".

Adding manually


In the device list, find the "Air conditioners" section and choose the device you need.

Device selection


Click "Save settings".

Saving settings


Adding via device search

Choose "Settings → Configuration files → Configure serial device driver". If the Settings tab is not displayed, check the access level.

wb-mqtt-serial.conf configuration file


Select the serial port to which the device is connected. If the device is connected to ports MOD1/2/3, remember to activate the modules.

Port selection


Check that the port is enabled and configure the communication parameters with the device.

Port parameters


Click "Find and add Wiren Board devices".

Automatic device search


Click "Add to wb-mqtt-serial".

Adding the discovered device


Click "Save settings".

Saving settings


Device channels and their values

Air conditioner parameters
Parameter Description Values
State Air conditioner on/off
  • On
  • Off
Mode Operation mode
  • 1 — Heating
  • 2 — Cooling
  • 3 — Automatic
  • 4 — Dehumidification
  • 5 — Ventilation
State and mode Combined status
  • 0 — Off
  • 1 — Heating
  • 2 — Cooling
  • 3 — Auto
  • 4 — Dehumidification
  • 5 — Ventilation
Fan speed Speed level
  • 0 — Auto
  • 1 — Speed 1
  • 2 — Speed 2
  • 3 — Speed 3
  • 4 — Speed 4
  • 5 — Speed 5
Fan speed (extended) Extended modes
  • 0 — Auto
  • 1 — Quiet
  • 2 — Speed 1
  • 3 — Speed 2
  • 4 — Speed 3
  • 5 — Speed 4
  • 6 — Speed 5
  • 7 — Turbo
Air temperature Current indoor temperature

-50-50 °C (read-only)

Outdoor air temperature Current outdoor temperature

-50-50 °C (read-only)

Target temperature Temperature setpoint

16-31 °C

Thermostat Current action
  • 0 — Idle
  • 1 — Heating
  • 2 — Cooling
Horizontal vanes Operation mode
  • 0 — Off
  • 1 — Swing
  • 2 — Lowest position
  • 3 — Low position
  • 4 — Middle position
  • 5 — High position
  • 6 — Highest position
Vertical vanes Operation mode
  • 0 — Stopped
  • 1 — Swing
  • 2 — Leftmost position
  • 3 — Left position
  • 4 — Middle position
  • 5 — Right position
  • 6 — Rightmost position
Turbo mode Activation
  • On/Off
Quiet mode Activation
  • On/Off
Sleep Activation
  • On/Off
Ionization Activation
  • On/Off
Connection Air conditioner link
  • 1 — Present
  • 0 — Absent

Gateway settings

In the Wiren Board controller web interface, you can select modes, specify parameters, and configure polling of the device channels.

Main modes and functions

Main modes and functions

Temperature control

Temperature control

Vanes

Vanes

Additional modes and functions

Additional modes and functions

Indication

Indication

Module data

Module data

Diagnostics

Diagnostics

Connection to an external temperature sensor

Most often, the air conditioner measures the current air temperature using its own sensor in the indoor unit's case. And because the indoor unit is located fairly high up, the readings from this temperature sensor are usually higher than they actually are.

One of the gateway's features is the ability to write the current temperature from an external sensor.

To automatically write the current temperature to the gateway, you can create a small rule.

In the device settings, in the Temperature control section, enable Allow use of external temperature sensor and save the settings.

     Device configuration page

Open the Rules section, click Create, and give the rule a name, for example: ExternalSensorForOnokom.js.


   Device selection

Copy the code shown below:

defineRule ("SyncTemperature", {
 whenChanged: "wb-msw-v3_25/Temperature",
  then: function (newValue) {
   dev["ONOKOM-AIR/Indoor air temperature"] = newValue
 }
});

Instead of wb-msw-v3_25/Temperature specify the MQTT topic of your temperature sensor, and instead of ONOKOM-AIR/Indoor air temperature specify the MQTT topic of the current room temperature on your ONOKOM gateway. For example, ONOKOM-AIR-GR-5-MB-B/Indoor air temperature.

Click Save.

     Saving the rule

After this, the gateway will transmit the current temperature data, and the air conditioner will maintain exactly the temperature you have set.

Device register map

Device register map is available at this link

Device images

Images to embed the device in your projects:

Gallery

Useful links