[RELEASE] Tuya Zigbee Valve driver (w/ healthStatus)

I should be able to do this today

2 Likes

An important question is whether SmartLife app allows the irrigation timer to be changed after the valve was opened.

1 Like

@kkossev @Ken_Fraleigh @JmikeyB

Support for this TuYa valve was added within the last year to zigbee2mqtt. When a suitable converter was in development, this same issue was observed (valve turns off after 1 minute).

If it helps you any, this is the final version of the converter used (which works). An earlier version from the same developer had the same 1 minute issue.

I don't know if any of this is helpful, but I'm posting it here as an indication that the issue is resolvable.

2 Likes

That is a definite no. It has a couple different ways to irrigate. Here are my screenshots:







2 Likes

@kkossev , let me know if you have any changes that you want me to try. I have several of these; one on HE, one on Tuya, and one still in the box.

1 Like

Hi @Ken_Fraleigh ,
I think I have enough information now. I can continue the work after I finish the active developments and documentation for the new "Tuya Zigbee Contact Sensor++ w/ healthStatus", hopefully in a week or so.

2 Likes

Awesome! Thank you!

1 Like

The driver has been working well in my testing. My device data reads as:

  • endpointId: 01
  • application: 46
  • manufacturer: _TZE200_sh1btabb
  • model: TS0601

I do have one issue though. It seems that my device has an irrigation timer that is set to 60seconds. Everytime I open the valve, it closes after 60 seconds. I have tried using the “set irrigation timer’ but it does not seem to do anything. Any advice on how to fix this?

1 Like

I have the same issue which I outlined above.

I believe @kkossev is/will be, working on a solution

2 Likes

I have resumed the work on this driver. Nothing related to the irrigation timer is added yet, but there are a lot of other changes in the code that are needed as a first step to support multiple and different valves types and models.

The dev. branch version is 1.2.0, the link is in the second post, Can be updated quicker by clicking on the 'Import' button within the HE driver editor.
If anything is broken, please let me know.

2 Likes

I have updated the driver with a new preference "Auto off timer"

image
This is the time in seconds after which the irrigation valve will be closed automatically.
In the sample above the automatic shut-off should happen after 1 hour.

This should work for SASWELL irrigation valves but could work for the Tuya _TZE200_sh1btabb as well. You can test it with timeouts> 5 seconds. Please let me know if it works.

Update 1: added irrigationStartTime, irrigationEndTime, lastIrrigationDuration, waterConsumed attributes.
Update 2 : removed the doubled open/close commands for _TZE200_sh1btabb; renamed timer_time_left to timerTimeLeft, renamed last_valve_open_duration to lastValveOpenDuration; autoOffTimer value is sent as an attribute;
Update 3 : added new _TZE200_a7sghmms GiEX manufacturer; sending the timeout 5 seconds both after the start and after the stop commands are received (both SASWELL and GiEX)

1 Like

@kkossev Thank you for the work you've put into this. Upon initial testing I still can't get around the 60 second timer. I will test more tomorrow when I'm able to look at the logs and really dig into it. I'll report back once. I have done some more testing and can provide more info.

1 Like

Test with 120, 180, 240 seconds timers. Seems like the timeout timer resolution is in minutes and the timeout can not be set less than 1 minute?

The current logic is that after the valve is open, the driver sends to the device 5 seconds later the same 'auto off timer' value, trying to override the default 60 seconds timer. Or maybe the new timeout must be sent before the open() command? First set 120 in the "Set Irrigation Timer" and click on the button, this will send the new timeout value to the valve. Then click on Open() button, now the valve should have the new 120 seconds timeout already configured in advance.

What is sure, is that the valve resets to its default timeout every cycle. When the valve closes, the default value of 60 seconds (or 600 seconds) is restored automatically. So the driver should send the custom timeout every time the valve is open again.

Update: now, the driver sets the new timeout every time an open or close command confirmation is received for both SASWELL and GiEX irrigation timers models. Make sure you have the latest version before testing.

Update2: Now I think that the control of the timeout value for GiEX (_TZE200_sh1btabb) is different than the control for SASWELL. Better wait for the next tests after I implement the Irrigation Target mode ( duration or capacity).

Update3: I have added also support for Lidl / PARKSIDE® Smart Irrigation Computer.
If anyone has this irrigation timer, please let me know if it works with this driver.

As there were a lot of changes accumulated in the past week, I will update the production version branch this weekend, if there are no new issues reported.

2 Likes

Version 1.2.0 is now pushed for update via HPM.

2 Likes

Thanks for the update. I can confirm that my device

  • endpointId: 01
  • application: 46
  • manufacturer: _TZE200_sh1btabb
  • model: TS0601
  • tuyaVersion: 1.0.6

Works with this driver. I did delete and read the device. The consumption feature does not appear to work (I was not expecting it to as I’m pretty certain this valve does not support that feature). I had to set the irrigation mode to duration and then the valve was staying open for longer than 60seconds. I also noticed that the irrigation timer appears to be ignored now(I tried 120s and 300s). But I’m fine with this as I can control this through basic rules.

1 Like

I have not been able to get my device to work with the latest version of the driver. I'm seeing this after pairing. Any ideas? I purchased the controller in the first AliExpress link in the first post of this thread: https://www.aliexpress.com/item/4000334424893.html

image

1 Like

Hi @hoffadg ,

This is a new manufacturer, and the device fingerprint was not present in the driver. I have added it in version 1.2.1, also pushed for update via HPM.

But before updating the driver, you can try to configure it for this new device manually.
Click on 'Advanced Options' and Save. Then a new option will appear - ''Device Profile'. Select "TS0001_VALVE_ONOFF" from the dropdown menu, click on Save and try again. I expect that your valve will be working even with the old driver version. With the driver update, the same valve will be now configured automatically for new installations.

Thanks! Unfortunately, I am still unable to get open/close to work. It does, however, sense when i manually open/close by pressing the button. Here is what I see in the log.

Hi @hoffadg ,
These logs show what the driver is sending to the valve (after you have clicked on the Open and Close buttons on the screen), but there is no any response from the device.

Did you pair the valve again to the hub with the latest driver installed?

Yes, i removed the device and followed the instructions to re-pair with the new driver installed.