Hello. I bought a Chinese irrigation controller on Aliexpress and wanted to use it with Homeassistant:
It is a 4-channel controller that uses a Chinese ESP32 clone (BK7231N / CB3S PCB) which is tied to the Tuya cloud and unusable without an internet connection, which sucks. Here is a pic of the PCB:
The Beken module communicates via serial to another MCU (aka TuyaMCU, Nation N32G452) via serial. I had to desolder the CB3S module and feed it with external 3.3V to flash openbeken because the TuyaMCU was disturbing the process. The process was easy using hot air, desoldering wire, and a bit of patience.
After flashing openbeken, I resoldered the CB3S module to the main PCB and booted openbeken successfully. Connected to Wi-Fi using the GUI was easy. I used the TuyaMCU Analyzer (https://github.com/openshwprojects/TuyaMCUAnalyzer) to find the dpids and found that 101-104 were the four outputs.
Then I loaded the following autoexec.bat to the system:
The last four rows set the limit for an open valve to 30 min (1800s) in case the MQTT/WiFi connection is lost, so I don't produce inundations.
Set the channels to toggle type:
And integrate to Openhab via MQTT as seen in the YouTube videos.
I am very happy with this solution. Big thanks to the Openbeken developers, nice job!
![[CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided [CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided](https://obrazki.elektroda.pl/1461263700_1690403201_thumb.jpg)
It is a 4-channel controller that uses a Chinese ESP32 clone (BK7231N / CB3S PCB) which is tied to the Tuya cloud and unusable without an internet connection, which sucks. Here is a pic of the PCB:
![[CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided [CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided](https://obrazki.elektroda.pl/5576191900_1690403467_thumb.jpg)
The Beken module communicates via serial to another MCU (aka TuyaMCU, Nation N32G452) via serial. I had to desolder the CB3S module and feed it with external 3.3V to flash openbeken because the TuyaMCU was disturbing the process. The process was easy using hot air, desoldering wire, and a bit of patience.
After flashing openbeken, I resoldered the CB3S module to the main PCB and booted openbeken successfully. Connected to Wi-Fi using the GUI was easy. I used the TuyaMCU Analyzer (https://github.com/openshwprojects/TuyaMCUAnalyzer) to find the dpids and found that 101-104 were the four outputs.
Then I loaded the following autoexec.bat to the system:
startDriver TuyaMCU
startDriver NTP
ntp_setServer ptbtime1.ptb.de
ntp_timeZoneOfs 2
linkTuyaMCUOutputToChannel 101 1 1
linkTuyaMCUOutputToChannel 102 1 2
linkTuyaMCUOutputToChannel 103 1 3
linkTuyaMCUOutputToChannel 104 1 4
addChangeHandler Channel1 == 1 addRepeatingEvent 1800 1 setChannel 1 0
addChangeHandler Channel2 == 1 addRepeatingEvent 1800 1 setChannel 2 0
addChangeHandler Channel3 == 1 addRepeatingEvent 1800 1 setChannel 3 0
addChangeHandler Channel4 == 1 addRepeatingEvent 1800 1 setChannel 4 0
The last four rows set the limit for an open valve to 30 min (1800s) in case the MQTT/WiFi connection is lost, so I don't produce inundations.
Set the channels to toggle type:
![[CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided [CB3S/BK7231N] 4/6/8 channel WIFI Smart Garden irrigation controller with TuyaMCU template guided](https://obrazki.elektroda.pl/5911466400_1690404357_thumb.jpg)
And integrate to Openhab via MQTT as seen in the YouTube videos.
I am very happy with this solution. Big thanks to the Openbeken developers, nice job!