Skip to main content

sht3x

High-accuracy temperature and humidity sensing with the Sensirion SHT3x series via I2C.

Overview

The sht3x node reads temperature and humidity from the Sensirion SHT30, SHT31, or SHT35 sensor via I2C. Known for exceptional accuracy and long-term stability, this sensor family is the gold standard for precision climate monitoring in greenhouses, cleanrooms, and HVAC systems.

±0.2°C
Temp Accuracy
±2% RH
Humidity Accuracy
I2C
Interface
3.3V
Power

Wiring (I2C)

Connection

VCC → 3.3V

GND → GND

SDA → GPIO 2 (Pin 3)

SCL → GPIO 3 (Pin 5)

Default address: 0x44 (ADDR→GND) or 0x45 (ADDR→VCC)

Sensor Variants

SHT30: ±0.3°C / ±3% RH (budget)

SHT31: ±0.2°C / ±2% RH (standard)

SHT35: ±0.1°C / ±1.5% RH (premium)

Properties

Property Type Default Description
bus number 1 I2C bus number
address number 0x44 I2C address (0x44 or 0x45)
repeatability string "high" "low", "medium", or "high"
heater boolean false Enable on-chip heater for defogging
interval number 5000 Reading interval in milliseconds

Output

{
  "payload": {
    "temperature": 23.45,
    "humidity": 52.8
  },
  "temperature": 23.45,
  "humidity": 52.8,
  "dewPoint": 13.2,
  "timestamp": 1640000000000
}

Example: Greenhouse Climate Monitoring

Monitor temperature and humidity with alerts when conditions drift outside optimal ranges for plant growth.

sht3x function mqtt-out
// Function node: Greenhouse climate controller
var temp = msg.temperature;
var humidity = msg.humidity;

// Optimal ranges for tomatoes
var tempMin = 18, tempMax = 27;
var humMin = 60, humMax = 80;

var alerts = [];
var actions = [];

if (temp < tempMin) {
    alerts.push("Temperature too low: " + temp + "°C");
    actions.push("heater_on");
} else if (temp > tempMax) {
    alerts.push("Temperature too high: " + temp + "°C");
    actions.push("fan_on");
}

if (humidity < humMin) {
    alerts.push("Humidity too low: " + humidity + "%");
    actions.push("mister_on");
} else if (humidity > humMax) {
    alerts.push("Humidity too high: " + humidity + "%");
    actions.push("vent_open");
}

msg.payload = {
    temperature: temp,
    humidity: humidity,
    status: alerts.length === 0 ? "optimal" : "alert",
    alerts: alerts,
    actions: actions
};

return msg;

Use Cases

Greenhouse Automation

Precise climate control for optimal plant growth

Cleanroom Monitoring

High-accuracy humidity tracking for sensitive environments

HVAC Control

Feed data into heating and ventilation systems

Museum Conservation

Maintain strict environmental conditions for artifacts

Related Nodes