-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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]: AliExpress Roller Blind Cover (Tuya, Zigbee) C-Type (3 Button) _TZE200_cpbo62rn #17436
Comments
I just received these and I'm just starting to play around with getting them working. With any luck, the dps 103, 104, 105 are the limit settings |
I added tz.tuya_data_point_test to the toZigbee section of my custom file, reloaded, and was able to successfully issue commands such as "bool,103,0" and "bool,105,0" which I would have expected to clear the limits as suggested by @nilvanis. But pressing the up or down buttons on the physical device only spins the motor for two seconds, suggesting they were not cleared? |
Any luck with the resets? I fight against the same boss. |
I went and grabbed a gateway from AliExpress and it finally turned up. The DPs according to Tuya are (I've added data where I can see it). 1 = Control (open,close,stop) Will need to spend some time working this out, but in the meantime attacking 102 and maybe 107 should yield some results |
I also received a Tuya gateway/hub this week and picked up a CC2351 USB device which I flashed to sniff the Zigbee traffic via Wireshark. After setting the device up with the Tuya gateway/hub and Smart Life app. and capturing the packets, I re-paired it with w/Z2M and using the dev. console was able to replicate the app. setup procedure. NOTE: Because my motor is mounted on the left side of my blind, everything is reverse what the app. states, so when the app. says to fully close the blind before starting, I fully open. Position the blind in the starting position manually, with the motor disconnected, then connect the motor and issue in this sequence: RESET LIMITS, START STUDY, wait until the blind is as open/closed as you like, STOP STUDY Dev. Console Values: Cluster: 0xef00 RESET LIMITS
{
"dpValues": [{
"dp": 107,
"datatype": 2,
"data": {
"data":[0],
"type":"Buffer"
}
}],
"seq":1
}
START STUDY (Limit Setting)
{
"dpValues": [{
"dp": 102,
"datatype": 2,
"data": {
"data":[0],
"type":"Buffer"
}
}],
"seq":1
}
STOP STUDY (Limit Setting)
{
"dpValues": [{
"dp": 102,
"datatype": 2,
"data": {
"data":[1],
"type":"Buffer"
}
}],
"seq":1
}
OPEN
{
"dpValues": [{
"dp": 1,
"datatype": 2,
"data": {
"data":[0],
"type":"Buffer"
}
}],
"seq":1
}
STOP
{
"dpValues": [{
"dp": 1,
"datatype": 2,
"data": {
"data":[1],
"type":"Buffer"
}
}],
"seq":1
}
CLOSE
{
"dpValues": [{
"dp": 1,
"datatype": 2,
"data": {
"data":[2],
"type":"Buffer"
}
}],
"seq":1
} |
@wraeuk thanks man! It really works. I attach custom converter:
|
I've created a pull request to add support for this device globally: |
motor_direction is reversed. When the motor is installed on the left side of the blind it needs to be set to motor_direction = "right" set_upper_limit is also reversed. I need to click "stop" to start the process and "start" when it reaches the open position (or rather a split second before) @piwko28 This was the cause of all the issues and confusion with my use of this device & the custom converter above. |
I just got one of those devices today and can't figure out how to teach it the proper open and close position. @Andrew-Joakimsen Would you be able to share the steps if you got yours working? |
@piwko28 Thank you for the code! I do some minor changes which it fix some bugs 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 reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const definition = {
fingerprint: [{ modelID: 'TS0601', manufacturerName: '_TZE200_cpbo62rn' },],
model: 'LY-108',
vendor: 'TuYa',
description: 'Cover',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
configure: tuya.configureMagicPacket,
exposes: [
exposes.text('work_state', ea.STATE),
e.cover_position().setAccess('position', ea.STATE_SET),
e.battery(),
exposes.enum('opening_mode', ea.STATE_SET, ['tilt', 'lift']).withDescription('Opening mode'),
exposes.enum('motor_direction', ea.STATE_SET, ['left', 'right']).withDescription('Motor side'),
exposes.enum('set_upper_limit', ea.STATE_SET, ['start', 'stop']).withDescription('Learning'),
exposes.enum('factory_reset', ea.STATE_SET, ['SET']).withDescription('Remove limits'),
],
whiteLabel: [
tuya.whitelabel('Tuya', 'LY-108', 'Cover', ['_TZE200_cpbo62rn']),
],
meta: {
tuyaDatapoints: [
[1, 'state', tuya.valueConverterBasic.lookup({'CLOSE': tuya.enum(0), 'STOP': tuya.enum(1), 'OPEN': tuya.enum(2)})],
[2, 'position', tuya.valueConverter.coverPosition],
[3, 'position', tuya.valueConverter.raw],
[4, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
[7, 'work_state', tuya.valueConverterBasic.lookup({'standby': tuya.enum(0), 'success': tuya.enum(1), 'ready': tuya.enum(2)})],
[13, 'battery', tuya.valueConverter.raw],
[101, 'motor_direction', tuya.valueConverterBasic.lookup({'left': tuya.enum(0), 'right': tuya.enum(1)})],
[102, 'set_upper_limit', tuya.valueConverterBasic.lookup({'start': tuya.enum(0), 'stop': tuya.enum(1)})],
[107, 'factory_reset', tuya.valueConverter.setLimit],
],
},
};
module.exports = definition; Basically, I change
The step to train:
|
I still can't get it to work despite the instructions above. Are they not the same? They seem to be. Edit: I got this to work using the commands that were posted above I think the open/close state is switched like @khoinguyen said since when I open it, the button to close becomes grayed out and vice versa. |
For me everything is opposite
To get it working correctly I set motor direction: left (when the motor is on the right side of the window)
Then I click set_upper_limit = stop to start the limit process. If it is working correctly you start from closed position, and it should begin to open. Right before it reaches your desired open point I click on set_upper_limit = start to end the procedure.
From: Mateusz Drab ***@***.***>
Sent: Thursday, June 29, 2023 7:52 AM
To: Koenkk/zigbee2mqtt ***@***.***>
Cc: Andrew Joakimsen ***@***.***>; Mention ***@***.***>
Subject: Re: [Koenkk/zigbee2mqtt] [New device support]: AliExpress Roller Blind Cover (Tuya, Zigbee) C-Type (3 Button) _TZE200_cpbo62rn (Issue #17436)
I still can't get it to work despite the instructions above.
I've been reading comments about this item <https://www.aliexpress.com/item/1005002954586484.html?spm=a2g0o.order_list.order_list_main.34.25771802eEeu0j> and users say that they needed to calibrate top upper and lower position, but I don't see that option. The unit I have is this one <https://www.aliexpress.com/item/1005005574510278.html?spm=a2g0o.order_list.order_list_main.17.42d718024kPAdt>
Are they not the same? They seem to be.
—
Reply to this email directly, view it on GitHub <#17436 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABVLMJMQ7DXWGKSHO7JM2IDXNVT7LANCNFSM6AAAAAAXITSY5I> .
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I couldn't get it to work with the UI buttons, I tried so many times; however, with the dev console I got it working first time... Well, I don't mind a flimsy learning process as long as the states reflect properly (which currently do not). I think this will be fixed though by @khoinguyen |
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 |
Any chance we can merge the changes to resolve the everything is reversed issue? |
Can anyone please advise who to increase the blind upper valve? I can get it to reset the upperlimit! |
Thank you for posting the code, searched for hours before finding this |
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 |
I think this is still unresolved |
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 |
Any chance to get this looked at? |
This device should be supported in z2m 1.33.1 ( |
My issue is with the fact that states are inverted and so weird things happen when you control it via home assistant. I think it is something to do with opened and closed state being mixed up. I had no luck calibrating with z2m provided controls and has to use the manual ZigBee commands provided above |
Have you tried to set motor direction inverted? To get it working correctly I set motor direction: left when the motor is on the right side of the window.
|
@mateuszdrab inverted the states: Could you check if the issue is fixed with the following external converter: https://gist.github.com/Koenkk/8ab33577e8839581f91889c20dc1080a
external_converters:
- ext_converter.js
|
Just tried it. For me, it seems to make things worse. Blind is open when it says it is closed. |
|
I'm not sure now if the external converer does anything. I recorded the interaction on the screen with the converter added and without it. without.ec.mp4with.ec.mp4 |
|
Thank you Koen There was a little typo in your gist which prevented Z2M from starting so I fixed it. So... with the code you provided, the percentages were inversed and that was a good step forward; however, it was still saying closed when open and vice versa so I reversed those enums and it now works fine. Right is closed, bar moves nicely to the left and percentage of opening increases until it goes to 100% where it says open. My code is below:
With that said, for some reason the device description does not say CUSTOM, it's empty - but it definitely works. Recording.2023-10-19.123942.mp4P.S: regarding the battery, it's always been saying 100% and I've had it for a few months now. I don't believe it - how can we check if this is an accurate reading? I have a weird feeling this is not reporting the battery correctly because I have 3 of them and they all say 100%. |
@mateuszdrab great! Integrated the changes 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)
100 is the value reported by the device, so I expect it to be correct. But to confirm someone has to check if datapoint 13 is indeed the battery one (https://www.zigbee2mqtt.io/advanced/support-new-devices/03_find_tuya_data_points.html) |
Awesome, thanks for that. I hope that it makes it better for other users and that I wasn't some edge case with it not working right. Regarding the battery... I might have to look at it but I don't have the tuya gateway. I guess the right way to trial and error this would be to get all the data from the device daily and compare if anything changes over time 🤣 |
Hey @Koenkk One of my blind motor's battery recently died - the battery state in Z2M kept indicating 100% so I think the source of this attribute is not right. Can you help me investigate it so we can sort it out? Thanks! |
@mateuszdrab I guess we are using the wrong data point or the firmware is bugged
|
Ouch, I don't have a Tuya hub... |
For any non-mapped datapoints, you will see |
Hey @Koenkk I've just checked and can see the changes are working fine on stable version of Z2M. I've enabled debug mode logging of the zigbee herdsman and I'm parsing the logs in Grafana/Loki to get a better understanding of how the different values of the unrecognized datapoints will change over time. Looks very simple at the moment, let's give it a few days. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days |
Link
https://www.aliexpress.com/item/1005002954586484.html?spm=a2g0o.order_list.order_list_main.34.25771802eEeu0j
Database entry
{"id":2,"type":"EndDevice","ieeeAddr":"0x187a3efffe01db9d","nwkAddr":27572,"manufId":4098,"manufName":"_TZE200_cpbo62rn","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":{"65534":0,"modelId":"TS0601","manufacturerName":"_TZE200_cpbo62rn","powerSource":3,"zclVersion":3,"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":-708457359},"lastSeen":1682264364488,"defaultSendRequestWhen":"immediate"}#
Comments
I've managed to get the STATE (open/close/stop) working, and am reading a number of other DPs but can't determine what they are.
My biggest issue is that I can't figure out a way to calibrate / set the lower and upper limits / set a run time so open/close only moves the motor for 2 seconds.
External converter
Supported color modes
No response
Color temperature range
No response
The text was updated successfully, but these errors were encountered: