Thought I’d document a minor success - hope it helps someone else.
I purchased a “Tuya Smart WiFi 6 Zone Irrigation System”. They are available in 6 & 8 zone versions including from aliexpress https://www.aliexpress.com/item/1005001853592539.html.
I bought this rather than going DIY since it comes with a reasonable 24v AC power supply to power the common 24vac water solenoids and has it’s own internal step down supply for the MCUs.
After some difficulty I’ve managed to flash it with Esphome and have it working well with Home Assistant.
Wifi is provided by a TYWE3S with an ESP8266EX onboard. Button input and water solenoid switching is done by a separate MCU (STA lqfp44).
I wasn’t able to get TUYA-CONVERT to work, but the firmware may have been updated as I actually bought this 2nd hand off ebay.
The PCB provides pin headers for the ESP and MCU to simplify flashing (excluding GPIO0). I just pushed male dupont pins in to flash.
I had a trouble flashing. It may be the poor quality 3.3v power supply on my USB-TTL. I also suspect that the STA MCU interrupts the flashing process since the same pins are used. By building a minimal stub esphome firmware (small), powering the TYWE3S from the supplied 24vac, holding GPIO0 to ground, and holding the STA MCU reset pin to ground while flashing I eventually had success.
Subsequent OTA flashing is then flawless.
ESPHOME.yaml
substitutions:
device_verbose_name: Front Garden Irrigation
device_id: esphome_irrigation_front
device_icon: "mdi:sprinkler"
log_level: "VERBOSE"
packages:
wifi: !include wifi.yaml
esphome:
name: "${device_id}"
platform: ESP8266
board: esp8285
# Enable logging
logger:
level: ${log_level}
# Make sure logging is not using the serial port
baud_rate: 0
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: !secret ota_password
time:
- platform: homeassistant
id: homeassistant_time
sensor:
- platform: wifi_signal
name: "WiFi signal ${device_verbose_name}"
update_interval: 60s
- platform: uptime
name: "Uptime ${device_verbose_name}"
text_sensor:
- platform: version
name: "Version ${device_verbose_name}"
status_led:
pin:
number: GPIO0
inverted: True
uart:
baud_rate: 9600
tx_pin: GPIO1
rx_pin: GPIO3
# Register the Tuya MCU connection
tuya:
switch:
- platform: "tuya"
name: "Zone 1"
icon: ${device_icon}
switch_datapoint: 101
- platform: "tuya"
name: "Zone 2"
icon: ${device_icon}
switch_datapoint: 102
- platform: "tuya"
name: "Zone 3"
icon: ${device_icon}
switch_datapoint: 103
- platform: "tuya"
name: "Zone 4"
icon: ${device_icon}
switch_datapoint: 104
- platform: "tuya"
name: "Zone 5"
icon: ${device_icon}
switch_datapoint: 105
- platform: "tuya"
name: "Zone 6"
icon: ${device_icon}
switch_datapoint: 106