ZHA Curtains module calibration

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.

27 Likes