-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New device support]: Zemismart Curtain Robot motor ZM85EL-2Z #11251
Comments
Hi! Here's the converter file I have so far: const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const definition = {
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_cf1sl3tj'}],
model: 'ZM85EL-2Z',
vendor: 'Zemismart',
description: 'Zigbee/RF curtain motor',
fromZigbee: [fz.tuya_cover, fz.ignore_basic_report],
toZigbee: [tz.tuya_cover_control],
exposes: [
exposes.cover(),
],
};
module.exports = definition; I started from the same I can confirm that with this converter the device properly functions in Home Assistant with ⬆⏹⬇ buttons, which is enough for me to do some basic automation. 🎉 Though I do still observe the warning about DP#13. Things we can also hopefully find:
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Still valid, haven't been able to get on this so far, but the converter I've provided so far has been working with no issues. |
Thanks for the work on this. |
It is working, hence there are some errors on the logs, which i turned to info only. Thanks for the work on this. |
This was the first extension I've installed in zigbee2mqtt. It was kinda tricky for me to figure out where the converters go but I got it working! I was able to get
Every time I send a command I'm seeing errors that look like |
I would love to be able to figure out how to configure the cover position limits via MQTT. Which Datapoint and what values they are. Does anyone have this device and a Zemismart hub, setup with Tuya? |
Current curtain position: code 3 @nchieng Will this info suffice? |
@Oliviakrkk oh, so 13 is the battery! That's very helpful to know. |
I have issues with finding more info...In the request response there is a field:
And when it comes to battery it just shows the value...
Is that what we need? |
I also found some response called status:
This may be usefull. But still no field |
Most likely because the interface you're dealing with converts these types to more "semantically pure" (as in "without implementation details") values under the hood, without disclosing what came in originally, and zigbee2mqtt needs to do the same. There's this bit in the original message that I observed with my device as well: {"dp":13,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,95]}} Which likely means DP#13 is of type |
To get this info from Toya I would need to sniff the zigbee network, right? And check payload in the wireshark... |
And I only just now opened the guide above to realize this is Tuya's own interface; it doing this kind of conversion on its end makes sense. Yeah, I'm new to this. 😅 @Oliviakrkk not necessarily Wireshark, zigbee2mqtt has some built-in facilities. This would seem to be the relevant guide: https://www.zigbee2mqtt.io/advanced/support-new-devices/02_support_new_tuya_devices.html#_4-deciphering-the-data-points I'll try to allocate some time this or next week to wrap my head around introducing mappings for more DPs, but totally wouldn't mind anyone beating me to it 😉 |
@christiangenco I believe they were copied from another device which uses a different set of data points; but enough of it worked (motor controls, the main part) to seem like it fits overall, even if some parts don't. |
Hey guys, can you share the external converter that shows up the battery percentage? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
Alright, alright! Not stale, just very slow! Cheesus 😅 @rodrigogbs I went in expecting an easy win, but left with a slightly better understanding how the project works and yet another reminder to check the versions, as I was often referencing the source code of the
Here's what the converter looks like now: const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const fzDeviceSpecific = {
cluster: 'manuSpecificTuya',
type: ['commandSetDataResponse', 'commandGetData'],
convert: (model, msg, publish, options, meta) => {
const dp = msg.data.dp;
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
switch (dp) {
case tuya.dataPoints.state: // Confirm opening/closing/stopping (triggered from Zigbee)
case tuya.dataPoints.coverPosition: // Started moving to position (triggered from Zigbee)
case tuya.dataPoints.coverChange: // Started moving (triggered by transmitter or pulling on curtain)
case tuya.dataPoints.coverArrived: { // Arrived at position
const running = dp === tuya.dataPoints.coverArrived ? false : true;
return {running}; // Position does not seem to be working, so respective code removed
}
case tuya.dataPoints.config: // Returned by configuration set; ignore
break;
case 13: // Battery; apparently only sent when triggered via hardware remote?
return {battery: value};
default: // Unknown code
meta.logger.warn(`ZM85EL-2Z: Unhandled DP #${dp}: ${JSON.stringify(msg.data)}`);
}
},
}
const definition = {
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_cf1sl3tj'}],
model: 'ZM85EL-2Z',
vendor: 'Zemismart',
description: 'Zigbee/RF curtain motor',
fromZigbee: [fzDeviceSpecific],
toZigbee: [tz.tuya_cover_control],
exposes: [
exposes.cover(),
exposes.presets.battery(),
],
meta: {
configureKey: 1,
battery: {dontDividePercentage: true}
},
};
module.exports = definition; |
Tks @D-side, amazing job! I tried and it is working pretty well, despite the fact that the battery percentage is still not appearing... :( The status behavior is working very well !! About the position value (you're right, to have this is necessary to set limits with a remote control), but in this version even with limits set it is not appearing. This information is important to know if the cover is totally or partially opened, I use this in my automations, is it possible to have back? |
@rodrigogbs did the position work in my initial version above? If so, returning some of the code I removed after copying As I mentioned, the battery percentage right now only shows up after pushing a button on the remote, e. g. ⏹ stop. I guess to get it to show up more reliably I have to send a certain command to it during initialization, which right now is slightly beyond my level of familiarity with this codebase. |
@D-side yes, the position was working in the initial version, I will try to return the partial code... About the battery, even pushing some remote buttons, it didn't work...at least for me... |
Thank you for this. I've got it to work thanks to you. In the beginning it did not work, because my Manufacturer Name is: _TZE200_nw1r9hp6 Which is different than your name. When I changed it to the Manufacturer name that I found in database.db it worked immediately. Only the battery level is n/a for some reason. I will investigate this further to see if I can find a solution for this. Is it possible to add this curtain robot to the official Z2M supported devices? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days |
@DariBer question for you, does the ZM25RX-0.8/30 have soft stop functionality? My existing non-zigbee motors reduce speed slightly when it comes close to a stop. |
I haven't noticed anything like that on non of my motor rollers. It use one speed and then just stop. So no reduced speed. |
Just stumbled upon this tonight. I've fiddled with this a bit with some inspiration from the built-in converters - I've gotten DP#13 working as the battery percentage. It seems like this isn't calculated very accurately or at least mine seems to vary quite wildly (as low as 0% sometimes). Maybe we can average this value out? Position and state seem to work nicely as well now.
|
Hey, do you think this will be integrated in the next version? I tried to set up an external converter, but even though it seems quite straight forward I got a bunch of errors and Z2M was not starting. I am running Z2M on a seperate host from HA. Thanks! |
@Koenkk @jumpinf00l is it possible to have this converter integrated in the next version please? |
in #11251 (comment) converter code must be line
because it used in code. |
Oops you're right @Hamper, I'd missed that line when copying+pasting. @gbeleris try this:
With that in mind, as @Oliviakrkk pointed out there are several more potential cases which this converter could handle
I'm just not entirely sure how to convert these without sinking a whole bunch of time into it unfortunately |
I've been trying to get my TZE200_pw7mji0l (0x84ba20fffe3a2afb) connected for days without success. Zigbee2MQTT is running on a separate physical machine (Raspberry Pi) than Hass, currently have over 20 devices connected and have some experience with pairing so it should be straight forward but isn't for some reason. Constantly seeing the same Unhandled DP #13 error, but more problematic I cannot get the device to appear in Home Assistant (and I do not know why). Could somebody help a dummy by providing the actual list of steps?
Kinda stuck not sure what to check next. |
@simonwood0609 here's what I did:
From @Oliviakrkk's post, we can see that DP #13 is the battery level but as I mentioned it's reported every time the blind does something and can vary quite wildly which I assume is due to the draw on the battery. The code above interprets DP #13 as the battery level which should reduce the number of 'unhandled' messages, though some do still appear (there are a few in @Oliviakrkk's post) such as when setting the top/bottom positions which would also be nice to be able to set over Zigbee rather than the RF remote. I'd prefer to poll the blind for battery rather than grab it as the blind is doing something, but honestly haven't touched this since my last post |
@jumpinf00l thanks so much for the ELI5 - very helpful! I ended up messing up my instance of Zigbee2MQTT somehow (probably trying to edit far too many js files) so I rmdir and started from scratch github clone. This time the blind paired instantly - I didn't even need to create the external_converter which is strange. I'm glad I can now control the blind via Zigbee2MQTT. Unfortunately no new devices appearing in Home Assistant (in the MQTT: Mosquitto broker device/entity lists). I have "Enable newly added entities." checked, and I can't find the device anywhere to delete it (in hope it'll re-create properly). On a side note I just installed my first Shelly devices, dimmers (WiFi) and the setup process was smooth and it's been a dream to use so far, very pleased. EDIT: Fixed! It was either patience or restarting the Mosquitto Broker integration in Home Assistant. |
@simonwood0609 glad to see you got it sorted. The good old ‘turn it off and on again’ saves the day |
I always assumed that Z2M polled battery devices every so often, but I guess the challenge here is that the battery data needs to be discarded when the blind is in motion? |
Has anyone run into intermittent "connection" issues with this external converter? It never actually leaves the mesh or reports as offline, it just stops responding to commands though. It seems to work for a bit, then you give it some time and they stop responding to commands. After I tried “waking” them up by reading something simple like time from the dev console, they start responding again, but again after some time they stop again. But this entire time, they still have a recent "Last Seen" value, which is the oddest part. I am wondering if it is something as simple as I need to setup a reporting method to keep it alive, but as I have never messed with external converters I do not know. Their LQI's also hover around 100 which doesn't seem great, but also not terrible. |
Has anyone got the instructions for this. Can't find any online? |
Sure thing, sorry the original got a bit crumpled |
Legend! I can finally re add it lol |
Looks like there is official support for ZM85EL-2Z in 1.31.0 but not the _TZE200_nw1r9hp6 variant. Can this be added? |
@ianfromnyc added! Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
Battery status is not working for _TZE200_nw1r9hp6 model. It is still showing the old battery status of 55% from the time when I used an external converter, and is not updating to the correct status. I used an external converter which I tweaked from another device which properly showed the battery status.
|
I'm experiencing an issue with the 'Invert Cover' setting for a Zigbee curtain controller (Zemismart model ZM85EL-2Z (Zigbee Model - TS0601. Zigbee Manufacturer- _TZE200_cf1sl3tj)). Despite setting invert_cover to true, the open and close positions of the cover are not being inverted as expected. |
Link
https://www.zemismart.com/products/zm85el-2z
Database entry
{ "id": 8, "type": "EndDevice", "ieeeAddr": "0x94deb8fffe25058b", "nwkAddr": 16394, "manufId": 4098, "manufName": "_TZE200_cf1sl3tj", "powerSource": "Battery", "modelId": "TS0601", "epList": [1], "endpoints": { "1": { "profId": 260, "epId": 1, "devId": 81, "inClusterList": [0, 4, 5, 61184], "outClusterList": [25, 10], "clusters": { "genBasic": { "attributes": { "modelId": "TS0601", "manufacturerName": "_TZE200_cf1sl3tj", "powerSource": 3, "zclVersion": 3, "appVersion": 72, "stackVersion": 0, "hwVersion": 1, "dateCode": "" } } }, "binds": [{ "cluster": 0, "type": "endpoint", "deviceIeeeAddress": "0x00124b0022812c80", "endpointID": 1 }, { "cluster": 258, "type": "endpoint", "deviceIeeeAddress": "0x00124b0022812c80", "endpointID": 1 }], "configuredReportings": [], "meta": {} } }, "appVersion": 72, "stackVersion": 0, "hwVersion": 1, "dateCode": "", "zclVersion": 3, "interviewCompleted": true, "meta": { "configured": -1267545107 }, "lastSeen": 1644093139243, "defaultSendRequestWhen": "immediate" }
Comments
Hello. Please, help me.
I tried to follow guide, and almost win)
I used Tuya model (TS0601_cover) and I have only one warning:
_TuYa_cover_control: Unhandled DP #13 for TZE200_cf1sl3tj: {"dp":13,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,95]}}
And 1 error:
Error No converter available for 'get' 'position' (0)
External converter
Supported color modes
No response
Color temperature range
No response
The text was updated successfully, but these errors were encountered: