ZHA Curtains module calibration

Hi,

I bought Zigbee (Tuya) curtain (shutter) modules. But there is no way to calibration the up/down time with ZHA.

Is it possible to add service to start/stop calibration of the module ?

Kr,

Request for device support for ZHA must be done here:

This does not sound like device request but instead cover setting/configuration to set top + bottom stop?

Yes maybe already done with a quirks. So needs to be set in « Manage clusters » on the device page

This is about the Zigbee Curtain Module QS-Zigbee-C01, also in Home Assistant recognised as Tuya TS130F.
What I did to make it work without a lot of hassle in a ZHA integration is using Clusters (go to Configuration > Devices > the device > Manage Clusters) and to select the

TuyaCoveringCluster (Endpoint id: 1, Id: 0x0102, Type: in)

and the

Cluster Attribute Calibration_time (id: 0xf003)

Find out how many second your motor needs for the full movement and multiply x 10, so the value is in 0.1s increments. Click Set Zigbee Attribute to confirm and see how it works out and finetune if necessary. The percentage scale will now work and reflect the true movement percentage.

If you like to do it another way, you can also use the module’s calibration function, which can be invoked by setting the Value at

calibration (id: 0xf001)

To 0. Yes zero! Very odd, but this is how is is apparently.
Then go to the controls of the entity and engage each direction till you are happy with the desired endpoints. Then go back to the Cluster setting and set

calibration (id: 0xf001)

back to 1 to store the calibration. You can now check in the

Cluster Attribute Calibration_time (id: 0xf003)

the calculated total motor time to get from 0 to 100 %, which needs to be divided by 10 to get seconds.
And if needed,

motor_reversal (id: 0xf002)

also works.
Value 1 is reversed, 0 is default (I needed to reverse).
Regularly check with Get Zigbee Attribute to know what you are doing and also what Home Assistant did. I noticed that after a while the Cluster window sometimes needs to be closed and opened in order to correctly work with the values again, so this is a bit “delicate” process.
Remember every time to delete the hexadecimal result and just enter decimal here.

Regarding build quality, the module is pretty decent.
The casing might be a bit cheapish but the clip which fits on a DIN rail is a nice extra and also helps to prevent that the back plate would come off. Obviously opening it did not contribute to the tightness of the backplate cover once put all back together.
Inside there are 2 pretty beafy relais rating 10A, which even supercedes the 3A spec on the case, soldered directly on the surface board. In another brand/model Curtain Module I saw way smaller relais and those were mounted on a secondary surface board and just with a small drop of solder as the 90 degree attachment which I found a bit of a disturbing design flaw considering 230VAC motors are controlled by it.

7 Likes

Thank you @basmeijer for this pristine explanation

YES, Thank you for this super explanation.

hello,
I have the problem that I don’t have the cluster- attribute F001 in my selection
so i’ve written a script, but unfortunately this doesn’t work
can you help me?

WindowCovering (Endpoint id: 1, Id: 0x0102, Type: in)

alias: xxx
sequence:

service: zha.set_zigbee_cluster_attribute
data:
ieee: “04:cd:15:ff:fe:06:69:66”
endpoint_id: 1
cluster_id: 258
attribute: 61441
cluster_type: “in”
value: 0

Thanks for the information. I have some of the loratap devices with ts130f.

There is an issue on my side. My shutter motors take longer up than going down. And I have set for example the calibration_time to 320.

What happens is:
100% is fully opened in HA

  • Set position to 60% → Shutter goes down to position 60%
  • Set position to 100% → Shutter goes up to 90-95% and thinks it is 100%. Since it takes longer going up.

Only solution is to close fully the cover and open again. Than it opens 100% and displays 100% as well.

Does anybody know a solution how to solve this? Or any link to a solution?

Hi Guys,

I have the same problem.
When the curtain is open, I press down button and stop it after 5 sec for example. Then I press UP and the curtain is not completely open. (Because the curtain is faster when go down).

How to solve this issue or any workaround?

Thanks!

Really great!! Thank you so much

Hello, I have the same problem, no new idea about it ?
Did someone find a solution ?

I’ve seen the cluster : Acceleration_time_lift, could be part of the solution ? The value is “none” and I didn’t manage to change it :frowning: