Tuya Zigbee Roller Shade Blind Motor - Hubitat Issues

This is what 'tilt' mode does in this driver - it substitutes the Open and Close commands with setPosition(100) and setPosition(0) respectively.

Ok so I've now definitely got the latest code on (11:16PM)

I've switched Off 'Ignore the first position report' and it now works correctly, updating it's position after it arrives at the target position value :+1:

With regard to open/close buttons not working, with the blind closed, if I press open here is the resulting log:

Summary

dev:10932022-05-02 22:08:37.339 debugparse: stopping (DP=1, data=0)

dev:10932022-05-02 22:08:37.325 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 00]]

dev:10932022-05-02 22:08:37.269 infoKitchen Blind is closed

dev:10932022-05-02 22:08:37.267 debugupdateWindowShadeArrived: position=0

dev:10932022-05-02 22:08:37.264 debugupdatePosition: arrived!

dev:10932022-05-02 22:08:37.262 traceisWithinOne:true (position=0, lastPosition=0)

dev:10932022-05-02 22:08:37.246 traceupdatePosition: position=0

dev:10932022-05-02 22:08:37.243 infoKitchen Blind is closed

dev:10932022-05-02 22:08:37.239 debugupdateWindowShadeArrived: position=0

dev:10932022-05-02 22:08:37.231 debugparse: arrived at position 0

dev:10932022-05-02 22:08:37.229 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000302000400000000, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 03, 02, 00, 04, 00, 00, 00, 00]]

dev:10932022-05-02 22:08:37.088 debugupdateSpeed: speed=100

dev:10932022-05-02 22:08:37.086 debugparse: speed=100

dev:10932022-05-02 22:08:37.084 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00006902000400000064, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 69, 02, 00, 04, 00, 00, 00, 64]]

dev:10932022-05-02 22:08:36.984 traceupdateWindowShadeOpening

dev:10932022-05-02 22:08:36.981 debugparse: opening (DP=1, data=2)

dev:10932022-05-02 22:08:36.960 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000102, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 02]]

dev:10932022-05-02 22:08:36.913 infoKitchen Blind is opening

dev:10932022-05-02 22:08:36.910 traceupdateWindowShadeOpening

dev:10932022-05-02 22:08:36.901 debugparse: opening (DP=1, data=2)

dev:10932022-05-02 22:08:36.896 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000102, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 02]]

dev:10932022-05-02 22:08:36.671 traceparse: ACK command=0

dev:10932022-05-02 22:08:36.426 tracesendTuyaCommand: dp=0x01, dpType=0x04, fnCmd=0x02, fnCmdLength=2

dev:10932022-05-02 22:08:36.419 debugopen, direction = 0

With the blind fully open, if I press close here is the resulting log:

Summary

dev:10932022-05-02 22:11:59.866 debugparse: stopping (DP=1, data=0)

dev:10932022-05-02 22:11:59.860 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 00]]

dev:10932022-05-02 22:11:59.743 infoKitchen Blind is open

dev:10932022-05-02 22:11:59.741 debugupdateWindowShadeArrived: position=99

dev:10932022-05-02 22:11:59.739 debugupdatePosition: arrived!

dev:10932022-05-02 22:11:59.736 traceisWithinOne:true (position=99, lastPosition=100)

dev:10932022-05-02 22:11:59.728 traceupdatePosition: position=99

dev:10932022-05-02 22:11:59.726 infoKitchen Blind is open

dev:10932022-05-02 22:11:59.724 debugupdateWindowShadeArrived: position=99

dev:10932022-05-02 22:11:59.720 debugparse: arrived at position 99

dev:10932022-05-02 22:11:59.718 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000302000400000063, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 03, 02, 00, 04, 00, 00, 00, 63]]

dev:10932022-05-02 22:11:59.657 traceupdateWindowShadeClosing

dev:10932022-05-02 22:11:59.655 debugparse: closing (DP=1, data=1)

dev:10932022-05-02 22:11:59.649 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 01]]

dev:10932022-05-02 22:11:59.483 debugupdateSpeed: speed=100

dev:10932022-05-02 22:11:59.481 debugparse: speed=100

dev:10932022-05-02 22:11:59.479 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00006902000400000064, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 69, 02, 00, 04, 00, 00, 00, 64]]

dev:10932022-05-02 22:11:59.355 infoKitchen Blind is closing

dev:10932022-05-02 22:11:59.353 traceupdateWindowShadeClosing

dev:10932022-05-02 22:11:59.351 debugparse: closing (DP=1, data=1)

dev:10932022-05-02 22:11:59.345 traceparseSetDataResponse: descMap=[raw:catchall: 0104 EF00 01 01 0040 00 B7F4 01 00 0000 02 01 00000104000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:B7F4, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[00, 00, 01, 04, 00, 01, 01]]

dev:10932022-05-02 22:11:59.195 traceparse: ACK command=0

dev:10932022-05-02 22:11:58.506 tracesendTuyaCommand: dp=0x01, dpType=0x04, fnCmd=0x01, fnCmdLength=2

dev:10932022-05-02 22:11:58.490 debugclose, direction = 0

1 Like

Understood. Previously I had to use tilt mode to get the blind working at all. Should I use tilt mode now to get that working? I seem to think that when I used tilt mode previously, the blind moved a lot slower.

Yes, the only option availabe at the moment is to use the tilt mode... What can be done as a workaround in the driver for your model is to silently substitute the Open and Close commands with the working setPosition commands.

Reading the logs, I see than 1 seconds after sending the Open command the device reports back the motor speed (100%) and 150 milliseconds later reports 'arrived at position 0', which should be Closed! 100 milliseconds later the 'stopping' command is received from the device.

Have you tried to issue an Open command when the blind is already open and vice versa?

Yes I get the same result. I've just switched to Tilt mode and that works fine for me, so I can Open, Close or Set Position in the device and everything works with all positions showing correctly and at the right time. :+1: With Tilt mode fixing the Open/Close it means I can now Open/Close with a single tap on my dashboard tile. I tried earlier setting the position of the blind using Hey Siri through Homebridge and that worked great 'hey Siri set kitchen blind to position 50' works (I just need to remember to include the word 'position' or it sets the speed!) so I should now also be able to do an open/close with Siri.

It might be moving at a different (slower) speed with tilt mode but it's not as obvious as it was before. I'll try it both ways tomorrow and compare timings of a full open close in Tilt and Lift modes for my own sanity!

1 Like

OK, tomorrow I will replace the Open and Close commands with SetPosition for your model. That's a workaround but it should work for Siri (also Alexa and Google Home).
Thanks for the tests!

Have you set the upper and the lower limits? Or probably the device has been reset to it's defaults accidentally?

I can recall similar behavior with my unit - it was not possible to open or close it, until both the upper and lower limits were set as per the instructions in the leaflet. It's quite possible that SetPosition command works, but stops by internal timeout in this uninitiated mode.

Yes I set the top and bottom limits. I originally had this blind motor on a blind in another room. When I moved it to this blind I removed and all limits and set them up again.

Arriving unfashionably late to the testing party, but after a long drive back from Wales I'm now home again and able to participate. Some available time in evenings, and rather more this Thursday (WFH) and over the coming weekend.

If there's anything I can help with, please let me know.

2 Likes

I tested the open, close, set level and set position commands on the device. With Alexa I tested the open, close and set position/level commands. Everything is working.

Thanks.

2 Likes

@kkossev muchas gracias por todo tu esfuerzo y trabajo, mis felicitaciones amigo

1 Like

An update on testing results with my M515EGBZTN using v3.1.5 code:

  • There was a minor glitch with the default settings applied by Configure; these set the mixedDP2reporting flag to False.

  • The main (only?) impact of this was to prevent continuous position reporting as the blind moved; after setting this to True via Preferences, position reporting started again.

  • The "Invert position reporting" option needed to be enabled for everything to work consistently.

  • With those changes made everything works correctly for remote, Hubitat dashboard and Alexa commands; the windowState and position are updated correctly as the blind moves, and after it stops.

Big thanks for the work you've done on this!

Extra testing: Over the weekend I also installed a new Tuya/ZemiSmart device, the in-cylinder ZM25EL (I've also seen it referred to as an AM38). Unlike the AM15 mentioned in my original post, this connects directly to a Zigbee hub and supports 2-way communication.

Assuming that the Tuya hub/app combo gives the best attainable response, it doesn't give continuous position feedback as it moves but does give a final position update when it stops moving (at an end limit or after pressing the Stop button). It also reports battery level.

This worked fine with the v3.1.5 driver, which was assigned automatically when the motor was paired with Hubitat; the "Invert position reporting" option needed to be set again, but everything else was left at the defaults. (Possibly related to this - both the M515EGBZTN and ZM25EL needed the Direction preference set to "reverse" for the remote buttons to drive the motor in the correct direction.)

Again, thanks! (And please let me know if there are any other tests you'd like me to run.)

1 Like

How well does this work with the AM43 at this point? I'm using amosyuen's originakl driver and was wondering if there is an advantage to your fork....

1 Like

I have it and it works perfect, @kkossev did a very good job

@rlithgow1 give it a try. I think I had way more issues with the original driver that you're using. I think the main issue has been that there are different variants of the 'AM43' that all appear identical, so people were seeing different results due to different commands being needed. I believe Kkossev has managed to alter the driver to allow use with the different models. My model is now working far better in that it reports all of it's positions correctly. Currently I have to use 'tilt' instead of 'lift' if I want the Open/Close commands to work and I think that slows the speed a bit (I haven't got around to timing it as yet) I can use it in 'lift' mode at full speed if I just use the set position to 0/100 instead. The latest version is here - I've just bookmarked the page so I can check for changes:

https://raw.githubusercontent.com/kkossev/hubitat-amosyuen-fork/main/zemismart/Zemismart%20Zigbee%20Blind.groovy

3 Likes

I'm using this one (zemismart am43)

2 Likes

Yeah its those characters after the 'TZE200' that differ on mine. He's been adding the different ones into the driver and setting it so that it recognises your model. I can see that your specific model is listed in the driver code I linked.

3 Likes

@ian3 thank you for the tests, I am glad this worked for you!. In the next update, I will include the correct initialization settings for your model when it is first paired or Configure is hit.

Can you post the device fingerprint? I will add it in the next update as well ("Invert position reporting" to be automatically selected for this new device).

@rlithgow1 If the original driver is working fine with your AM43 motor, there is no need to switch over the forked driver. I started the mods because amosyuen's original driver was not working with my blinds.

@johnwill1 if switching between tilt/lift changes the motor speed (can you please check again and confirm it?), then it is worth adding one more 'advanced configuration'' parameter which will substitute the Open and Stop commands with SetPosition 0/100.. I didn't want to further complicate the configuration options, but obviously, there are so many different variations of these motors so there is no simpler way to accomplish that.

3 Likes

Thanks - the details for the ZM25EL are:

  • model: TS0601
  • manufacturer: _TZE200_68nvbio9

@kkossev. I've just checked this again this morning by timing an open & close operation with tilt mode vs a set position 100, set position 0 with lift mode.

I could've sworn it was slower on tilt mode, but the timings prove otherwise. In both tests I timed it at 50 seconds to close, 55 seconds to open. So it turns out I was wrong and no further changes are needed for my model ( _TZE200_rddyvrci)

Thanks again for getting this working correctly.

2 Likes