core: ZHA Tuya attribute missing in TS130F curtain module

The problem

Not able to calibrate TS130F based Zigbee curtain module (e.g. https://zigbee.blakadder.com/Lonsonho_TS130F.html) in ZHA because the ZHA cluster and its attributes are missing. This attribute contains the calibration. This is Calibration (0xF001)

What is version of Home Assistant Core has the issue?

core-2021.2.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Example YAML snippet

# Put your YAML below this line

Anything in the logs that might be useful for us?

# Put your logs below this line

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 12
  • Comments: 106 (28 by maintainers)

Commits related to this issue

Most upvoted comments

FOUND IT!!!

I was almost there by trying and error, but with this post I solved the problem! #https://github.com/Koenkk/zigbee2mqtt/issues/7128#issuecomment-895928027

The solution is to use the attribut 0xF003 but set it to t.uint16_t I had with enum8 and that doesn’t work.

So, here is a snippetf of my quirk for attribut customization:

`class TuyaCoveringCluster(CustomCluster, WindowCovering): “”“TuyaSmartCurtainWindowCoveringCluster: Allow to setup Window covering tuya devices.”“”

attributes = WindowCovering.attributes.copy()
attributes.update({0xF000: ("tuya_moving_state", t.enum8)})
attributes.update({0xF001: ("tuya_calibration", t.enum8)})
attributes.update({0xF002: ("motor_reversal", t.enum8)})
attributes.update({0xF003: ("calibration_time", t.uint16_t)})

`

and i attach is HA cluster interface.

As you can see I have set a 20 second time, and it just works. The percentage adjusts to that time interval.

2021-08-10_15-14-04

I have same screen now but how can i calibrate? What do i have to send as command? Thanks

The good news is that all the action can be done from the same screen. The bad news ? No bad news.

So :

  • Open the clusters window
  • Select “TuyaCoveringCluster (Endpoint id: 1, Id: 0x0102, Type: in)”
  • Launch the “down_close (id: 0x0001)” command
  • Once closed launch the “stop (id: 0x0002)” command
  • Activate calibration mode by setting “0” to the zigbee attribute
  • Launch the “up_open (id: 0x0000)” command
  • Once opened, launch the “stop (id: 0x0002)” command
  • Launch the “down_close (id: 0x0001)” command
  • Once closed launch the “stop (id: 0x0002)” command
  • desactivate calibration mode by setting “1” to the zigbee attribute

It’s done.

Worked me ! Great thanks.

Any change to get calibration mode as switch in lovelace?

Hi, It would be nice to have this integration in ZHA (because of installation HA core without supervisor i can’t event switch on mqtt). Is it possible to add it in future? Thanks in advance.

@MattWestb
This is the signature of my device

`{

“node_descriptor”: “NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.0: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)”, “endpoints”: { “1”: { “profile_id”: 260, “device_type”: “0x0203”, “in_clusters”: [ “0x0000”, “0x0004”, “0x0005”, “0x0006”, “0x0102” ], “out_clusters”: [ “0x000a”, “0x0019” ] } }, “manufacturer”: “_TZ3000_1dd0d5yi”, “model”: “TS130F”, “class”: “zigpy.device.Device” }`

Ok, this makes sense.

Now we just need to find your the register for that setting.

You can always revert / update firmware again from here:

http://deconz.dresden-elektronik.de/deconz-firmware/

You are a little step close to solution 😃

Just wanted to confirm that the modified quirk works for me too. I was able to calibrate my QS-Zigbee-C01 Curtain module that shows up as “TS130F by _TZ3000_vd43bbfq” using the quirk and the above instructions.

You too! (And there’s your thumbs up aswell!)

Ok, so first you ask (with a big X/Y-problem behind your intention, as you confirmed in your follow-up): Does it work for you? - Implying you’re following up on the recent messages, which were explicitly about calibration_time.

Yes, everything we need the custom quirk for the Nous L12Z for (in other words: making the curtains open, close and everything in-between) works flawlessly. Since you didn’t specify any other parameters we have to assume you’re connecting to exactly that discussion here.

Since many people had problems with calibration in this thread it was said multiple times to just use calibration_time instead; I wasn’t the inventor of that “workaround” as you call it; I’m just the messenger.

I did tell to specifically ignore calibration not to everyone but one specific person and I pointed to that fact since you followed up on a discussion about calibration_time in a context where most people here want only one thing: make their curtain modules work. You didn’t even specify the exact curtain module that you’re using, which is very important because through this issue we know for a FACT that some of the relevant curtain modules here do not work with calibration at all.

If you really want to be that daredevil who’ll rather fimble around with calibration instead of just doing a bit of trial-and-error and use calibration_time instead, then so be it. But leave me out of your condescending wall of text, implying I’m an internet police of some sorts; I’m just trying to help here and didn’t even receive a simple thank you or thumbs up for the complete write-up of the working custom quirk.

If you’re following the guide on how to do the calibration within this issue (for example making sure that your curtain is completely open before starting calibration), then I guess your curtain modules either aren’t capable of it or the quirk has to be changed.

None of my 10+ Nous L12Z works with calibration, and I also don’t need it because it doesn’t solve any problem for me.

Have a nice day 😉

I cannot set acceleration_time_lift or velocity_lift. They seem to be read only. Maybe this was planned and never implemented.

The calibration is different… Only the time that the curtain would last to open 100% is added

Screenshot_2021-08-05-18-49-27-505_com.tuya.smartlife.jpg

Here!

IMG_20210805_185043.jpg

i’m looking at the possibility of using ZShark with my conbee 2, but it asks me to update the firmware and I don’t want to risk it

I think Rasp/CornBee sniffing is broke or at least using it as one router is broken but its not so easy finding out then its not so well documented.

Im using IKEA modules (aka Billy EZSP) and one LIDL / tuya LED Stripe controller for sniffing and as coordinator and it working great beside for one tuya and one LIDL ZBGW with EZSP 6.10.0.0.

Its possible rolling back the EZSP firmware on the tuya ZBGW and reverting the serial server but i dont knowing if tuya cloud is liking it or not and i think no user have trying it (i have only trying downgrading EZSP to 6.5.1.0 after flashing the normal 6.7.0.0 and from ZHA is working OK but i was not roiling back the tuya start so not tested with tuya cloud).

Yep. At the moment I already got a ZBGW hacked, that I used with ZHA and ir worked fine. So, I will need to buy another one (since this has the firmware changed). Ordering it now… Another option is to use the ConBee II and there are some info about using it to sniff.

I will keep you posted if I advance in this quest 😃 Too much effort for inexpensive devices, but it’s fun.

I think the best is sniffing how tuya GW is handling it but then you need one tuya ZBGW and one sniffer device. I cant recommending IT CC-2531 then its too limit better with one Nordic or one EZSP device with NCP firmware loaded (its the normal coordinator firmware and its working with all version of it). One nice device is tuya / LIDL ZBGW that also is working for sniffing if hacking the device OS for installing the serial server to ZHA but then you cant using it for searing your device that you like to sniffing or you need 2 of them 😃)

@franderlink Your device " _TZ3000_1dd0d5yi" is not supported then no user have posted one device signature so its not possible finding the right quirk for the devs for adding it.

Pleas post the signature of your device.

the updated quirk is working properly. Now I can calibrate the device. Thank you very much for your help!!

Sorry, i didn’t have time to give news. So yes it’s works with the modification i made ( I just modify the the signature). But of course it’s break compatibility for other model.

And according to this one (https://github.com/zigpy/zha-device-handlers/pull/902), there is 4 differents type of model;

I will try to confirm it later( because i don’t test this version) but this file should be ok =>https://github.com/zigpy/zha-device-handlers/pull/943

You were right, it was the signature. After fixing the signature, the quirk is loaded. I will give more infos tomorrow after more tests. It’s too late to play with the calibration of covers tonight.

image

Same issue here, without calibration I don’t know were my cover position is.

Same here, looking forward to updates!

Same thing here, not possible to make any calibration without this feature implemented 😦