Skip to content

Add Tuya YNTDQ 1-gang relay module (_TZ3000_olo5jhjk) - #480

Open
holyboom1 wants to merge 1 commit into
romasku:mainfrom
holyboom1:add-yntdq-ts0001
Open

Add Tuya YNTDQ 1-gang relay module (_TZ3000_olo5jhjk)#480
holyboom1 wants to merge 1 commit into
romasku:mainfrom
holyboom1:add-yntdq-ts0001

Conversation

@holyboom1

@holyboom1 holyboom1 commented Aug 2, 2026

Copy link
Copy Markdown

Device

Tuya YNTDQ 1-gang relay module, _TZ3000_olo5jhjk / TS0001.

  • Module: ZT2S (real), MCU TLSR8258
  • Boards: YNTDQ_Ver1.0 + relay board TDQXB_Ver1.0
  • Mains, neutral required. Terminals: L, N, L-OUT, N-OUT, S1, S2

Pinout

olo5jhjk;TS0001-YNTDQ;BB4u;LC4i;SB5u;RD2;SB4u;

Pin Function Verification
RD2 relay lamp switched on state_relay command
SB5u switch input external momentary button toggles the relay
LC4i network LED found by sweeping candidates with blink series; inversion required
B4 board button temporarily declared as S, produced 120 press/released events

Not a Girier clone: only R and S match. Girier uses BB1u;LC3i,
this board uses B4/C4.

Board button declared twice

B4 is declared both as reset (BB4u) and as a second switch (SB4u).
This reproduces the stock behaviour — a short press toggles the relay, a long
press still resets the device. Verified on hardware: both handlers coexist on
the same GPIO without conflicts.

alt_config_str keeps the plain variant where B4 is reset only, for anyone
who prefers the canonical single-switch layout.

Testing

Flashed over the air and verified on real hardware.

Initially flashed using the existing MODULE_GIRIER_TS0001 -from_tuya image
(same ZT2S module, same MCU, same 4417/54179 stock IDs) via a custom OTA index,
then determined the pinout live by rewriting config_str over MQTT.

Afterwards I built this entry on my fork and updated the device to its own
image (imageType: 45700, 1.1.2-ef1c4f38), migrating from the Girier image
with the i45700 config option. Verified that the config string baked into
the built binary matches this entry.

Confirmed working: relay, both switch inputs, network LED, momentary mode,
and the dual role of B4 (short press toggles the relay, long press resets).

Note: the failing test check is the uncrustify lint step, which also fails
on upstream main (e.g. bf1059e) — unrelated to this change, no src/ files
are touched here.

ZT2S module (TLSR8258), board YNTDQ_Ver1.0, relay board TDQXB_Ver1.0, L+N.

Pinout verified on hardware after OTA from stock firmware:
button B4, network LED C4 (inverted), switch B5, relay D2.

The board button on B4 is declared both as reset (BB4u) and as a second
switch (SB4u), which reproduces the stock behaviour: a short press toggles
the relay, a long press still resets the device. Both handlers coexist on
the same GPIO - verified on hardware. alt_config_str keeps the plain
variant where B4 is reset only.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant