FAQ
TL;DR: For people hacking a CB2S wall switch, exposing 2 pins—6 and 7—with 1 wire and 1 pin terminal is simple, but “mains potential can be on those exposed pins.” Use covered routing, not bare male pins, if you want to add a sensor, switch, or display to this Tuya wall-mount device. [#20757128]
Why it matters: This FAQ helps you add functions to a Tuya Mini Smart Switch without missing the thread’s main safety warning.
| Option |
Exposed metal |
Practical use in the thread |
Safety note |
| Male pin terminal |
Yes |
Used to bring out pins 6 and 7 |
Higher risk on a non-isolated mains device |
| Female header |
Less |
Suggested alternative for routing pins out |
Safer because it avoids exposed male pins |
| Folded paper spacer |
Partial |
Used to isolate and space pins from the board |
Only spacing aid, not a full safety fix |
Key insight: Exposing pins 6 and 7 can expand the switch, but the thread’s most important point is safety: this device uses a non-isolated supply, so those added connections can carry mains potential. [#20757128]
Quick Facts
- The mod exposes pins 6 and 7 and uses 1 wire plus 1 pin terminal to add extra functions to the device. [#20757122]
- The builder shared 6 new photos of the pin-exposure mod and noted that the white insert is folded paper used for isolation and spacing. [#20757122]
- A thread expert warned that the switch has a non-isolated power supply, so mains potential can appear on the exposed pins. [#20757128]
- The thread names 3 extension examples for the added pins: a DHT11 sensor, an extra switch, and an I2C display. [#20757283]
How do I expose pins 6 and 7 on a Tuya Mini Smart Switch with a CB2S module for adding extra functions?
Expose pins 6 and 7 by routing them out with 1 wire and 1 pin terminal. The thread shows a simple physical mod for those 2 pins. 1. Identify pins 6 and 7 on the board/module area. 2. Attach a wire and pin terminal to bring them out. 3. Keep the added pins spaced off the board with insulation. The builder used folded paper as a spacer, then shared 6 photos of the result.
[#20757122]
What safety risks come with exposing pins on a Tuya Mini Smart Switch that uses a non-isolated power supply?
The main risk is electric shock from exposed pins that can sit at mains potential. An expert warning in the thread says, “mains potential can be on those exposed pins.” That makes bare headers especially dangerous inside a wall switch. The risk increases when metal remains touchable during testing or later servicing.
[#20757128]
Why can mains voltage appear on the exposed pins of this Brazil wall-mount Tuya switch?
Mains voltage can appear there because the device uses a non-isolated power supply. In the thread, the safety warning directly links that power design to the exposed pins. Once you route pins 6 and 7 outward, you can also route out the same hazard. That is why the warning focuses on exposed metal, not only on the mod itself.
[#20757128]
What is a non-isolated power supply in a smart switch, and why is it dangerous when hacking GPIO pins?
“Non-isolated power supply” is a power design that runs the device without galvanic separation from the mains side, the key characteristic behind the thread’s warning that exposed added pins can carry line potential. It is dangerous here because the mod brings internal connections outside the safer board area. On this switch, that can put hazardous voltage on exposed pins 6 and 7.
[#20757128]
What is the CB2S module in Tuya devices, and what role does it play in this smart switch hack?
In this thread, the CB2S is the module named in the hack topic, and its role is practical: it gives access to pins 6 and 7 for added functions. The mod is about exposing those 2 pins so the switch can accept more peripherals. The posts do not provide a deeper hardware description beyond that role.
[#20757122]
Which accessories do I need to bring out pins 6 and 7 safely from a Tuya Mini Smart Switch board?
The thread shows 1 wire and 1 pin terminal for the basic mod, plus insulating spacing material. It also suggests a female header as the safer routing choice if you must bring the pins out. The builder used folded paper to isolate and space the pins from the board. That paper helps positioning, but the safety reply still recommends covered contacts over exposed male ones.
[#20757128]
Female header vs male pin terminal for exposing CB2S pins on a mains-powered smart switch — which is safer and why?
A female header is safer because it avoids leaving exposed male metal on a non-isolated mains device. The thread explicitly suggests using a female header instead of male if you really need to route the pins out. That advice follows the warning that mains potential can appear on those exposed connections. The safer choice is the one that reduces direct contact with live metal.
[#20757128]
What kinds of extra sensors or peripherals can be connected to pins 6 and 7 on this hacked Tuya switch?
The thread names 3 examples: a DHT11, an extra switch, and an I2C display. Those additions use pins 6 and 7 to give the device more functions beyond simple switching. The expert reply says the idea is reasonable if done safely. That makes the mod useful for sensing, input, or simple display work, but only with careful isolation.
[#20757283]
How can I add a DHT11 sensor to a Tuya Mini Smart Switch using the exposed CB2S pins?
You can use the exposed pins 6 and 7 as the connection point for a DHT11-style add-on, because the thread lists DHT11 as one supported idea.
“DHT11” is a digital sensor that measures temperature and humidity, the key characteristic here being that it can turn the switch into an extra environmental sensor. The posts do not give a pin map or firmware steps, so the safe takeaway is only that this sensor type is a supported concept for the exposed pins.
[#20757283]
In what way could an I2C display be used with a hacked Tuya smart switch, and what should I watch out for?
An I2C display could extend the switch with a small status or data readout, because the thread says there is support for I2C displays.
“I2C display” is a display peripheral that communicates over an I2C bus, the key characteristic here being that it adds visual output with only a small number of signal connections. Watch out for the same hazard as every other add-on here: exposed pins on this non-isolated device can carry mains potential.
[#20757283]
What is a DHT11 sensor, and why would someone attach it to a Tuya Mini Smart Switch?
A DHT11 is a temperature-and-humidity sensor, and the thread suggests attaching it to turn the switch into an extra temperature sensor. That gives the hacked device a second job beyond switching. The reply mentions DHT11 specifically as one of several realistic expansions for pins 6 and 7. The reason to add it is function growth, not repair.
[#20757283]
What is an I2C display, and how could it extend the functionality of a CB2S-based switch?
An I2C display is a display add-on, and the thread says the platform already has support for I2C displays. That means the hacked switch can gain visible output instead of acting only as a hidden wall module. In practical terms, pins 6 and 7 could help turn the device into a display-equipped node, if the build is done safely. The thread does not specify screen size or content.
[#20757283]
How should I insulate and space exposed pins inside a Tuya wall switch so they do not touch the board or enclosure?
Keep the pins physically separated from the board and avoid exposed male contacts. The builder says the white piece in the photos is folded paper used to isolate and space the pins from the board. That solves clearance in the shown build, but the expert reply still warns against exposed metal on this non-isolated device. Use spacing plus a covered connector approach if you route the pins outward.
[#20757122]
What troubleshooting steps help when pins 6 and 7 on a CB2S Tuya switch do not work after being exposed?
Start with the physical mod, because the thread only documents the hardware side. 1. Recheck that you actually exposed pins 6 and 7, not different pads. 2. Inspect whether the wire and pin terminal are firmly attached. 3. Verify the pins are not shorting against the board or enclosure and are properly spaced. The photos and note about folded paper point to spacing and contact issues as the first failure points to inspect.
[#20757122]
What safer alternatives are there for adding external sensors to a Tuya Mini Smart Switch without leaving hazardous pins exposed?
Use a female header or keep the additions internal, because the thread warns against exposed male pins. That lets you route signals with less exposed metal while still using pins 6 and 7 for extras like a DHT11, an extra switch, or an I2C display. The thread’s clear limit is safety: the idea is acceptable only when done in a safe manner on this non-isolated mains device.
[#20757283]
AI summary based on the discussion. May contain errors.
Comments
Warning! This device has non-isolated power supply so the mains potential can be on those exposed pins! Take extreme caution, avoid exposing pins in such a way, you can try to use a female header instead... [Read more]
You are right. Thanks for the advice. I have been thinking the same after making this first device. [Read more]
Apart from that, it's not that bad idea... if done in a safe manner. You can connect DHT11 or something and turn that device into an extra temperature sensor, or an extra switch, or a display (we have... [Read more]