K-Rain Wi-Fi Irrigation Controller configration for local tuya

Hello everyone,

I’m sharing my experience with K-Rain Indoor Wi-Fi Irrigation Controller (KRX6) 6 station (tuya) which is available at bunnings how I got it working with local tuya after the recent update.

https://www.bunnings.com.au/k-rain-wi-fi-irrigation-controller_p0409790
https://www.bunnings.com.au/k-rain-indoor-wi-fi-irrigation-controller_p0409791

This should apply to 8 channels as well, and its should be similar to Holman wx8

I assume if you are here then you know how to get your device local key, the device will be detected by local tuya and the DP IDs are the following:


Name in the APP | DP code | Type

Switch: 1 → Switch
NOT USED: 10 → weather delay
NOT USED: 11 → cont name

Zone 1: 101 → boolean (binary switch) only 6 in-app (probably 8 if you have the 8 channels)
Zone 2: 102

Zone 16: 116

Start A: 117 → these are the schedules/programs, they are called starts
Start B: 118
Start C: 119
Start D: 120 → not in the app (mine shows 3 only)
Allow enabled to start water: 121 → boolean (this is used to turn off all starts above)
Start A Enabled: 122 → boolean (the start indicator)

Start D Enabled: 125

Watering delay: 126 → integer (probably the number of days which you can set as a delay in the app)
Starts: 127 → row
Zones: 128 → row
DateTime: 129 → row

Battery status: 130 → boolean (report only)
Power status: 131 → boolean (report only)
Watering: 132 → boolean (report only)
Manual command: 133 → row
Tech info: 134 → row
Starts Initilized: 135 → boolean
Use watering delay: 136 → boolean
Sensor: 137 → boolean


I have added the zones and the indicators, ignored all the row elements
I got these values using the tuya API explorer

Its working perfectly, I have used it with the unlimited irrigation integration

image

2 Likes

Fantastic. Thanks. I got one of these just before Christmas, they seem unbeatable for the price, and was about to start trying to work this all out for myself. You’ve saved me a big job. Thanks for sharing.

My pleasure :blush:

Is it possible to give some more information on how this all works?

Like what is “DP ID”?

What is it you are referring to there?

Hey @et3rnal I don’t suppose you kept the output from API explorer? I’ve flashed one of these with ESPHome and now I can’t figure out the format of the manual command (DP 133), and I reckon that API output (e.g. "dp_id":133, "value":"xxx") would be a starting point.

Actually don’t stress - I figured this is all too complicated and I’m just gonna return it and go with one of these instead.

BTW can’t reply to this thread and leave this hanging :smiley:

Components like this have Tuya MCU units inside them. You can interact with the MCU using ESPHome as I’m doing, or by using LocalTuya or one of a few other integrations that interact via the Wifi chip’s default firmware. Everything’s done in terms of datapoints (DPs) with a numeric ID. Here’s what ESPHome reports for this device:

[22:30:57][C][tuya:041]: Tuya:
[22:30:57][C][tuya:056]:   Datapoint 131: switch (value: ON)
[22:30:57][C][tuya:056]:   Datapoint 130: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 132: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 136: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 137: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 105: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 106: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 117: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 118: switch (value: OFF)
[22:30:57][C][tuya:054]:   Datapoint 134: raw (value: 00.00.00.00.00.00.00.00.00.00.00.74.00.00.00.00.00.00.02.17.00.00.00.00.00.00.00.00.00.00.13.01.01.00.00.29.02.00 (38))
[22:30:57][C][tuya:056]:   Datapoint 101: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 102: switch (value: OFF)
[22:30:57][C][tuya:056]:   Datapoint 103: switch (value: OFF)

As I’ve kinda discovered while it’s usually self explanatory for something like aircon or an electric blanket, sometimes you’re on your own finding what these datapoints represent and how to use them.

Are there any Bluetooth valves that work?