Welcome to Raspberry Pi 5 repository
6. Temperature and Humidity Dashboard
OpenClaw Temperature and Humidity Dashboard Tutorial
Before starting, please complete [01-Peripheral Hardware Configuration], [02-OpenClaw API-KEY Configuration], [03-OpenClaw Model Switching], [04-AI Voice Interaction Configuration], and [05-Three Dialogue Configuration Tests] in the
Preparation Before Usedirectory. If you are only using TUI/WhatsApp, you can skip04. This article assumes the basic environment is ready and only covers the temperature and humidity dashboard project itself.
1. Tutorial Objectives
This article demonstrates OpenClaw's multi-peripheral coordination capability in the desktop dashboard scenario through the combination of "sensor + display + indication". After completing this tutorial, readers will be able to:
- Understand how to combine DHT, OLED, RGB, and servo into a temperature and humidity dashboard
- Communicate with OpenClaw via WhatsApp, TUI, and voice commands
- Complete four project scenarios: real-time reading, OLED meter display, RGB status light, servo pointer mapping
2. Hardware Preparation
- OpenClaw main control board
- DHT temperature and humidity sensor
- OLED display screen
- RGB light strip / RGB LED module
[Optional] AI voice module + speaker- Wiring diagram

3. Software Preparation
Code entry points used in this tutorial:
- Temperature and humidity reading command:
/home/pi/hardware_hal_demo/dht - OLED control command:
/home/pi/hardware_hal_demo/oled - RGB control command:
/home/pi/hardware_hal_demo/rgb - Servo control command:
/home/pi/hardware_hal_demo/cli/servo - Voice entry:
/home/pi/voice_to_openclaw/src/main.py
This project is very similar to the AI weather station, but with different focus:
- AI weather station emphasizes "broadcast" and "explanation"
- Temperature and humidity dashboard emphasizes "display" and "status mapping"
4. Testing Project Basic Capabilities
Before starting this project, please complete an openclaw tui basic conversation self-check first; if you haven't done this yet, see [05-Three Dialogue Configuration Tests]. After passing, proceed with the temperature and humidity dashboard-specific test.
It is recommended to first enter OpenClaw TUI:
openclaw tui
Then test the following types of commands in sequence:
- Read current temperature and humidity
- Display current temperature and humidity on OLED
- If environment is normal, light up green light
- Make servo rotate to 90 degrees
5. Three Ways to Communicate with OpenClaw
| Method | Suitable Scenario | Advantages | Suggested Use |
|---|---|---|---|
| Remote status viewing, classroom demonstration | Convenient for remotely reading current panel data | Demonstrate "remote monitoring panel" | |
| TUI | Local debugging, mapping verification | Easiest to troubleshoot reading and action relationships | First to get the visualization chain working |
| Voice Code | Voice broadcast, desktop assistant | More like daily usage experience | As the final demonstration solution |
If you have the optional AI voice module + speaker, the TUI and WhatsApp conversations need to broadcast OpenClaw's replies. You can run the following program in the terminal. This is not needed for AI voice module conversations.
- Modify the TTS enable parameter
xxxxxxxxxx/home/pi/voice_to_openclaw/.env
xxxxxxxxxxENABLE_TTS=true # This parameter controls whether to broadcast replies. After saving, run the program below in the terminal.- Terminal input
xxxxxxxxxxcd ~/voice_to_openclawsource .venv/bin/activatepython -m src.openclaw_session_tts
5.1 WhatsApp Solution
For WhatsApp integration and bot creation steps, please refer directly to [05-Three Dialogue Configuration Tests]. After creating, you can remotely check the dashboard status in WhatsApp, for example:
- Temperature and humidity dashboard

5.2 TUI Solution
If you have already completed the TUI self-check from chapter 0, directly enter terminal text dialogue:
xxxxxxxxxxopenclaw tuiThen input project-related commands, for example:
- Temperature and humidity dashboard

5.3 Voice Code Solution
xxxxxxxxxxRequires optional AI voice interaction module + speaker
For voice module installation, environment configuration, and basic wake-up flow, please refer directly to [04-AI Voice Interaction Configuration]. After waking up, you can directly speak control content, for example:
- Temperature and humidity dashboard

6. Project Implementation
Note: All demonstrations below use the openclaw tui method for conversation. You can also choose WhatsApp or voice to complete.
6.1 Scenario 1: Real-time Reading
Experiment Objective
Read current temperature and humidity to complete the basic data input for the dashboard.
Effect Description
OpenClaw will first get temperature and humidity readings, which are the basis for subsequent OLED, RGB, and servo mapping.
Example Commands
- Read current temperature and humidity
- What are current temperature and humidity
- Help me refresh current readings
6.2 Scenario 2: OLED Meter Display
Experiment Objective
Display current temperature and humidity results as concise OLED dashboard content.
Effect Description
This is suitable for using metrics or dht_oled method to combine Temp and Hum into a compact screen area, forming a small data panel.
Example Commands
- Display Temp and Hum on OLED
- Make a simple temperature and humidity panel
- Write current temperature and humidity to the screen
6.3 Scenario 3: RGB Status Light
Experiment Objective
Express the current environment as normal, too hot, too cold, or too dry with RGB colors.
Effect Description
This phase can make the dashboard more intuitive. For example, light up green when normal, yellow when too hot, red when abnormal, blue when too cold - you can see the status at a glance.
Example Commands
- Light up green light if environment is normal
- Light up yellow light if temperature is high
- Light up red light if humidity is abnormal
6.4 Scenario 4: Servo Pointer Mapping
Experiment Objective
Map temperature or humidity to servo angles, making the servo point to a position like a dashboard pointer.
Effect Description
For example, map temperature range to 0 to 180 degrees. The higher the current temperature, the more the servo pointer moves to the right. This effect is very suitable for classroom demonstration because "numbers becoming physical actions" is very intuitive.
Example Commands
- Use servo to indicate current temperature like a pointer
- Map current temperature to servo angle
- Make the pointer point to current status