Add Tuya YNTDQ 1-gang relay module (_TZ3000_olo5jhjk) - #480
Open
holyboom1 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Device
Tuya YNTDQ 1-gang relay module,
_TZ3000_olo5jhjk/TS0001.Pinout
olo5jhjk;TS0001-YNTDQ;BB4u;LC4i;SB5u;RD2;SB4u;RD2state_relaycommandSB5uLC4iB4S, produced 120 press/released eventsNot a Girier clone: only
RandSmatch. Girier usesBB1u;LC3i,this board uses
B4/C4.Board button declared twice
B4is 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_strkeeps the plain variant whereB4is reset only, for anyonewho 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_tuyaimage(same ZT2S module, same MCU, same 4417/54179 stock IDs) via a custom OTA index,
then determined the pinout live by rewriting
config_strover 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 imagewith the
i45700config option. Verified that the config string baked intothe 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
testcheck is the uncrustify lint step, which also failson upstream
main(e.g. bf1059e) — unrelated to this change, nosrc/filesare touched here.