Zemismart Blind motor - configuring in Local Tuya

I got mine working (Zimismart M2805EGB Shows as a CW2GT V2 in Tuya IoT) with the settings.
ID:1 (stop)
Command set: open_close_stop
Positioning Mode: Position
Current Position: (LEAVE BLANK)
Set Position: 2 (Value 100)
Invert 0-100 Position: YES

With these settings the blind will open, stop and close with the buttons.
It will report the current position with the slider.
Setting a position with the slider will move the blind to the chosen position.

Using Steve61’s settings
“Point 7. The next two seem the most important in terms of what the blind will do. If you selected “Positioning Mode”, it asks for “Current Position” I selected “1 (value: close)””

The slider would only report the current position and could not set a position.

It’s interesting - it seems a bit hit and miss at times.

I find I can use a slider to set position, but the reporting is intermittent. I will quite often have a blind showing as open when it is closed…. But it comes and goes.

I experience the same issue, I find opening it completely then switching off the wireless module helps reset its position when it’s lost or out of sync.

I purchased a zemismart Zemismart Tuya WiFi Roller Shade Driver DIY Blind Driver, model M515EGWT V2

I followed 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. As I understand it, for this particular model there are DP_IDs for Function (which I assume we can issue a “call service” for) and Status (which I assume are read-only attributes). To summarise:

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

DP 1 and 2 seem to give me what I need – ability to open, close and a percentage between. Looks simple, and I did get it mostly working early on, but tried to make an small improvement.

The HA and localtuya documentation is technical, by developers for developers, so no use to anyone who hasn’t already got it figured out. I found several forums posts which give the DP numbers they used for their particular model but without any mention of what those DP_IDs are for … and so no help to someone with a different model :frowning:

I have spent over three days trying to get my head around this … I started a document of my steps, but it’s currently 6 pages long, mostly core error logs. And then I discovered this thread, where people seem to have figured it out.

I have uninstalled and reinstalled the localTuya integration several times. Now it seems that whatever I do generates different errors on the HA Core log, and I’m almost at the point of wiping the whole HomeAssistant, and starting again on a new card.

But first…

  1. Are any of you getting error in the HA core log ? Is this normal for localTuya ?

  2. Has anyone else got Zemismart model M515EGWT V2 working, and would share your configuration ?

Thanks for listening to my moaning :frowning:

Hi Don,

The second post on this topic is from me with my set-up for a V2. So of the ID points are incomprehensible to me - the names mean nothing, although some recent updates to the Tuya IOT website seem to have thrown up a little more. I suspect the issue is the engineers are developing in Mandarin and the English translations are a bit sketchy.

You might be best deleting Tuya Local in HA and reinstalling - and possibly even deleting the blind from the Tuya app and IOT website, but if they work with the app (ie Tuya cloud), it suggests it is just the Tuya Local configuration.

Just make sure it is set up and working to your satisfaction in the Tuya app first. Then close that app before you setup the TuyaLocal integration in HA (that’s one of the instructions in the TuyaLocal GitHub)

All I can suggest is “blindly” follow my set-up (2nd post) and see. I still find it can be a bit flakey (reporting of position in HA is a bit hit & miss)

Our internet is down at present (flooding nearby) Once it’s back up, I’ll post a screen shot.

Hi Steve, … As an exercise I started with your initial post, added your updates and a little of my own research … and the localTuya integration’s configuration has changed since your first post. This tutorial is now a 3-page document :wink:

You mentioned at the time that you had no idea what the DP_ids represented, but with the details from Tuya website the important ones now seem mostly explained.

  • The biggest difference is at step 3, where the configuration asks for “Entity type selection” with a drop-down list of what appears to be Home Assistant Entity types.

  • Choosing “cover” and [submit] takes us to the “Add new entity” you described as your step 3.

  • At the end of your sequence, the localTuya integration loops us back to “Entity type selection” to create another Home Assistant Entity - such as a number for the percentage closed value.

  • When finished adding Home Assistant Entities, we are asked which Area to place the device in.

… And this is part of the reason the HA developers provide only Technical documentation - user docs need to be much longer and more detailed, and updated much more often !

The good news is that … new day, remove localTuya and start again … and this time no errors in my HA Core log, and it even works (Ok, mostly works). These are my settings (which I have previously tried but given errors at least twice before).

blind_LR_percent

Thanks also for your suggestion of the Blind Card for HACS which works (where the slider in official device and lovelace cards dont). I even managed to link my blind into node-RED and Rhasspy in one day !!

What part of Aus are you in ? I hope you aren’t badly affected by the flooding.

We are near the flooded regions in Nth NSW - but not flooded ourselves. The floods took out power for a day and NBN for a week (took out power to critical facilities).

I’m glad you got them up and running. It would still be nice to have a better description of what the numbers represent. For example the “2” in your initial configuration. You can work some out if you have the blind at say the 30% open mark when you first link it to Tuya. The value will say 30, so you know that is reporting the position.

With a smart switch, it is trial and error to work out which is current, power consumption, voltage etc. In the Grid Connect Smart Switch (little white or black square) from Bunnings, it works out at 18, 19 and 20 respectively.

Apologies this may be a silly question, just setting up the blind myself and I have zigbee ones. “Host” would be the IP address of the Zigbee gateway. Is this a correct assumption. My integration has not populated anything.

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.