GiEX smart water valve with ZHA

As the general thread on the GiEX valve gets a but to much loaded I decided to create a new which focus on the use with ZHA.

After some initial trouble I got it working now, but it will need some steps to achieve that.

  1. Be sure your valve has at least the firmware version: 0x0000004d. I not you need to get a Tuya smart hub and install the Smart live app to upgrade the firmware. I did update from version v1.0,9 to v1.0,13. See screenshot below.

  2. If you haven’t done you need to get custom quirks running on HA instance.
    See → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices
    and → Zigbee Guide: How-to setup local custom device handler quirks in ZHA integration
    The quirk you will find here. zha-device-handlers/zhaquirks/tuya/ts0601_valve.py at 8317dc69c3b36e7ae5cabe40d7937c02ca259f77 · zigpy/zha-device-handlers · GitHub

I you have done this your valve should show similar as in this screenshot.


And here the screenshot when you need to upgrade the firmware:

Note, if you bought the valve from June / Juli 24 onwards it should come with the new firmware.

Can you share what exact Tuya GW you have used to update te valve?

I got it from GiEX directly.

I have a GW018-DM. It’s available in the giex store, so should be ok.

I send a question using the Smart Life app. Hopefully that will help…

So received a second valve. This one has zigbee version 1.0.10.

Again there is no firmware update available.

Support via the Smart Life app does not respond.

My advice is to stay away from these valves.

That’s correct, this Valve is not worth the money. Out of my 3 that I bought only one is still working. Return and refund it as long you can.
I you are living in the US you better buy the Sonoff valve.

In Europe they are still very expensive.

Do I understand correctly that you do not recommend the GieX GX-02?

Yep I don’t recommend it, but I can’t predict how the Sonoff valve is quality wise. It is seems to be very similar, eventually made in the same factory. But firmware and HA support should be much better at Sonoff.

Hello, I just bought one of these, from there: https://aliexpress.com/item/1005006547328147.html

I am a bit disappointed, but overall, it isn’t too bad.

  • Firmware version is 0x00000048, but I guess I cannot update without any Tuya device/app
  • The device seems to have trouble with RSSI (signal strength). I basically have to place a repeater relatively close by.
  • I had to add the following device to the quirks, should I make a PR? _TZE200_7ytb3h8u (note that this is an E200, not E204). Eh, looks like a PR was merged a few hours ago :sweat_smile:

Now, after adding the device to the quirks, and when it is in range, it works… most of the time. One issue is that I don’t have feedback on the HA interface, I can “turn it on”, and it will show up as powered on in the interface, while nothing happens on the device. That and it not being reactive are my main gripes with it.

Otherwise, a few things to note:

  • The comments in the quirks file were extremely useful, as I can set it to just deliver N liters (or seconds). That alone makes it worth it, and I feel like it’s a failsafe in case the valve does not receive the turn off signal. It’s just a shame we don’t have that info in the interface or as settings; maybe I will add them as settings on the interface.
  • Volume measurement seems to be relatively accurate, but it is reset at the start of every cycle, which initially confused me.
  • Flow measurement (“Instantaneous demand” does not seem to be working for me. Would that be due to my firmware version?
    image

In any case, I am pasting the comments from the quirks file here, as they explain the clusters. Read/Write is my interpretation:

  • Write:
    • irrigation_mode: measurement mode: [0] duration [1] capacity
    • irrigation_target: irrigation target, duration in sec or capacity in litres (depending on mode) min=0 max=3600
  • Read:
    • irrigation_start_time: Last irrigation start time
    • irrigation_end_time: Last irrigation end time (GMT)
    • irrigation_duration: Last irrigation duration (GMT)
  • Not sure how those work:
    • irrigation_num_times: Number of cycle irrigation times min=0 max=100
    • irrigation_interval: Cycle irrigation interval in seconds min=0 max=3600

I am not entirely sure about the irrigation_num_times and interval fields. The time is quite off too (comments say GMT), but I have no idea how to set it. I had a look at the original info source, as quoted in the quirks file. The timezone of my device may be GMT+8 :expressionless: Do you happen to know how to set up timer-based activations on Tuya devices, so that the valve opens at a pre-set time, even with the unreliable network?

I am writing the above as an info dump, both for myself and in case it can help someone else. I think I can make use of this article as-is; I will leave soon for a few weeks, so I can’t order a new smart timer in that window (though I could pick up a “dumb” timer from the store). Having a volume sensor is quite nice, the big let-down is the range and reactivity.

2 Likes

Hello, I’m Raul, the manufacturer of GIEX. I noticed your discussion about the GX-02 firmware update issue, and I sincerely apologize for the inconvenience. Due to a malfunction in the Tuya smart chips, some users are currently unable to use the valve properly with ZHA. All valves produced after July have the updated firmware. As a manufacturer, I’ve recently learned that some users are not using the Tuya gateway and Tuya app, but instead are using ZHA or 2MQTT. Unfortunately, we are only the valve manufacturers, and we don’t possess technical knowledge about ZHA and 2MQTT.

I am eager to learn, but it will take some time. You seem very knowledgeable in this area—could you assist us? If possible, could you contact me directly?

EMAIL:[email protected]

Best regards

Hello, I’m Raul, the manufacturer of the GIEX GX-02 valve. I understand that some users have experienced issues using our valve with ZHA. I want to clarify that the problem is related to the firmware on the Tuya chip, which caused conflicts with ZHA data. It’s not due to poor quality of our valves.

We are actively working on finding a solution for users encountering issues with ZHA. Since July, we haven’t made any updates to the valve, and it should now be working stably.

Thank you for your understanding, and I recommend giving the GIEX GX-02 another try. If you have any further concerns, feel free to reach out.

Hello, I’m Raul, the manufacturer of GIEX water valves. Thank you very much for purchasing and using our product. As a manufacturer of Zigbee devices, I have only recently learned that many of my users are using our water valves through software like ZHA. I feel quite embarrassed about this. I am committed to quickly learning and understanding ZHA so that I can provide better service to our users. However, I am currently still in the learning phase.

I am also developing a dual-channel water valve. Could you help me integrate this new device into ZHA so that other users can benefit from it? I would be happy to send you a sample. My email is [email protected]. I would greatly appreciate your help.

1 Like

Hello Raul, I have just seen your message. Thank you for reaching out, having manufacturer support would be wonderful! I can drop you an e-mail, but I am not the most knowledgeable person when it comes to ZHA, since I only started using it relatively recently.

Looking at the code history, more knowledgeable individuals may be @simonbaudart or raf02 who did the initial work on Z2M.

Thanks for this thread @lucode.

I am afraid I have a rather stupid question: I have just bought one of these Smart Water Valves (Nov 2024) but I cannot find the firmware version. I don’t have a GiEX hub and if you look at my screenshot from ZHA (attached) you will notice that unlike your screenshot there is no firmware version listed. Where do I find it?

I also am having the same problem a number of people mentioned in this thread (and the other one), that despite a LQI of 255 the RSSI is very low (-82). I had to move Zigbee relay to within 2 metres of the valve (admittedly through a brick wall) to stop it losing connectivity.

Finally, I notice that my device is a _TZE204_a7sghmms whereas yours is a _TZE204_7ytb3h8u. Does that make a difference?

I would appreciate any help you or anyone else can give.

Here is my screenshot:
pool_tap_zha

Strange my valve looks as this:

image
Seems to be related to the quirk.
Do have configured the quirk?

image

You have the same version I do and in fact the same version used to write the quirk. The firmware is very hit or miss, just checked mine and they all say Unknown, but in the past they have had a value. I wouldn’t worry about it.

Thanks @PrairieSnpr . I came to the same conclusion. I asked GiEX the question and they replied (which is really good) but did not respond to the firmware question directly other than saying I had the latest version, so I am presuming this is what the a7sghmms means.
I eventually got the device to work reliably by placing a Zigbee router just on the other side of the wall from it. Even though the RSSI is -82dBm I have a LQI of 255 and I have not seen any dropouts.