prefixkit Ask an engineerAsk Support RU

Zigbee devices Temperature and humidity sensors

HOBEIAN ZG-IR01

Smart IR remote switch. Works with Zigbee2MQTT with no vendor hub or cloud: it pairs with a Zigbee stick and shows up in Home Assistant.

Vendor
HOBEIAN
Model
ZG-IR01
Type
Temperature and humidity sensors
Power
battery: an end device, does not extend the mesh
Firmware updates (OTA)
no

Find it in shops: AliExpress

Links open a search in the shop; some are affiliate links: buying through them costs you nothing extra and supports this site. We do not sell devices or get them from manufacturers.

What it exposes

FeaturePropertyValuesControl
Switch1switch1—settable
Switch2switch2—settable
Switch3switch3—settable
Switch4switch4—settable
Switch5switch5—settable
Switch6switch6—settable
Temperaturetemperature°Cread only
Humidityhumidity%read only
Learn ir codelearn_ir_code—settable
Learned ir codelearned_ir_code—read only
Learned ir timingslearned_ir_timings—read only
Ir code to sendir_code_to_send—settable
Ir emitterir_emitter—settable
Switch1 onswitch1_onstudy, registered, unregisteredsettable
Switch1 offswitch1_offstudy, registered, unregisteredsettable
Switch2 onswitch2_onstudy, registered, unregisteredsettable
Switch2 offswitch2_offstudy, registered, unregisteredsettable
Switch3 onswitch3_onstudy, registered, unregisteredsettable
Switch3 offswitch3_offstudy, registered, unregisteredsettable
Switch4 onswitch4_onstudy, registered, unregisteredsettable
Switch4 offswitch4_offstudy, registered, unregisteredsettable
Switch5 onswitch5_onstudy, registered, unregisteredsettable
Switch5 offswitch5_offstudy, registered, unregisteredsettable
Switch6 onswitch6_onstudy, registered, unregisteredsettable
Switch6 offswitch6_offstudy, registered, unregisteredsettable
Temperature unittemperature_unitcelsius, fahrenheitsettable
Temperature calibrationtemperature_calibration°C · -2…2settable
Humidity calibrationhumidity_calibration% · -30…30settable
Batterybattery% · 0…100read only

MQTT: state and commands

Zigbee2MQTT publishes the device state to zigbee2mqtt/my_device (my_device is the name you give the device). An example message:

{
  "switch1": false,
  "switch2": false,
  "switch3": false,
  "switch4": false,
  "switch5": false,
  "switch6": false,
  "temperature": 21.6,
  "humidity": 46.2,
  "learn_ir_code": false,
  "switch1_on": "study",
  "switch1_off": "study",
  "switch2_on": "study",
  "switch2_off": "study",
  "switch3_on": "study",
  "linkquality": 120
}

Send commands to zigbee2mqtt/my_device/set:

mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"switch1":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"switch2":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"switch3":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"switch4":true}'
mosquitto_pub -t zigbee2mqtt/my_device/set -m '{"switch5":true}'

Watch the topics live from the browser: MQTT client.

Home Assistant automation example

Zigbee2MQTT creates Home Assistant entities from the device name. If it is called my_device, an automation in automations.yaml can look like this:

- alias: "Room too warm"
  mode: single
  triggers:
    - trigger: numeric_state
      entity_id: sensor.my_device_temperature
      above: 26
      for: "00:10:00"
  actions:
    - action: notify.notify
      data:
        message: "Temperature above 26 °C"

Check the YAML: YAML checker.

How to pair it

  1. In Zigbee2MQTT click Permit join.
  2. Put the device in pairing mode: usually a long press of the reset button (5–10 s) until the LED blinks; bulbs: switch the power off and on 5–6 times.
  3. Keep the device close to the coordinator or a router while pairing.
  4. Give it a clear name: MQTT topics and Home Assistant entities are built from it.

Exact procedure and model notes: the device page in the Zigbee2MQTT docs. No coordinator yet: coordinator picker.

Similar devices

Idea?