Skip to content

Relio : A Matter-Enabled Smart Controller for AC Appliances

License

Notifications You must be signed in to change notification settings

ElektorLabs/Relio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Relio

Relio : A Matter-Enabled Smart Controller for AC Appliances Version: v1

πŸ“– Project Overview

This project is a Matter-enabled smart controller built around the ESP32, with support for relay control, environment sensing, energy monitoring, and occupancy detection.
It combines hardware (KiCAD PCB design) and firmware (Arduino/C++ code) into a single, ready-to-build system.


🌟 Sponsor

This project is proudly sponsored by NextPCB 🌐 – a leading PCB manufacturer providing high-quality PCB prototyping, assembly, and manufacturing services.

Special thanks to DFRobot πŸ€– for their amazing open-source hardware, sensors, and development boards that help makers and engineers bring ideas to life.


πŸ“‚ Repository Structure


β”œβ”€β”€ hardware/      # KiCAD PCB design files (schematics & layout)
└── src/           # Source code (Arduino / ESP-IDF compatible)


βš™οΈ Features

  • 3x On/Off Lights πŸ’‘
    Controlled through a TCA9554 IΒ²C expander.

    • Always start OFF when powered up (safe startup).
    • Exposed as separate Matter endpoints.
  • Environmental Sensing (BME688) πŸŒ‘οΈπŸ’§

    • Temperature & Humidity exposed to Matter.
    • Pressure & Gas Resistance logged to Serial for debugging.
  • Energy Monitoring (BL0942) ⚑

    • Measures Voltage, Current, Power, Energy, Frequency.
    • Data shown in Serial logs (Watts/Current can later be exposed to Matter).
  • Occupancy Detection πŸšΆβ€β™‚οΈ

    • Uses TCA9554 pin 0 as input.
    • HIGH = Occupied, LOW = Not Occupied.
    • Reflected in Matter occupancy endpoint.
  • Commissioning & Control πŸ”

    • Commission into Matter fabric with QR/Manual code.
    • BOOT button short press = toggle Light 1.
    • BOOT button long press (5s) = decommission node.

πŸ§‘β€πŸ’» How the Code Works

  • Relay Control:
    SWITCH1/2/3 booleans track relay states. Callbacks ensure Matter state and hardware (TCA9554 relays) stay in sync.

  • BME688:
    Reads real temperature/humidity every 5s β†’ updates Matter.
    Pressure/gas logged for debugging but not exposed to Matter (yet).

  • BL0942:
    Runs on Serial1 (pins RX=4, TX=5, 4800 baud). Provides live power metrics to Serial monitor.

  • Occupancy:
    Directly read from TCA9554 pin 0. When state changes, it’s pushed to the Matter controller and printed to Serial.


πŸš€ Getting Started

  1. Clone this repo:

    git clone https://github.com/ElektorLabs/Relio.git
  2. Open the src/ folder in Arduino IDE or PlatformIO.

  3. Install dependencies:

  4. Upload the code to your ESP32.

  5. Use your Matter controller app to commission the device.

πŸ› οΈ Future Work

  • Expose BL0942 Power/Current as native Matter attributes.
  • Add Matter endpoints for Pressure & Gas Resistance.
  • Add configurable boot behavior (restore last state vs always OFF).

⚠️ Disclaimer

This project is provided as-is, without warranty of any kind. ⚑ Caution: This project involves mains-level voltages (relays, energy metering). Only experienced users should build or test this hardware. Always follow electrical safety best practices when working with AC-powered circuits.

The author is not responsible for any damage, injury, or loss caused by misuse of this code or hardware.

About

Relio : A Matter-Enabled Smart Controller for AC Appliances

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages