Zemismart Blind motor - configuring in Local Tuya

Anthony

If you have the Zigbee version, you don’t need Tuya Local because TL works on wifi and is not compatible with zigbee.

For Zigbee you will need a Zigbee co-ordinator (hardware) attached to your HA instance and then integrations like Zigbee2MQTT and Mosquitto to bring its data into HA.

I have an Aqara blind zigbee motor and it connected very easily. (I am using the Sonoff Zigbee dongle as a coordinator - available through Ali-Express, eBay etc)

The Zigbee version should be a lot better than the wifi version.

Hi,
I appreciated to read this post about Tuya cover switch intergration in HA via local Tuya.
My settings are the same as in Don’s message above. And while I still have the issue, that the slider position does show me how much of the cover is still open instead of the state how much is closed, I can live with that. Using the reverse option doesn’t work for me as I have issues with the up/down buttons being inactiv (gray) when in total closed or open position.

My main reason writing here is to ask, if you have open/close/stop in the activity picklist of the covers when used in automations. Because using the covers in automations I only can use the slider to adjust the covers. This obviously is a problem when I want to assign “Stop” to a remote button via automation.!
Tuya cover automation|690x331

Hi Michael

With control of these motors, it can be a bit vague (maybe we get what we pay for). On the card controls greyed out, try a different card. I use a custom one called blind-card - through HACS. It’s big but doesn’t grey out.

I’m not quite sure what your reference is to using a stop button - is that a separate physical button linked to an automation in lieu of a remote control? The cards I use in HA have up & down arrows and a stop button (not physical).

The attachment didn’t come up for me.

What I mean is that I miss in automations access to a “stop” command. I have a physical remote controll with up/down/stop buttons and while I can assign up and down to the appropriate buttons, there is no possibility to assign a stop command to the physical stop button of the remote.

I wonder if you can help. I have Tuya wifi curtain motor that looks like the zemismart one. My settings in local tuya are

As you can see, I only have 3 fields (1,2,5) to choose from to insert into the integration unlike most other people here. I haven’t been able to find combo n that works. The closest that I got was curtain w/ only open and stop control and not close.

There was once I got it to show all three buttons but whenever I said the position it would go to that position and then immediately open completely again.

I also tried to changing the position of the curtain before adding the Entity but the numbers was still the same here. I’m not sure how long it takes to update

Follow the instructions at Get your Tuya Device Local Key - YouTube to get the local_key and note the Get Device Specification Attributes from to the Tuya website. This will show which type of Open_Close_Stop command set your device uses, and confirm whether DP_id 2 is used for positioning the blind.
Frankly those three DP_ids are the useful ones - I no longer to bother declaring the other ones available on my blind motor

Strangely mine doesn’t have any dp

{
  "result": {
    "category": "cl",
    "functions": [
      {
        "code": "control",
        "type": "Enum",
        "values": "{\"range\":[\"open\",\"stop\",\"close\"]}"
      },
      {
        "code": "percent_control",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "control_back",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "control",
        "type": "Enum",
        "values": "{\"range\":[\"open\",\"stop\",\"close\"]}"
      },
      {
        "code": "percent_control",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "control_back",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_state",
        "type": "Enum",
        "values": "{\"range\":[\"opening\",\"closing\"]}"
      }
    ]
  },
  "success": true,
}

I’m going to guess that’s what 1,2,5 are. None ar really the ID. I guess 2 is used for most of it then.
Maybe that is it. It’s a bit strange, because when I set the position with the slider, then it immediately shifts back trying to show the current pos.

Both those issues seem very familiar …

At one point I got a result like yours without DP_ids, and it took a while to discover that the Tuya website has two similar menu options … in the same menu even ! “Get Device Specification Attributes” (note the capital letters) near the bottom of the list has the DP_ids, whereas the “get device specification attributes” option does not.

I also found that the default lovelace control did strange things, so Steve recommended the Blind Card from HACS which works well.

I think it’s working. The only bad thing is with curtain device the icons and position are opposite to what I want. Position is good (L->R) buttons opposite open/close. If I reverse it changes both, so no good.

Also after an automation, all 3 buttons are disabled. I think it’s an error, I can still press stop to enable them again.

The problem is that open button closes, and so on. If I press reverse it seems to change the position slider, but open button still closes.

This is fine in HA, but then in google home I can’t say “open”

Does anyone know a way to trigger the third limit position in home assistant? Or at least control the position in smaller step sizes (current a step of 10).

Wondering if anyone can help here - I have this blind motor and controller but I find that every now and then the motor completely forgets the controller exists
The controller will happily control it but nothing happens and I then have to re-pair the whole thing

Anyone else find this and find a solution?

Was also wondering if there is any way to eliminate the controller and use directly? No idea what protocol it uses to talk between them…

Hi everybody! I decided to Tasmotize my M515EGWT v2-WA. So far, I flashed it and used a template I found on GitHub but, it did not work. From what I can see it only uses the following pins:
GND
VCC
RST
ADC
TXD0
Worst-case scenario, I will have to redo the hardware and the software which I am trying to avoid.

@donburch888
I have a Tuya blinder and was able to get the motor move but not sure to be able to read the % can you help us and provide exact information on how you configured it? I’m very confused on the initial ID that cannot be changed after the config.

The only way I found it working is
image


(weird the entity is not here :frowning: )
but it exists:

here the config - had to choose ID 1

ID1 is fine.

In the “Positioning mode” option, select “position”.

Then in “Current Position” select “2 - value”. The number does not matter. That was the position of the blind when it was integrated into the Tuya app. (100 can mean fully open or fully closed depending on the blind orientation). I found “7 - Opening” also worked.

“Set Position” should also be option “2”.

Then “submit” that.

The “Invert” will depend on whether your blind is going up when the up button is pushed. If it works in reverse (up=down) check that box.

If you tell the blind to go to 60% it should now do that.

Your blind might not show the true position on your dashboard because the Tuya set up means it is not reporting its position properly as it goes through an RF and wifi connection. Two of mine are open but show half open at the moment. There is a V1 and a V2 - the V1 blind is better at position reporting.

BTW - some of the blind controls don’t work well with the Tuya blinds. The down arrow is greyed-out even when the blind can only go down. I found the “custom:blind-card” available through HACS works all the time, but they are a bit big.

1 Like

Up in post #8 the HACS Blind Card was mentioned, and I have also found it works great for my Zemismart blind motors which had this problem.

1 Like

Many thanks for all the help here. I was able to successfully get my Zemismart blind motor to work using the local Tuya library. Here is a screenshot of my settings to help others:

1 Like

Since a recent update to Local Tuya, one of the blind cards I use doesn’t show the position correctly. Two blind cards are stuck on 55%, regardless of what I do.

The Tuya motors have never been good at showing their position in HA, but it seems worse now. That might be the card’s fault, so I’ll have to check around. There is a “jumbo” card that worked fine, but they just take up too much room.

@Steve61 the issue isn’t with HA or the LocalTuya plugin, it’s that the devices themselves don’t report their current position, only what it was last set at. If you manually move the blinds without using the position slider, then it’ll move but the percent_state attribute doesn’t change. You can see that using the Tuya API to poll the device status.

When I poll mine, it returns the following:

{
  "result": [
    {
      "code": "control",
      "value": "open"
    },
    {
      "code": "percent_control",
      "value": 19
    },
    {
      "code": "percent_state",
      "value": 0
    },
    {
      "code": "control_back_mode",
      "value": "forward"
    },
    {
      "code": "work_state",
      "value": "opening"
    },
    {
      "code": "fault",
      "value": 0
    },
    {
      "code": "border",
      "value": "up"
    }
  ],
  "success": true,
  "t": *edited*,
  "tid": *edited*
}

I think the attribute percent_state is supposed to show the current position but it never changes from 0. percent_control is what it was last set at manually using the slider. If you move the blinds without using the slider, it won’t update the percent_control value as that’s not the one being used to move the blinds.

I suspect that’s a bug on the firmware of the blinds controller side (i.e. Zemismart). I wish there was a way to test multiple firmware versions or go back to an older firmware.

Also, for those who found that the arrows are sometimes inactive when they should be active, if you press the stop button it should become active. I think that’s another issue created because of the absence of data on the current position, HA has to assume the position it’s currently in based on the last input.

1 Like

Back in [quote=“donburch888, post:21, topic:320048”] I documented the dp_id’s that I found on Tuya website for my M515xxxx motor

Functions  Status 
dp_id      dp_id  code                type      values               Status
 1          1     control             Enum      open,stop,close      stop
 2          2     percent_control     Integer   0-100, step 1        39
 5          5     control_back_mode   Enum      forward,back         false
            7     work_state          Enum      opening,closing      opening
           12     fault               Bitmap    Label: motor_fault   0
16         16     border              Enum      up,down,up_delete,
                                                down_delete,
                                                remove_top_bottom     down
19         19     position_best       Integer   0-100, step 1         0

[/quote]

I have been afraid to use CloudCutter on it because on a couple of occasions I have had to use the Tuya phone app to reset the upper and lower limits after problems with tension on the cord. Looking again, I see now that dp_id 16 will be used to set and delete the top (up) and bottom (down) limits.

Last year I migrated from LocalTuya to TuyaLocal, including this device and stability improved - however TuyaLocal seems unable to alter the device definitions to add the other dp_ids.

I would now like to migrate this blind motor to ESPHome, and that will definitely mean loosing the ability to set top and bottom limits.

hi everyone, I encountered a problem, I have an M515EGWT when setting up via localtuya, it gives me two entities as shown in the screenshot, if I set up one of them, it turns out that it either opens but is no longer closed, or, on the contrary, closes, depending on whether the inversion is ocated, oh, I have two working ones buttons stop start up or start down but there is no third option, what could be the problem how can I configure this curtain?