Skip to content

LoRa PPT & WAN empowered thermostat for home automation using the M5 Stack M5Dial

License

Notifications You must be signed in to change notification settings

VashJuan/M5DialThermo

Repository files navigation

🌡️ M5Dial Smart Thermostat

A precision temperature control system with wireless LoRa communication for home heating automation.

📚 Documentation

Complete documentation is organized into four guides:

For end users - Features, operation, LED status codes, and basic troubleshooting

  • Temperature display and control
  • Heating operation
  • Receiver LED status codes
  • Power management
  • Basic troubleshooting

For installation - Pin connections, baud rates, wiring diagrams, and technical specifications

  • Complete wiring diagrams
  • Pin assignments (M5Dial & XIAO)
  • UART baud rate configuration (9600 - factory default)
  • Grove-Wio-E5 setup
  • Power requirements
  • Range optimization

For setup - Communication modes, network configuration, and connectivity troubleshooting

  • P2P vs LoRaWAN modes
  • LoRa configuration
  • WiFi setup (time sync only)
  • Range testing
  • Communication troubleshooting
  • Security considerations

👨‍💻 Developer Guide

For developers - Build instructions, code architecture, and development workflow

  • Development environment setup
  • Build and upload procedures
  • Code architecture
  • Communication protocol
  • Power management implementation
  • Adding features

Quick Start

User Setup

  1. Read User Guide for operation
  2. Plug in both units (M5Dial and receiver)
  3. Watch receiver LED - should pulse then show steady patterns
  4. Rotate dial to adjust base temperature (0.5°F per click, 50-90°F range)
  5. Press button to reset temperature to initial configured value
  6. System automatically controls heating based on temperature

Hardware Setup

  1. Follow Hardware Guide for wiring
  2. Connect Grove-Wio-E5 modules to both devices
  3. Current baud rate: 9600 (both devices - Grove-Wio-E5 factory default)
  4. Power on, optionally check serial monitor at 115200 baud for debug messages.

Developer Setup

  1. Read Developer Guide
  2. Install VS Code + PlatformIO
  3. Copy secrets_template.h to secrets.h
  4. Build and upload code & data file. NOTE: both devices must be in 'code upload' mode for these next steps (power them on while holding down their RESET buttons):
    pio run --target upload --upload-port COM4
    pio run --target uploadfs --upload-port COM4
    cd receiver && pio run --target upload --upload-port COM6 ; cd ..
  5. Power cycle both devices within a minute or so of each other. (Other sequences have not been tested.)

System Overview

Transmitter (M5Dial):

Receiver (XIAO ESP32S3):

Communication:

  • P2P Mode (default) - Direct device-to-device
  • LoRaWAN Mode (fallback) - Network infrastructure
  • Automatic mode fallback for reliability

Key Features

  • ✅ Precision temperature control (±0.25°C accuracy)
  • ✅ Wireless LoRa communication (100-300m indoor range)
  • ✅ Automatic temperature scheduling
  • ✅ Power-optimized battery operation
  • ✅ Safety timeout protection
  • ✅ Dual communication modes with fallback
  • ✅ Visual status indicators

Safety Features

  • 🛡️ 10-minute timeout auto-shutoff
  • 🛡️ Always starts with heater OFF
  • 🛡️ Watchdog timer protection
  • 🛡️ State verification
  • 🛡️ Communication loss detection

Hardware Requirements

  • M5Stack Dial (ESP32-S3)
  • MCP9808 temperature sensor
  • Seeed XIAO ESP32S3
  • 2x Grove-Wio-E5 LoRa modules
  • Relay module for heater control
  • Optional: Status LED, battery pack

Current Configuration

LoRa UART Baud Rate: 9600 (Grove-Wio-E5 factory default)
USB Serial Monitor: 115200
Connection Timeout: 3 minutes
Auto Baud Search: Disabled (for reliable sync)

See Hardware Guide - UART Configuration for details.

Support

  • Issues: Open an issue on GitHub
  • Questions: See documentation guides above
  • Updates: Check for firmware updates

License

MIT License - See LICENSE file

Author

John Cornelison
[email protected]
Version 2.0.0 - January 2026


Safe, efficient home heating control 🏠🔥

About

LoRa PPT & WAN empowered thermostat for home automation using the M5 Stack M5Dial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published