ZeroCode AI · Community
Mahesh
1 device by Mahesh, built with ESP ZeroCode AI and shared for anyone to flash.
Published
- ChimeA Matter-enabled smart chime for the home, running on an ESP32-C3 over 2.4 GHz Wi-Fi. ▎ ▎ Functionality: Plays an audible chime melody when triggered — remotely by a Matter controller (a paired video doorbell, button, or an automation rule) or locally by pressing the onboard button. Ships with at least 3 distinct built-in melodies; the active melody is selectable from the Matter fabric. A mute (enable/disable) setting silences the chime without unpairing. Selected melody and mute state persist across reboots. Commissions via QR code or manual pairing code over BLE, then operates on Wi-Fi. ▎ ▎ Hardware needed: A piezo buzzer for melody playback, one momentary push button, and one status LED, all on free GPIOs of an ESP32-C3 devkit. ▎ ▎ Controls: Short press of the button triggers the chime locally (test ring). From the Matter side: trigger the chime, select the active melody, and toggle mute. ▎ ▎ Reset & recovery: Long-press the button for 10 seconds to factory reset (clears fabric credentials and returns to commissioning mode). On power loss the device rejoins Wi-Fi and the fabric automatically with its persisted settings. ▎ ▎ Feedback & indicators: The status LED blinks while awaiting commissioning, turns solid once commissioned, and gives a short flash each time the chime sounds. Muted state is indicated by a double-flash when a trigger arrives but playback is suppressed. hardware: https://shop.m5stack.com/products/atom-echo-smart-speaker-dev-kit?srsltid=AfmBOorN-_i9oF4tWJIH6BCC9qc_YsFtR-Hffbi1d0vgYDaTLDNlk2pm business logic automation rules – In the Matter controller, bind a Matter doorbell, smart button, security panel or any device exposing a Chime/Switch client to this chime. A press on the source issues PlayChimeSound and the chime rings. – Controller-side automations also work: e.g. 'when the doorbell detects a person, play melody 4', or 'when a door contact opens after 22:00, mute the chime'. – Multiple sources may point at one chime — a front doorbell and a back-door button can share it, with the melody chosen per source via the command's ChimeID. – Because mute is an ordinary Matter attribute, schedules and scenes can arm and disarm it (mute overnight, unmute at breakfast) without touching the device. day to day operation The chime sits plugged into a USB-C outlet near the front door, plugged in and always on. Someone presses the doorbell; the chime plays the selected melody within a fraction of a second and its LED pulses white. Household members change the melody from their phone; guests can press the button on the device for a test ring while it is being placed. Muting for a nap is a toggle in the same controller app. power on behavior On power-up the device reads melody index and mute state from NVS, initialises the speaker and LED, then starts Matter. Never commissioned (or just reset) -> LED breathes blue and BLE advertising is active. Already commissioned -> LED breathes amber while Wi-Fi connects and the fabric session is re-established, then solid green. The device is silent at boot: it never plays a chime on its own to announce a power cycle. commissioning instructions Power the chime over USB-C. Its LED breathes blue, meaning it is advertising and unpaired. In the Matter controller app (Apple Home, Google Home, SmartThings, Alexa, Home Assistant), choose Add device and scan the QR code on the Atom Echo, or type the manual pairing code. The LED blinks quickly blue while commissioning, then turns solid green once the device is on the fabric and connected. No app of our own is required. After commissioning, bind your doorbell or a smart button to the chime in the controller (see Automation rules). method Matter standard commissioning — QR code or manual pairing code scanned from the device label, over BLE, then Wi-Fi handoff connectivity #1 purpose 2.4 GHz Wi-Fi carries the commissioned Matter session — remote triggers, melody selection and mute all arrive over it. Wi-Fi only; the device does not use Thread. stack matter transport wifi #2 purpose Commissioning only. BLE advertising carries the out-of-the-box pairing advertisement; once commissioning completes, the device hands off to Wi-Fi and stops advertising. stack ble transport ble custom behavior decisions settled in conversation – Board confirmed by the user as the M5Stack Atom Echo (ESP32-PICO-D4), not an ESP32-C3 variant as the original notes had hinted. Recorded in artifacts/board.yaml as selected: m5-atom-echo, chip: esp32. – Matter device type chosen as Chime (0x0146) on the user's 'chime only' answer, ruling out the Doorbell (0x0148) / Audio Doorbell (0x0141) types — those make the device the doorbell, not the sound producer, and carry a Chime CLIENT rather than a server. – Retrigger policy: one melody per trigger with a ~2 s ignore window; nothing queued. – Loudness: fixed, no user volume control — the user chose mute plus a gentle Soft Beep melody instead. Explicitly recorded in customBehavior.volumeConsideredAndDeclined. future hardware provision GPIO 21, 25, 26 and 32 are deliberately left free and unclaimed so a wired doorbell contact can be added later as a local trigger without re-laying out the board. identify cluster The optional Identify cluster is also implemented — sending Identify makes the LED pulse for the requested duration so a user with several chimes can tell which physical unit they are looking at while binding it in the app. installed sounds InstalledChimeSounds reports exactly four entries with IDs 1-4, so a controller's sound picker automatically lists the four melodies and nothing else. matter device type Chime device type (0x0146) with the Chime cluster (0x0556) as a server. Chosen over the generic On/Off or Level Control clusters because it gives controllers the right vocabulary out of the box: an Enabled attribute as the mute switch, a SelectedChime attribute to pick the sound, an InstalledChimeSounds list to report what the device can play, and a PlayChimeSound command that names a sound explicitly. In controllers that render a chime as a first-class accessory, the user gets a mute toggle and a sound picker with no custom app. volume considered and declined Per-user volume control was considered and deliberately dropped. The Chime device type defines no volume parameter, so volume would have meant either a non-standard vendor attribute or a second custom cluster: extra surface for every ecosystem to render inconsistently, in exchange for a control almost nobody touches. Mute (the standard Enabled attribute) plus a deliberately gentle Soft Beep melody covers the real household need, which is ringing quietly or not at all. device type Matter smart chime / doorbell sounder. Indoors, permanently powered from USB-C. It replaces or supplements a wired doorbell chime: instead of a fixed two-note electro-mechanical bell, it plays a software-synthesized melody when a doorbell or any Matter device tells it to, from anywhere in the home. It is the SOUND PRODUCER, not the doorbell: it does not sense the door and does not stream audio or video. factory reset effect Wipes NVS — melody selection, mute state, stored Wi-Fi credentials and all Matter fabric credentials — then reboots immediately into BLE commissioning mode, ready to be added to a new ecosystem. The melody returns to the default (Classic Ding-Dong) and mute to off for the next owner. trigger Hold the on-board button continuously for 10 s (LED turns red at 5 s as a warning; releasing before 10 s aborts). failure modes #1 behavior Remote triggers stop arriving, but nothing else breaks. The LED goes to amber breathe and the device retries in the background indefinitely, reconnecting on its own when the network returns. The physical button still plays a local test ring throughout, so the chime can always be verified. scenario Wi-Fi down or router rebooted #2 behavior The chime keeps its last melody and mute settings and stays responsive to its own button. Automations hosted in the controller simply do not fire; nothing is queued or replayed later, so there are no surprise rings after an outage clears. scenario Matter controller, hub or cloud unreachable #3 behavior Reboots silently in under 10 s and rejoins Wi-Fi and the fabric using persisted credentials — no re-commissioning. Melody selection and mute state are restored, so a chime muted before the outage stays muted. It never rings on boot. scenario Power blip or unplugged and replugged #4 behavior The LED shows a red slow blink so the fault is visible rather than looking like a working-but-silent device. Button presses and Matter commands are still accepted and still flash the LED, distinguishing 'silent hardware' from 'no trigger received'. scenario Speaker or amplifier fails to initialise #5 behavior Playback is suppressed and the LED double-flashes white, so the user can see the doorbell did fire and can choose to unmute. No audio, ever, while muted. scenario Trigger received while muted #6 behavior The first trigger plays the melody. Triggers arriving within ~2 s of playback starting are dropped, so the melody is never stacked over itself, distorted or restarted mid-phrase. Because nothing is queued, a burst of presses produces exactly one ring rather than a delayed train of rings. scenario Rapid or simultaneous triggers (doorbell pressed repeatedly, or two sources at once) hardware board m5-atom-echo board note M5Stack Atom Echo (ESP32-PICO-D4). 24x24x17 mm. USB-C powered, 5 V. On-board: SK6812 RGB status LED on GPIO 27, user button on GPIO 39, NS4168 I2S amplifier + speaker on GPIO 19/22/33. ESP32-PICO-D4 has no native USB; flashing is over UART. bom note No external parts. Everything the product needs is already on the Atom Echo. chip esp32 gpios – GPIO27 — on-board SK6812 RGB status LED (data out to the LED) – GPIO39 — on-board user button (input-only pad, external pull-up, active low) – GPIO19 — I2S bit clock to the NS4168 amplifier – GPIO22 — I2S data out to the NS4168 amplifier – GPIO33 — I2S word select / LRCK to the NS4168 amplifier peripherals – On-board speaker via NS4168 I2S amplifier — audio output – On-board SK6812 RGB LED — status indicator – On-board user button — local test ring + factory reset – USB-C port — power only (5 V) unused pins – GPIO21, GPIO25, GPIO26, GPIO32 are free and unused — reserved as spare for future hardware (e.g. a wired doorbell contact input) inputs – Test ring (short press) – Factory reset (10 s hold) – Play chime sound – Select melody – Mute / unmute outputs – Chime melody – Status LED power management battery powered false note Mains-powered over USB-C 5 V, always on. No battery, no sleep modes, no wake sources — the radio must stay live to hear fabric commands instantly. Idle draw is a few hundred milliwatts; no power-saving behaviour is exposed to the user.
Built with ESP ZeroCode AI — describe a device, get production firmware.
Terms of Service · Privacy Policy