ZHA Curtains module calibration

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?

5 Likes

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!

1 Like

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:

2 Likes

Hello @basmeijer , I was successfull to set Cluster Attribute Calibration_time (id: 0xf003) for on device but not for the second. It seems that it is read only, The valure remanins to the default of 100. Any idea to unlock the variable ?
Thanks

Hi,

Still no solution for this problem ?
Do you know if this can help : Custom Component: Cover Time Based

Thanks !

Hi @Eden91, @edecae, @alaturqua,
without changing or hacking the zigbee firmware we can not solve this in the actor himself. (If you use or replace it with a wifi version and flash it with esphome you can do it - but my try to flash a wifi device was not successful…)
But we can solve it on server side with home assistant.

I have a workaround for you:
Every time the cover is complete up or down I change the calibration time via script and automation.
The script has two params: ieee (the zigbee device id) and deciseconds (e.g. 100 for 10 Seconds)

Script:

alias: Rolladen Zeit setzen
sequence:
  - service: zha.set_zigbee_cluster_attribute
    data:
      ieee: "{{ ieee }}"
      endpoint_id: 1
      cluster_id: 258
      cluster_type: in
      attribute: 61443
      value: "{{ deciseconds }}"
fields:
  ieee:
    example: 84:71:27:ff:fe:cf:d2:32
  deciseconds:
    example: 250
mode: parallel
icon: mdi:window-shutter-alert
max: 10

Automation is closed → set uptime:

alias: Rolladen Zeit einstellen hoch
description: ""
trigger:
  - platform: numeric_state
    entity_id: cover.hwr
    attribute: current_position
    below: 1
    for:
      hours: 0
      minutes: 1
      seconds: 0
    variables:
      ieee: a4:c1:38:ad:2e:84:0e:78
      deciseconds: 215
condition: []
action:
  - service: script.rolladen_zeit_setzen
    data:
      ieee: "{{ ieee }}"
      deciseconds: "{{ deciseconds }}"
mode: single

Automation is opened → set downtime:

alias: Rolladen Zeit einstellen runter
description: ""
trigger:
  - platform: numeric_state
    entity_id: cover.hwr
    attribute: current_position
    above: 99
    for:
      hours: 0
      minutes: 1
      seconds: 0
    enabled: true
    variables:
      ieee: a4:c1:38:ad:2e:84:0e:78
      deciseconds: 195
condition: []
action:
  - service: script.rolladen_zeit_setzen
    data:
      ieee: "{{ ieee }}"
      deciseconds: "{{ deciseconds }}"
mode: single

You have to change the params for your case.
The only disadvantage in this solution is that we write every final curtain move in the zigbee memory. I`m not sure that the zigbee memory chip likes this many write cycles…
Has anyone an idea how many write cycles are allowed or planed in this devices?

5 Likes

hi,
I believe that im having a similar problem to @edacae where the Cluster: calibration_time (id: 0xf003) is set to 450 by default when i try to override it with 250 for example. The value changes to ‘None’ and after few minutes it goes back to 450.
it seems that it is not possible to override the cluster value for some reason. any other method to force override the value.

thanks!

1 Like

Thanks! This really helped!

I have the same issue. I can’t update any attribute in my Tuya OXT Curtains modules.
I can read the default value like @Hakbar: in my case the calibration_time is 100 by default. Once I change it and try to read it I get None, and after some time it’s 100. I could not enable calibration (id: 0xf001) - initially it has value: enum8.undefined_0x01. Once I try to update it to 0 I receive None value. I cannot calibrate my curtains with ZHA. Reconfiguration of the curtains module does not change anything.

Home Assistant 2022.12.8
Supervisor 2022.12.1
Operating System 9.4

While trying to set new calibration_time a following error is in the logs:
Logger: zigpy.zcl
Source: components/zha/core/device.py:658
First occurred: 09:01:46 (1 occurrences)
Last logged: 09:01:46

[0x85C2:1:0x0102] Failed to convert attribute 0xF003 from (<class ‘str’>) to type <class ‘zigpy.types.basic.uint16_t’>: invalid literal for int() with base 10: ‘’

3 Likes

I can confirm the issue @Hakbar and @RafalC reported. My Tuya based curtain modules (brand is ‘Moes’) shows the same behaviour. Pairing works perfectly fine. The modules are identified by ZHA as ‘Tuya TS130F’ and the commands to move up and down also work right out of the box. But trying to change ANY parameters in the configuration results in errors and no changes are written to the devices.

Just for reference my set up is:
Home Assistant 2022.12.0
Running from a docker container on Arm v7 hf

And the device is identified as:
manufacturer: _TZ3000_1dd0d5yi
model: TS130F
name: _TZ3000_1dd0d5yi TS130F
quirk_class: zhaquirks.tuya.ts130f.TuyaTS130FTI2
manufacturer_code: 4098

There is however a workaround that’s in fact so easy I’m a little embarassed not to have thought of this earlier. While ZHA fails to write the configuration, deConz does without a problem. So as long as you use a Conbee or similar, you’re good to go.

  1. Take the Conbee out of your usual Home Assistant server and plug it into your favorite x86 laptop. Mac might also work, but I can’t try it.
  2. Install deConz
  3. Then open the phoscon web GUI and pair just the curtain module. You can skip all other devices.
  4. Go to the local deConz installation. There select the module and enter all the configuration you want.
  5. Now return the Conbee to your main Home Assistant and pair the module again. It now has the configuration and is ready to go.

While this works with only little additional effort, I do hope ZHA also gets fixed soon to fully support these type of modules.

1 Like

Thanks a lot, very helpful! Please allow me a further question, if I want change the calibration to 0 it’s doesn’t work, always shows „None“

Do I something wrong?

How do you do that? ‘Value’ field or “Manufacturer Code Override” ?

Sorry for the late replay, i used the field “Value”

Thank you for this great article and info.
Setting the calibration time value (Time in sec * 10) with deconz/phoscon and then pairing in ZHA did the job. Would be great if you can directly write that value in ZHA. I am using the BSEED TS130F Curtain Switch.

After all this years it would be awesome if someone has codet the solution.

Did you end up finding a solution for this issue where it opens only 90% after being not fully closed?

1 Like

As far I know still no solution.
For me handle correctly the shutters should be 100% functional … But today still not …

1 Like

Okay it runs. You must not put the value in the “Overwrite manufacturer code” field.ONLY in the first, where the value is also displayed when reading…

Hello,

Did you find a solution? I have the same problem…

1 Like