Tuya Curtain

Hello all,

I would like to control the curtains of Abalon with HA.Curtain Link
In the official Tuya app they are available and can be controlled. Unfortunately, it looks different with HA. Here there is also Tuya and I can log in with my Tuya account but the curtains do not appear.

Has anyone here the curtains in use with Ha or an idea for me?

2 Likes

Hello,

I have some experience with Tuya curtains and HA (I have 4 curtains and 2 shades). Are you trying to connect this through the regular tuya integration in HA or the local Tuya integration for HA? I have experience enough with the local tuya integration to where I can show you how to find the device in their API and then you can set up the device in HA but I have no experience with the regular tuya integration.

1 Like

thank you for your answer. I had already installed the local Tuya but there I did not get further. How do I create it over the local one?

Watch/Follow this video: HOW TO - Setup Local Tuya in Home Assistant - YouTube When you get to the part about finding your devices in their API, let me know and I can walk you through the less standard parts:

There’s some steps in this video that MUST be completed before we can get to that point. I promise, it will be worth it. I did this last month and I have all my tuya devices running locally on HA. I have personally validated the steps in this video in the last month or so. If you get stuck viewing your devices in Tuya try changing servers even if it doesn’t make geographical sense. I couldn’t view mine because I chose eastern americas because I am in atlanta. When I talked to tuya, they told me to switch to the western americas server in portland and all my devices started showing. That’s the only trouble I had with this connection.

I have prepared it so far but what do I have to enter here:

type of entity?
ID? (101? or 102? or 103?)
Value On?
Value Off?
Device Class?

Hello,

The entity platform is cover:
2022-03-20 11_16_31-Greenshot

This is the part where it gets tricky (because tuya is an unreliable/inconsistent mess):
I walked through the steps and this is what I see as the appropriate setup:


The best advice I can give you on this step is to be patient, do NOT try to work all the settings out at once, and be prepared to delete the integration and put it back in. The reason I selected the ID of 3(value: 3) is because it’s the one that I see as mostly likely to be the cover control because it has 3 controls (open, stop, close). Do it like this, jump into the curtain and see if you can see basic controls (it will probably just be an on/off slider). If you have that, then you know you have the correct device ID. If you don’t get that or when you enter the device, it says unavailable, then you’ve got the wrong one, delete the integration and try another one. I would probably try 1 as my second choice. I know this trial and error stinks but it’s the easiest/fastest way I’ve learned how to do this. None of the documentation online matches 100% and in my own house with the same devices, the setup of two of my fans is wildly different than the other 4 despite being the same device. Trial and error is the only way I survived and got all my devices to work.

The reason it’s like this is because once you select the device ID, there’s no going back. So if you get it wrong and you want to try another one, you basically have to rip the integration out and put it in using a different ID. All the other settings can be changed if you get them wrong so don’t worry about those just yet.

Once you get confirmation that the device at least has the correct ID and is communicating, then you can go back into the local tuya config for this device and tweak the other settings to give you the bells and whistles (there shouldn’t be many with a curtain). With each change, go into HA settings and reload the tuya integration, then go into the device, see if it controls accurately. If it does, move onto the next functionality, if not, go back into local tuya config and play with the settings again and reload the tuya integration to bring down the new settings and try again.

Position mode should be position
The actual position of curtains is 100% for open and 0% for closed. Many of the tuya curtains have to be reversed to be accurate. That’s what these settings are for:


Current position will give you the current position of the curtain if selected properly and is supported
set position will give you the ability to select 25% position and is supported
Full opening time is irrelevant because curtains calculate position based on position not time and you already selected position mode above.

Again, check the invert position box if you notice 100% is closed and 0% is open for your curtains.

3 Likes

thank you very much

Here it is grayed out. Is that the same for you? Or do I have to adjust something else?
grafik
I can control the position with the sliders.
grafik

Grayed out means we selected the wrong one. Its not communicating. Delete the curtain in local tuya app, re-add and try another value. Maybe it IS the first one. Systematically try them 1 by 1 until those controls are not grayed out. The further down the list you go, the less likely the settings are to be accurate. I think 9 is as far as I’ve ever gone.

Hi

Í´m running home assistant 2022.7.5 in proxmox

I have Abalon curtains and local tuya.

I have tried a number of combinations, the closes I got is:

I can set position with the dimmer slide, everything from 0 - 100.

From the open/close buttons, I can open my curtains but the closing button is grey and the curtain symbol is always closed.

From MQTT explorer is the DPS
101 with both set and command line: this is how to set position, for example 70%
102 with both set and command line: fz_zz_stop, for totally open or close
103 true

I’m using protocol 3.3

In the next pop up:

open close stop section
On_off_stop
Open_close_stop
Fz_zz_stop
1_2_3

In position mode
None
Position
Time

Current position
101 (value 100)
102 (value stop)
103 (value true)

Set position
Same as current

In set position I choose 101 and I can use my dimmer slide

For using the open and close button in Lovelace I have tried all options in open close section in combination with position and current position options but I can’t get my close button white and working.

What can I do so I can close my curtains and get the curtain symbol to work?

Can I put in zz, ,for open, somewhere in the config file to make it work?

Thank you

Andreas

Finally, after a number of days, I figured out (and I found how to change ID)

I went back to my tuya devices and under my curtains device information, I clicked on the three dots, there remove device.

The I add a new device again in local tuya (with the same name) and in the last pop up, ID comes.

In my case I choose: ID 102

Then
Fz_zz_stop
Position
102 current
101 set

For now it works
What I haven’t figured out yet is when I open / close the blinds the position slide don’t update, it has the last state I used and the curtain symbol is always open.

NOTE
If you quickly open and closed the curtains (say in 1 second) they could stop working. I went back to smart life app and open and close them there to “reset”. So now they are online again in HA.

2 Likes

Hey, I used your config and it somewhat worked for me. The open/close/stop buttons now properly work, but the position doesn’t work at all, neither does it show the current position nor can I set a position.

On the other hand, while testing before finding this thread, I couldn’t make the open/close/stop buttons work, but I could set the position with the slider and the curtain would go there. For that I didn’t set any ID to Current Position and for Set Position I had ID101.

I also tried combining yours and mine, using fzzzstop and not setting anything to Current - but that doesn’t work.

EDIT
I got it to work somehow. Though it doesn’t really concide with Tuya app.

So, I have it set as:
fz_zz_stop
position
101 - current position
101 - set position
invert 0-100 position - ON

Now the invert part doesn’t make sense, or at least it doesn’t act the same as in Tuya app. But, in local Tuya, it works properly. Beforehand I had also issues that the curtain was recognised as closed, and I could only click Open button, but in reality it was already Open and it wouldn’t do anything. I also had issues setting position.
But with the set up above, I am able to set position, close, open, stop and the position will also be set to the position when the curtain is stopped. Now 100 means it’s open, 0 means it’s closed. If you think about it, you can look at it as “100 percent open, 0 percent open” lol

1 Like

If I understand you right, so when the curtain is open, tuya app says the curtain are close.

I also got the issue a number of time, when I played around. What I did, was close the curtains and the in the tuya app, and moved the dots in the curtain symbol to close / 100% and hold for a second to memorized the position. Fixed.

I haven’t got so much time to play around with my settings sense I “solved” my issue but one time the close symbol disappeared/ become gray. I went back to tuya app, there were open/close/pause button grey. I clicked in pause so it become green and in HA the close button become white and worked.

Nope, the current position in Tuya App and in HA are synced. Everything is synced and works fine, except the position slider. Let me try explain a bit better.

This is how it currently works. Open curtain button in HA works. Close curtain button in HA works. Both are perfectly synced with Tuya App and control my curtain just like how it says. Pause/stop button works. It stops moving the curtain whenever I tell it to. Then, the current position slider moves to that position - so it works too. The slider works too, I can move and select a certain position and it will open/close the curtain to that position.

Now, what is different to Tuya is the meaning of the position percentage. For example, if I slide the position slider in HA to 30 percent, it opens the curtains to 30 percent >>> but in Tuya app it’s inversed, it says it’s at 70%.

The reason for that is that I have checked the “inverse position” option. Before that, when the box wasn’t checked, the buttons in HA that open/close the curtain weren’t synced properly. If my curtain was completely closed, the open button in HA was greyed out and i couldn’t open the curtain, but the close button was available and I could tap it >>> but nothing happens. Only when I checked the “inverse position” box, when the curtain was closed, the open curtain button in HA was available and I could now open the curtain.

I somehow overcomplicated the explanation lol

https://www.aliexpress.us/item/3256804076859966.html?spm=a2g0o.order_list.0.0.4d361802lk0TAv&gatewayAdapt=glo2usa&_randl_shipto=US
The product model is CMD850E

I bought a Tuya wifi motor it works perfectly in Tuya smart app, but I cannot integrate into localtuya:

This is the setting I see when add the device. I cannot select ID/Current Position/Set Position:

I noticed that, the ID/Current Position/Set Position values are correct as per the real location and Tuya app numbers, so I think HA is able to communication to the device, but somehow cannot recogonize it as a working device (I chose “cover” type)
I have tried many combinations of those options, none of them works. The entity is always grey as unavailable.

Can some expert help me out? It is frustrating not able to control everything in HA (and Homekit through the bridge)

After changing “Standard Instruction Set” to “DP Instruction Set” in Tuya IoT platform for the curtain device, I can see mulitple options for Device ID, Current Position, Set Position. And the curtain entity is not grey any more!

Finally I reached to the point that HA/Tuya app/Homekit are all in sync and behave corrrectly.
The only thing is that the “open”/close" button cannot operate the curtain. I have to use “position” slidebar to control it. Can someone help to make “open”/“close” button work?

With this, for now I have itl run with local Tuya…
‘’’
alias: Test All Shutters Close
description: “”
trigger: []
condition: []
action:

  • service: cover.close_cover
    data: {}
    target:
    entity_id:
    - cover.livingroom
    - cover.kitchen
    - cover.master
    - cover.second
    - cover.third
    mode: single

alias: Test Shutters Open
description: “”
trigger: []
condition: []
action:

  • service: cover.open_cover
    data: {}
    target:
    entity_id:
    - cover.livingroom
    - cover.kitchen
    - cover.master
    - cover.second
    - cover.third
    mode: single

alias: Test Shutters Stop
description: “”
trigger: []
condition: []
action:

  • service: cover.stop_cover
    data: {}
    target:
    entity_id:
    - cover.livingroom
    - cover.kitchen
    - cover.master
    - cover.second
    - cover.third
    mode: single

alias: Test Shutters Stop
description: “”
trigger: []
condition: []
action:

  • service: cover.stop_cover
    data: {}
    target:
    entity_id:
    - cover.livingroom
    - cover.kitchen
    - cover.master
    - cover.second
    - cover.third
    mode: single
    ‘’’

anyone with experience with percentage function or time to run?

I have had good success with this workaround: GitHub - davidramosweb/home-assistant-custom-components-cover-time-based: With this component you can add a time-based cover. You can set a switch to open and another to close the cover.

Does anyone no if there is Local Tuya Integration which supports Zigbee GW’s, and than Zigbee devices behind the GW?
From the IOT Platfom i was able to find an API to retrieve those devices.

Since Tuya killed support for this device, the workaround no longer works (around).

So solder an ESP-chip instead of the Tuya :face_with_symbols_over_mouth: and write it on ESPHome.

Step 1

Here is the config - found out GPIO pins for buttons and motors: esphome-configs/zemismart-rollershade.yaml at 434acc9b5ca3f3ba3f4e80127e39fc2965a75b5c ¡ velijv/esphome-configs ¡ GitHub

Step 2.1

Step 2.2

1 Like