Skip to content
gunnarbeutnerPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Doorbell controller (STR WF26-compatible)

A drop-in smart replacement for a WF26 handset on an STR Elektronik TV20/S apartment-intercom bus, built on an ESP32-S3 running ESPHome. To the building it looks like the handset it replaces; to Home Assistant it looks like a doorbell, an intercom and a door opener.

The doorbell controller installed in the wall

What it does

  • Ring detection — the front-door bell (Türruf) and the floor button (Etagenruf) are separate HA binary sensors and events: phone notifications, presence-aware automations, "someone rang while you were out" history.
  • Gong suppression — a solid-state switch in the chime path mutes the mechanical gong under firmware policy (occupancy, quiet hours, do-not-disturb) without touching ring detection, the latch/session, codec audio or the door opener. The current interim policy holds that switch open for all of suppression mode so a later neighbour gong on shared line 2 cannot reach LS1; this also disables physical LS1 listen/talk until the PTT-capable V4.2 hardware and firmware policy are fabricated and validated. The switch is normally-closed: if the smart layer dies, the doorbell returns to the stock passive path.
  • Door opener from HA — with the safety in hardware, not firmware: the door relay pair replicates the WF26's break-before-make sequence with an RC delay, and an independent hardware watchdog releases the door bridge after ~6.7 s no matter what the firmware does. A crashed ESP or a runaway automation cannot hold the door open.
  • Two-way audio — an ES8311 codec taps the bus speech pair through a protected divider (RX) and drives the talk line through the same 2.2 kΩ handshake the central expects from a real handset (TX). Push-to-talk from HA; wired for HA's Assist voice pipeline.
  • Fully passive fallback — the original WF26 relay/switch/speaker core is carried on the board, hardwired. Gong, listen, talk and door-open all work with the electronics unpowered; the smart layer only ever adds, never gates.
  • Local everything — ESPHome native HA API, OTA updates, on-device web UI. No cloud.

How the TV20/S bus works

Five wires run from the central to each flat:

Line Role
1 Common — the reference for everything below
2 Standing +12 V supply, current-limited (~90 Ω source), always on
3 Speech — talk audio toward the door station
4 Türruf — front-door ring
5 Etagenruf — floor-button ring

A ring is the central putting ~12 V on a ring line for about a second; the gong is literally the handset's speaker driven from that pulse through a capacitor (the floor line rings the speaker directly). The line-4 pulse also pulls in a relay inside the handset, which seals itself in from line 2 and holds line 4 high — that standing level is the "call in progress" state, and the supply rail sags visibly under its load. Talk is a 2.2 kΩ bridge from the speech line to the supply: the central detects exactly that resistance as "off-hook" and routes audio, which simply rides on top of the DC. The door opener is a plain line 2↔3 contact closure, sequenced break-before-make so the latch drops first. The central ends every session by sinking line 2 low after a timeout, which drops all latches. A stock handset contains no electronics at all — a relay, capacitors, switches and a speaker.

The board senses the ring lines with optocouplers, switches its functions with PhotoMOS relays in the same places the WF26's mechanical switches sat, and leaves the bus model untouched — the central cannot tell the difference. The full reverse-engineering lives in DESIGN.md, the WF26 handset schematic in wf26/, and real-bus scope captures in captures/ — all usable on their own if you have this intercom family and only want ring detection or muting.

Beyond the assembled board

The JLCPCB-assembled PCB needs four things it doesn't ship with:

  • Antenna — the ESP32-S3-WROOM-1U has no PCB antenna; any 2.4 GHz u.FL/IPEX antenna works (a flex-PCB patch routes nicely out of the enclosure).
  • Speaker/mic transducer (LS1) — a 16 Ω transducer soldered to the LS1 wire pads. It is the gong, the passive listen earpiece and the passive talk mic in one; deliberately not board-assembled.
  • JST SH-4 male pigtail for J1 (the deployed power/service inlet) — a pre-crimped SH-4 lead is strongly recommended; hand-crimping 1 mm SH contacts is misery.
  • USB power/service lead — a four-signal USB-A male screw-terminal breakout wired to the J1 pigtail. Keep D+/D− short and twisted, and verify every conductor before first power-up: docs/design/usb-jst-j1-wiring.svg.

Status: the V4.1 board (JLCPCB-fabbed and -assembled) is bench-verified and deployed — installed in the wall in place of the WF26, running firmware/doorbell.yaml. The smart layer is powered by a USB wall-wart through its J3 connector; the TV20/S bus powers only the passive handset core, so the electronics draw nothing from the shared intercom supply. The installed V4.1 USB-C connector mechanically prevents the housing's Talk actuator from fully engaging SW4; the current V4.2 candidate removes that connector and adds a dry GPIO47 physical-Talk input plus a mechanical K1 inhibit on SW4's spare pole. Those changed circuits are not field-proven and must pass the full actuator/cable fit and first-board electrical/timing gates.

Repository layout

The KiCad files (kicad/doorbell.kicad_sch / .kicad_pcb) are the authoritative source for the board — edited directly in KiCad. ./build.sh verifies them and exports the fab outputs; it does not author or regenerate the board.

Path What
REQUIREMENTS.md What the board must do — functional + safety requirements (start here for intent).
DESIGN.md How it's built — architecture, GPIO map, relays/SSRs, audio path, bus model.
VERIFICATION.md Design-verification gates plus the bench bring-up / commissioning record.
ORDERING.md JLCPCB ordering notes (Standard PCBA workflow + the review gates).
kicad/ Authoritative KiCad project (doorbell.kicad_sch / .kicad_pcb). See kicad/README.md.
tools/ Build/inspection Python scripts (placement check, routing verify, STEP/BOM/CPL export).
firmware/ ESPHome configs — doorbell.yaml (deployed), doorbell-bench.yaml (bench twin: debug SSR switches, audio loopback instrumentation, no HA events), doorbell-tonegen.yaml (spare board as bench tone source / HA media player).
sim/ Node circuit simulator + PCB viewer used to sanity-check the design (cd sim; npm test).
wf26/ Reverse-engineered WF26 handset (wf26.kicad_sch).
captures/ Bench scope captures of the real TV20/S (ring, door-open, timeout) + web viewer.
docs/ Datasheets and reference docs (datasheets/, design/, ordering/) — incl. the wall wire-up map (design/wall-wiring-v4.svg) and the J1 power/service-cable pinout (design/usb-jst-j1-wiring.svg).
fab/ Generated fab outputs (Gerbers, drill, BOM, CPL, STEP) — produced by ./build.sh.
orders/ Shipped fabrication order archives.

Build

./build.sh             # verify (ERC/DRC/placement/routing/simulation) + export fab outputs
./build.sh verify      # run the same checks without updating generated artifacts

See kicad/README.md for the build pipeline details.

Firmware

cd firmware
esphome run doorbell.yaml    # needs firmware/secrets.yaml (see below)

Secrets (WiFi credentials, API encryption key, OTA password) live in firmware/secrets.yaml, which is gitignored — create it with wifi_ssid, wifi_password, api_encryption_key and ota_password before building. Run esphome clean after switching configs or renaming a device — a stale build directory fails the build in confusing ways.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages