Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
BETTESWORTHConstruction
Arduino

DIY Zigbee Temperature and Humidity Meter with the XIAO ESP32-C6

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build a compact temperature-and-humidity sensor that sends readings to Home Assistant over Zigbee. The project uses Seeed Studio’s XIAO ESP32-C6, a Grove SHT31 sensor and a XIAO Grove base. It is a practical alternative to a finished sensor when you want customizable firmware, a repairable design and control over the enclosure.

This is a reference implementation rather than a validated commercial product: published battery runtime, complete-device sleep current, long-term accuracy, Zigbee range and cross-integration compatibility are not established. The XIAO’s low-power specification and the SHT31’s sensor specifications should not be mistaken for measured performance from the assembled device.

As an Amazon Associate I earn from qualifying purchases.

What you will build

The signal path is straightforward:

SHT31 sensor
   ↓ I2C
XIAO ESP32-C6
   ↓ Zigbee
Zigbee coordinator
   ↓
Home Assistant

The SHT31 measures temperature and relative humidity over I2C. The XIAO ESP32-C6 publishes those readings through a Zigbee end-device endpoint. Home Assistant receives the data through a Zigbee coordinator such as the Home Assistant Connect ZBT-1.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The sensor does not need Wi-Fi for its connection to Home Assistant. Home Assistant still needs its normal network connection, and the Zigbee coordinator must be connected to the Home Assistant system.

#1 Best Overall
XIAO‑ESP32‑C6 Antenna Compatible Case
  • Compact and lightweight design. 1.895in × 1.055in × 0.38in, 9 grams
  • Fully breadboard compatible for seamless prototyping and testing
  • All ports, buttons, and connectors remain fully accessible
  • 3D printed in matte PETG at 0.12mm layer height for durability and a refined
  • PETG construction offers UV resistance, impact strength, and thermal stability

Parts and tools

Part Purpose
Seeed Studio XIAO ESP32-C6 Microcontroller and Zigbee radio
Grove Temperature & Humidity Sensor SHT31 Temperature and humidity measurement
Grove Shield/Base for Seeeduino XIAO Grove connector and easier assembly
USB-C data cable Programming and initial power
Zigbee coordinator Connects the sensor to Home Assistant
Optional protected Li-ion or LiPo battery Portable operation
Optional 3D printer, screws and filament Enclosure

You may see the expansion hardware called a “XIAO expansion board” in the original project. The linked BOM and enclosure identify the relevant accessory as the Grove Shield/Base for Seeeduino XIAO. Confirm the product and connector layout before ordering.

The standard XIAO ESP32-C6 may arrive without headers. Beginners should consider the pre-soldered version, or solder headers to the standard board before fitting it to the Grove base. The pre-soldered board has the same controller and Zigbee capability; the extra cost is for convenience.

Prices, availability, tax and shipping change by region. Treat the historical product-page prices—approximately $5.20 for the standard board and $6.20 for the pre-soldered version—as price signals, not current quotations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why these components?

The XIAO ESP32-C6 is a small 21 × 17.8 mm board built around a 160 MHz RISC-V processor, with 512 KB SRAM and 4 MB flash. Its ESP32-C6 platform supports Wi-Fi 6, Bluetooth Low Energy, Zigbee and Thread. Seeed lists a deep-sleep figure of 15 μA, but that is a board specification, not the expected consumption of this sensor with its SHT31, regulator, expansion board, battery and Zigbee activity. See the current Seeed setup documentation for specifications and revisions.

Seeed lists typical SHT31 accuracy of approximately ±0.3 °C for temperature and ±2% RH for relative humidity. Those are sensor specifications. Actual readings can be affected by enclosure heat, poor airflow, condensation, the battery, charging circuitry and the sensor’s position relative to the ESP32-C6. A higher-specification alternative is the Grove SHT35, which Seeed lists at approximately ±0.1 °C and ±1.5% RH; it requires corresponding firmware and library changes.

Assemble and wire the hardware

  1. If necessary, solder headers to the XIAO ESP32-C6.
  2. Insert the XIAO into the Grove base, checking orientation and pin alignment.
  3. Connect the Grove SHT31 to the base’s I2C Grove port.
  4. Power the board from USB-C for initial testing.
  5. Connect a battery only after the board uploads and operates correctly.

The Grove cable carries the same essential signals:

SHT31 signal Connection
VCC 3.3 V-compatible supply
GND Ground
SDA I2C SDA
SCL I2C SCL

Use the labels printed on your particular base. If you bypass the Grove base, connect the SHT31 directly to the XIAO’s 3.3 V, GND, SDA and SCL pins. Do not assume that every third-party XIAO accessory routes the same physical pins.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a battery and charging arrangement designed for the board. Do not connect an unprotected cell, reverse the polarity or feed a voltage outside the board’s documented input range.

Rank #2
AITRIP 2PCS ESP32-C3 MINI Development Board Extended/Expansion Board, Esp32 C3 Esp32-c3 Super Mini 4MB Wi-Fi B-luetooth Development Board(Only Expansion Board)
  • The expansion board allows for the connection of an external 3.7V lithium battery and supports charging the battery via USB
  • The ESP32-C3 SUPERMINI expansion board is specifically designed for the ESP32-C3 SUPERMINI development board. It addresses many limitations of the ESP32C3 SUPERMINI development board.
  • If a higher voltage output is required, you can short the PCB (as shown in the image below). In this case, VCC1 and VCC2will output the power supply voltage of 3.7V.
  • The expansion board provides a better power supply solution, featuring two power outputs: VCC1 and VCC2 for ESP32-C3/ ESP32-S3 /ESP32-H2 /ESP32-C6
  • All 10 GPIO pins are extended, making it convenient for users to connect various sensors.

Install Arduino support

Seeed’s current documentation requires Arduino IDE 2.0.8 or newer for its documented setup and an ESP32 Arduino platform above 3.0.0. Package requirements can change, so check the current XIAO ESP32-C6 guide if menu labels differ.

  1. Install a current stable Arduino IDE.
  2. Open File → Preferences.
  3. Add this URL to Additional boards manager URLs:
    https://espressif.github.io/arduino-esp32/package_esp32_index.json
  4. Open Tools → Board → Boards Manager.
  5. Search for and install the Espressif ESP32 platform.
  6. Select the XIAO ESP32-C6 variant under Tools → Board.
  7. Select the correct USB port under Tools → Port.

Before installing Zigbee firmware, upload Arduino’s Blink example. This separates cable, USB, bootloader and board-selection problems from sensor and Zigbee problems. A charge-only USB cable can power the board without creating an upload port; use a known data-capable cable.

Select Zigbee End Device mode

This sensor is intended to operate as a Zigbee end device, not as a coordinator or router. In Arduino’s Tools menu, select the ESP32-C6 Zigbee mode corresponding to Zigbee End Device. The exact menu wording depends on the installed ESP32 core version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The source project deliberately includes:

#ifndef ZIGBEE_MODE_ED
#error "Zigbee end device mode is not selected in Tools->Zigbee mode"
#endif

If compilation stops there, select End Device mode and compile again. The error is a configuration check, not a sensor fault.

Install the SHT31 library

Install the exact SHT31 library used by the project source through Arduino’s Library Manager, and record the installed version. Several libraries have similar names and different method signatures. If Arduino reports duplicate libraries, remove or rename older copies and confirm which library is selected in the compile output.

The original project is available on Hackster. Use its complete source sketch as the API reference for the selected library and ESP32 Arduino core; Zigbee and sensor-library APIs can change between releases.

Firmware essentials

The implementation uses a temperature endpoint and adds humidity support:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ZigbeeTempSensor zbTempSensor = ZigbeeTempSensor(10);
SHT31 sht31 = SHT31();

The important firmware stages are:

  1. Initialize the SHT31 and stop with a diagnostic if initialization fails.
  2. Configure the ESP32-C6 radio pins and Zigbee end-device mode.
  3. Register the Zigbee temperature endpoint.
  4. Add the humidity sensor cluster.
  5. Start Zigbee and wait for network connection.
  6. Read the SHT31, validate the result and update the Zigbee attributes.
  7. Report at a sensible interval.
  8. Provide a long-press factory-reset path.

At minimum, add initialization handling similar to this, adjusted to the return type of your installed SHT31 library:

Rank #3
XIAO-ESP32-C6 Case
  • Compact and lightweight design. 1.05in × 0.96in × 0.48, 4 grams
  • Fully breadAll ports, buttons, and connectors remain fully accessible
  • All ports, buttons, and connectors remain fully accessible
  • 3D printed in matte PETG at 0.12mm layer height for durability and a refined finish
  • PETG construction offers UV resistance, impact strength, and thermal stability
if (!sht31.begin()) {
  Serial.println("SHT31 initialization failed");
  while (true) {
    delay(1000);
  }
}

Also reject invalid readings before publishing them. A disconnected sensor should produce a clear serial error, not stale or nonsensical values.

The original code uses:

zbTempSensor.addHumiditySensor(0, 100, 1);
zbTempSensor.setReporting(1, 0, 1);

In the source implementation, the first call describes a 0–100 humidity range with a tolerance of 1. The second configures reporting around a change threshold; the delta is expressed in tenths of a degree Celsius, so a temperature delta of 1 represents 0.1 °C. Confirm the meaning against the Zigbee library version you install rather than treating these arguments as universal API settings.

The demonstration task reads and calls report() every second. That is useful for bench testing, but unnecessarily chatty for many battery installations. A normal indoor-monitoring interval is usually 30–60 seconds; a battery-oriented design should wake, measure, report and enter a tested low-power state on a longer schedule. Replacing delay(1000) with vTaskDelay(pdMS_TO_TICKS(1000)) can be a more RTOS-friendly refinement, but it does not by itself create deep-sleep operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Upload and check the serial output

  1. Connect the XIAO by USB-C.
  2. Select the XIAO ESP32-C6 and its serial port.
  3. Confirm Zigbee End Device mode.
  4. Compile and upload the sketch.
  5. Open Serial Monitor at 115200 baud.

Startup output should be similar to:

Starting Zigbee...
Zigbee started successfully!
Connecting to network

The sketch should also print temperature and humidity readings. If it cannot initialize the sensor, check the Grove port, cable, power and I2C routing before troubleshooting Zigbee.

Pair the sensor with Home Assistant

You need Home Assistant, a supported Zigbee integration and a coordinator. The original project uses Home Assistant Connect ZBT-1 as an example. The sensor is not automatically guaranteed to work identically with every coordinator stack.

  1. Open your Home Assistant Zigbee integration.
  2. Enable permit-join or add-device mode.
  3. Power or reset the sensor near the coordinator.
  4. Wait for discovery to complete.
  5. Assign the device to an area and rename its entities.

A successful pairing should expose temperature and humidity entities. Change the surrounding temperature or humidity gradually, then confirm that values update and history graphs begin populating. Test a restart before installing the sensor permanently.

Compatibility depends on the endpoint, clusters, attributes, manufacturer and model metadata, coordinator firmware and integration. The source project demonstrates Home Assistant operation but does not provide a complete interoperability matrix for ZHA, Zigbee2MQTT and other coordinator stacks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Factory reset and re-pairing

The source firmware provides a boot-button reset path:

Rank #4
ESP32-C6 2.16inch AMOLED Touch Display Dev Board, 480 × 480 Pixels 16.7M Color Capacitive Touch Screen, Integrates 6-Axis IMU, RTC Chip, etc. Supports Dual Microphones, Wi-Fi 6 and BLE 5
  • ESP32-C6-Touch-AMOLED-2.16 development board equipped with ESP32-C6 32-bit RISC-V processor, up to 160MHz main frequency. Supports Wi-Fi 6, Bluetooth 5 and IEEE 802.15.4 (Zigbee 3.0 and Thread) wireless communication, onboard antenna
  • Built-in 512KB HP Static RAM, 16KB LP Static RAM, 320KB ROM, and external 16MB Flash memory
  • Onboard 2.16inch AMOLED capacitive touch display for clear color picture display, 480 × 480 resolution, 16.7M color, QSPI communication interface. Type-C port. Suitable for various smart device development, and can realize human-machine interaction function
  • Onboard QMI8658 6-axis IMU (3-axis accelerometer and 3-axis gyroscope), PCF85063 RTC chip, TF card slot, Dual microphone array, Low power audio codec chip, MX1.25 Lithium Batt header, etc. (without Lithium Batt)
  • Onboard KEY and BOOT programmable buttons for easy custom function development. Adapting 1 × I2C, 1 × UART and 1 × USB pads for external devices connection and debugging. Adopts AXP2101 IC for efficient power management
  1. Hold the boot button for more than three seconds.
  2. Release it.
  3. Allow the device to reboot.
  4. Enable permit-join in Home Assistant.
  5. Add the device again as a new Zigbee device.

Reset APIs and reboot behavior can vary with the exact board and library version. If the button does not behave as expected, watch the 115200-baud serial output and verify the reset implementation in the source sketch.

Enclosure and sensor placement

The published enclosure is approximately 60 × 30 × 30 mm and includes separate top, bottom and middle connector parts. Files are listed through the enclosure listing.

  • Leave the SHT31 vent open.
  • Provide openings for airflow; do not seal the sensor in an airtight box.
  • Keep it away from the ESP32-C6, regulator, charger and battery where practical.
  • Avoid direct sunlight, radiators, HVAC outlets and condensation-prone locations.
  • Allow readings to thermally settle after installation.

Printed fit depends on printer calibration, filament shrinkage, board variant, battery dimensions and the chosen expansion board. The enclosure’s nominal dimensions are not a guarantee that every assembly will fit.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

Upload fails or no serial port appears

Try a known data-capable USB cable, another USB port and the correct XIAO board variant. Confirm that the board has headers if the Grove base requires them. Upload Blink before investigating the application sketch.

The SHT31 is not detected

Check VCC, GND, SDA and SCL, then verify that the Grove cable is connected to the base’s I2C socket. Confirm that the installed library matches the code. If the sensor is disconnected, the firmware should report initialization or reading errors over serial.

Pairing fails

  1. Move the sensor close to the coordinator.
  2. Enable permit-join before powering or resetting it.
  3. Confirm that the firmware was compiled as a Zigbee End Device.
  4. Factory-reset it using the three-second button procedure.
  5. Check serial output at 115200 baud.

A powered board is not necessarily a joined Zigbee device. If it repeatedly remains at “Connecting to network,” it has not joined or is not in the expected pairing state.

Temperature appears but humidity is missing

Inspect the device’s exposed clusters and integration logs. The coordinator may recognize the temperature endpoint but not the humidity cluster as implemented, or the firmware may not be producing valid humidity readings. Do not assume that missing humidity means the Grove wiring is wrong.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Readings are inaccurate

Check airflow, sensor orientation, condensation, supply voltage and heat from nearby electronics. Let the sensor stabilize after startup. The SHT31’s ±0.3 °C and ±2% RH figures are product specifications, not independent accuracy measurements inside this enclosure.

Best Value
XIAO-ESP32-C6 Case (6)
  • Compact and lightweight design. 1.05in × 0.96in × 0.48, 4 grams
  • Fully breadAll ports, buttons, and connectors remain fully accessible
  • All ports, buttons, and connectors remain fully accessible
  • 3D printed in matte PETG at 0.12mm layer height for durability and a refined finish
  • PETG construction offers UV resistance, impact strength, and thermal stability

The device disappears on battery

Possible causes include voltage sag, battery or expansion-board current draw, poor Zigbee routing, repeated reports, unexpected rejoining and the absence of a genuine low-power state. The XIAO’s 15 μA deep-sleep figure excludes the complete assembly and radio wake cycles. Measure the finished device if runtime matters.

Power and reporting trade-offs

Profile Suggested behavior Use
Fast testing Read and report every 1 second Bench demonstrations
Normal monitoring Read every 30–60 seconds Room dashboards and alerts
Battery-oriented Wake, measure, report and sleep on a longer schedule Portable installations

Do not publish a battery-life estimate without measuring battery capacity, average current, complete-device sleep current, reporting frequency, chemistry, protection circuitry and actual runtime. “Battery-powered” describes the hardware arrangement here, not a verified operating duration.

DIY build or finished sensor?

Choose this project if you value firmware control, learning, repairability, custom enclosures and future expansion. The same platform could later support pressure, air-quality sensing, a display or custom Home Assistant alerts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A finished Zigbee sensor is the better choice when you need immediate pairing, a tested battery compartment, a polished enclosure, manufacturer support and minimal maintenance as coordinator software changes. A Wi-Fi/ESPHome or Bluetooth sensor may also be preferable if your existing network and power requirements favor those technologies.

The Grove base is easier for beginners and reduces wiring mistakes. Direct wiring can make the final device smaller and provide more control over power switching, but requires careful pin mapping and a redesigned enclosure. Do not substitute an SHT35, AHT20, DHT20, DHT22 or BME280 without changing and testing the library, initialization, measurement calls, error handling and any voltage or address configuration.

Verdict

The XIAO ESP32-C6 and Grove SHT31 make a sensible Zigbee learning project for Home Assistant users who want a small, customizable environmental sensor. The Grove connection keeps assembly approachable, while the ESP32-C6 leaves room for future Zigbee and Thread experiments.

Its limits are equally important: the demonstration firmware reports too frequently for many battery builds, complete-device runtime is unverified, enclosure placement affects readings and coordinator compatibility should be tested rather than assumed. Build and pair it first over USB, validate the sensor and Zigbee entities, then optimize reporting, power and enclosure airflow for the location where it will operate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

Bestseller No. 1
XIAO‑ESP32‑C6 Antenna Compatible Case
XIAO‑ESP32‑C6 Antenna Compatible Case
Compact and lightweight design. 1.895in × 1.055in × 0.38in, 9 grams; Fully breadboard compatible for seamless prototyping and testing
$10.00
Bestseller No. 2
Bestseller No. 3
XIAO-ESP32-C6 Case
XIAO-ESP32-C6 Case
Compact and lightweight design. 1.05in × 0.96in × 0.48, 4 grams; Fully breadAll ports, buttons, and connectors remain fully accessible
$10.00
Bestseller No. 5
XIAO-ESP32-C6 Case (6)
XIAO-ESP32-C6 Case (6)
Compact and lightweight design. 1.05in × 0.96in × 0.48, 4 grams; Fully breadAll ports, buttons, and connectors remain fully accessible
$22.00

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.