Tyua 4 channel relay (with humidity and temp sensor) using regular switch for signalling

I’m using this type of relay with 4 channels:

Tuya Smart TH10 Zigbee 4 Channel Switch with Temperature and Humidity Sensor Passive Dry Contact Zigbee Relay Work with Alexa

1 ch for the towel dryer
2,3 ch for air vent speed selection (interlock)

And I have a spare 4th channel which I wanted to use as described at the market page: pic related (4th channel).

old link

UPD: This is the link with a weird switch example: Ali

But I’m afraid I cannot understand such a setup in example, it looks like the switch is just shorting the load to the ground!

What could happen:

  • The live wire comes to the "Normally Open "
  • Ground wire (or Neutral?) goes to “Common”

As soon as the switch is “ON”, it might just short “L” to “GND”?

Or is this a valid setup, and the smart relay is smart enough to see the current appear at the COM terminal without shorting it?

PS: Or, should the NO cut the connection as soon as the COM is energised? I also think it could be a short, so it can trigger the protection circuit.

Thanks.

That seems to be the wiring for controlling DC (which strangely I cannot see in the AE link you posted).

For AC, that link shows the correct method

However, be extremely careful since those relays are only rated at 10A. That is almost certainly below what your towel dryer will pull, and probably also too low for your air vent.
You need something with a relay Amp rating that is at least 25% greater than what your heater will pull, and more like 50% for the motor on your air vent.

1 Like

The whole image doesn’t make any sense. The manual switch would cause short. Smart switch would cause short.

I’s better if you explain what you are trying to accomplish.

And I share the relay rating concern above, I wouldn’t use that relay for air vent higher than few amps.

1 Like

Similar product, but wrong link.

This is the link with a weird switch example: Ali

What I was trying to achieve was just to reuse a set of wires I have in my bathroom from the regular switch. This set was initially designed for venting, but without speed switching. I’ve installed a double-speed vent now.

I want to reuse this manual switch as a signalling device for the relay, and HA can use this signal to start the vent on speed 1 or turn it off, etc.

The schematic is in Ukrainian, but the devices are still recognisable =)

As I understand, this is a bad idea to rely only on internal relays. I can use a proper “contactor” from Schneider, for example. With a contactor, I can separate the actual load of 10A+ and the logical relay from Tuya. Tuya will only trigger the contactor, and this should be fine, am I correct?

UPD: Checked my towel dryer and it looks way below 10 amps:

  • 220V
  • 190W

UPD2: Vent power draw is also a pretty low.

Maybe the contactor workaround is too much now for such a low power devices? Both are way below 10 AMPs.

You’re right. Seems like you’ll only be switching 10% of the rated relay load, so you should be fine without a contactor.

However, I did some more digging on that model and there’s 2 things you need to be aware of:

  • If you’re using Z2M, you might need a quirk because the model numbers in your link differ by one letter. Your link’s model number ends in B1RF, while the supported device in Z2M ends in D1RF. Should be a pretty simple thing to fix.
  • More importantly, there’s a huge warning on that Z2M page:
The device has a potentially deathly flaw. 
The mains power supply is based on a simple buck converter where neutral of the mains input is referencing GND on the sensor connector.

This device should only be powered by an isolated power supply via the micro-USB port.

Given you intend to use the T&H sensor on it and that it will potentially be in a bathroom, you can imagine that things might get extremely dangerous.
Personally, I would suggest not using the sensor at all and getting a separate zigbee T&H sensor for your bathroom.

1 Like

Wow, thanks.

I have a test setup with a standalone Zb temp and humidity sensor that works from AAA, so I might just stick with this setup.

1 Like

Yeah, your wireless t&h sensor will be much safer for the bathroom.

If my answer helped answer your question, please consider marking my post above with the Solution tag. This will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved and helps users find answers to similar questions.

For more information about the Solution tag, refer to guideline 21 in the FAQ.

Marking it as a solution to close the question.

The main idea seems incorrect in the part from the pic, where switch is used as signalling device. Since there is a DC, not an AC setup at the example.

Thanks.

1 Like

You can’t use that device if you want to have manual switch as trigger .

1 Like

Oops, you’re right. Totally missed that in the diagram.

@trianglesis you might want to follow his advice - that device doesn’t accept a switch as an input for a relay output

1 Like

I’ve tested such setup with esp32 and relay I have for such experiments:

The short answer is: I still do not understand what this switch will do even in a 5V setup.

Maybe 5V into COM is not enough for such a relay to operate independently. As I recall from the “interlock” setup, the relay should change its state as soon as it receives some voltage at COM.

So there is a possibility to “signal” into the relay from the regular switch.

Tested it again, the code is not using software interlock, just a hardware at the relay.

yaml
switch:
  # https://esphome.io/components/switch/gpio.html#gpio-switch
  - platform: gpio
    name: "Switch (GPIO02)"
    id: pin_GPIO02
    pin:
      number: GPIO02
      inverted: true
      mode: 
        output: true
        open_drain: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
    - logger.log: "Switch (GPIO02) Turned On!"
    on_turn_off:
    - logger.log: "Switch (GPIO02) Turned Off!"
  
  - platform: gpio
    name: "Switch (GPIO03)"
    id: pin_GPIO03
    pin:
      number: GPIO3
      inverted: true
      mode: 
        output: true
        open_drain: true
    restore_mode: ALWAYS_OFF
    on_turn_on:
    - logger.log: "Switch (GPIO03) Turned On!"
    on_turn_off:
    - logger.log: "Switch (GPIO03) Turned Off!"

I assumed, mistakenly, that if I powered the COM, the relay could change its state, and the code could track this change.

UPD: tested the setup from ALI example, relay is dead now.
So it’s 100% incorrect, why do they show it I don’t know even.

Thanks for the advice, I would never have found all this info alone!

Sometimes you can not just believe that the store and the shop could show the incorrect wiring for the device they are selling =)

Major part of smart switches (relays) have S or SW contact for manual switch.
But I don’t know any 4-channel one, similar size of yours.

1 Like

I have a similar one, and it works fine as designed.
Things become weird as soon as I try something unusual.

A big part of my question should’ve never been asked, but I was curious.

It’s good to be curious.