ESP8266 Valve actuator

Tags: #<Tag:0x00007f780141a228>

Yesterday I received a Wifi valve actuator I ordered from Aliexpress:

Luckily as I hoped the valve actuator does contain an TYWE3S which has a ESP8266 and could easily be flashed with preferred firmware; ESPHome, ESPEasy, sonoff-tasmota, espurna and so on.
Didn’t have time to flash it or check the GPIO yesterday.
Found the below link which states that the relay has GPIO-13, LED GPIO0 and the pushbutton GPIO-12:

4 Likes

Hi.
I actually have the same project. I intend to use Esphome in order to simplify it. Since this is the first time I will program, I am still trying to determine which GPIO controls what.
Did you flash it? How did you setup the GPIO pins?

Waiting on one of these( should be here today) from the link posted above.

the device uses IO12 for the pushbutton, IO13 for the relay and IO0 for the diode.

I tried this. I installed EspHome and used the GPIOs you described and it worked.

switch:
  - platform: gpio
    name: "${devicename} relay"
    pin: GPIO13
    id: switch_relay
    restore_mode: RESTORE_DEFAULT_OFF
    icon: mdi:water-pump
    on_turn_on:
    - logger.log: "Valve Turned On!"
    on_turn_off:
    - logger.log: "Valve Turned Off!"

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO12
    name:  "${devicename} button"
    on_press:
      - switch.toggle: switch_relay

Thanks for posting this information. Now I can automatically close my main water line when a leak is detected under the sinks, bathrooms, water heater. This is great!

3 Likes

Hi.

This works as intended, with tasmota 7.1.2. The pinout and gpio are correct as the link provided.

You may need to set the tasmota template correctly as stated here: https://blakadder.github.io/templates/honeyzy_DN20.html

The open/close duration is arround 7 seconds, on each way.

Also, the power supply is a DC 12V 1A one. This is a must for those how might want to add power backup with batteries.

Thanks.

Hi everyone. I’d like your insight on this little bugger

This is the pcb board of the valve actuator I got I brut forced un-solder the esp8266 as well as the 2 end switches and the magnetic relay (don’t worry I bought 4 of those for my project).

As stated above by the most useful pins are
GPOI 12 : Switch button
GPOI 13 : Relay
GPOI 5: LED red
GPOI 4: LED green or blue (can’t remember)

But there is also 2 other pin used ( although not really useful) and I cannot figure out what they are used for and how to configure them.

GPOI 15 (link with R6 resistor and I think to the (-) 12v DC )
and
CH_EN (directly to the esp8266 VCC)

Do anyone has a clue?


GPOI 15 is for boot configuration. GPIO 15 deals with booting from SD-CARD when pulled high.
CH_EN is the chip enable aka the on/off switch for the esp.

Also, GPIO 0 needs to be low to boot into program mode for flashing.

I have the same PCB as mbt but my relay is on GPIO12 and button on GPIO13.