-
-
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
Support track direction: Xiaomi Aqara Smart Curtain Motor ZNCLDJ11LM #1639
Comments
I figured out how to get device specific configuration from yaml in fromZigbee.js. |
What exactly do you want to add to toZigbee.js, also what is this "reverse mode"? |
Curtains can open to the left or to the right. So open state is different. |
In toZigbee.js ZNCLDJ11LM_control method I would like to get device specific setting called "reverse" or "direction". In case of "positive" direction: const lookup = {
'open': 100,
'close': 0,
'on': 100,
'off': 0,
}; in case of "reverse" direction: const lookup = {
'open': 0,
'close': 100,
'on': 0,
'off': 100,
}; Makes sense? |
I see, I think |
Let's use |
You can add an extra parameter to the |
@yozik04 just sniff packet with original hub when you change the direction, and then add to toZigbee code i remember it send a command and store in the motor memory, but i sniff it long time ago and then not save the packet. |
I do not have original hub =( |
@Koenkk I see you have added |
@Koenkk I think you have mistake there: zigbee2mqtt/lib/extension/devicePublish.js Line 177 in 7cabe3a
zigbee2mqtt/lib/extension/devicePublish.js Line 211 in 7cabe3a
In second |
@yozik04 thanks, fixed! |
@dzungpv would you mind sniffing setting the track direction? |
@Koenkk i sniff the packet: Some thing like this need to test with your side @yozik04 , add to toZigbee.js, because i have much device, must run xiaomi hub, not test with zigbee2mqtt. When i capture datatype is string: 0x42, but string not write raw hex if i remember correctly with z2m, it will convert to ASCII code, so let try uint16 0x21
|
Trying: |
Probably |
0x0100000000070007 is 8 byte |
@yozik04 do your last commit work? |
It successfully sends. But no change to the behaviour.
|
@yozik04 As i said from the start, this string write currently not work with z2m, if you use 0x42 then zcl-packet will convert it to ASCII string and not the original. May be we will find other way to write raw data (hexstream) @Koenkk ? |
@yozik04 let try this:
Or
with datatype 0x42 |
@dzungpv first is equal to '\x01\x00\x00\x01\x01\x07\x00\x07' form |
@yozik04 i see the last commit, it work or not? |
Thanks, I've made some necessary modification to zigbee-herdsman in order to support this. First make sure you update to the latest dev. I've created an example changeset on how to write a certain feature: Koenkk/zigbee-herdsman-converters@c2b4b16 (probably this is not the correct payload for reverse, this is just an example) Looking at your screenshots, the only thing you have to change each time is the payload: Koenkk/zigbee-herdsman-converters@c2b4b16#diff-3e0c275bd41af699153bf59d8dda4a2aR752 When for example sniffing the following write request: You click on the Now you can trigger the command by sending to |
Is it possible in |
Can I actually do differently? I want to name the property to mqtt
from these I will generate the right payload. |
Yes that is possible, change the key to |
Good, thank you for help! Will try to implement and test it this week. |
Tried making the changes manually to devices.js and toZigbee.js. Ended up with the following error. Running on 1.8.0. zigbee2mqtt:error 2019-12-16 23:41:22: Publish 'set' 'reverse' to '0x00158d00042b0ed3' failed: 'TypeError: argument must be a string' Sent payload of {"reverse": ""} to zigbee2mqtt/[FRIENDLY_NAME]/set. I am unsure if I did anything wrong. |
@Koenkk Which package I should update to the latest When setting:
When getting:
Code here: https://github.com/yozik04/zigbee-herdsman-converters/tree/ZNCLDJ11LM_direction |
I managed to make it send. But it does not send Manufacturer code and device responds with 'Unsupported attribute' |
Another problem after update of my docker container to latest-dev I lost all my devices. 😢 |
* Update ZNCLDJ11LM.md Pull: Koenkk/zigbee-herdsman-converters#835 Issue: Koenkk/zigbee2mqtt#1639 * Update ZNCLDJ11LM.md Co-authored-by: Koen Kanters <[email protected]>
* ZNCLDJ11LM ZNCLDJ12LM options Koenkk/zigbee2mqtt#1639 * ZNCLDJ11LM get current position fix * Linter happiness * Linter Co-authored-by: Koen Kanters <[email protected]>
As this is now supported, I assume this can be closed, thank you very much @yozik04 !! |
@Koenkk I updated zigbee-herdsman-converters to the latest version but encountered the following error when I attempt to set reverse_direction to true: zigbee2mqtt:info 2020-01-03 22:47:38: ZNCLDJ11LM setting reverse direction |
@bernardyeo you need to update other components too. @Koenkk Thank you for your great support! |
@yozik04 Thanks I will give it a try. |
* Update ZNCLDJ11LM.md Pull: Koenkk/zigbee-herdsman-converters#835 Issue: Koenkk/zigbee2mqtt#1639 * Update ZNCLDJ11LM.md Co-authored-by: Koen Kanters <[email protected]>
* Update ZNCLDJ11LM.md Pull: Koenkk/zigbee-herdsman-converters#835 Issue: Koenkk/zigbee2mqtt#1639 * Update ZNCLDJ11LM.md Co-authored-by: Koen Kanters <[email protected]>
Not sure if people are still having this issue, but you can reverse direction by resetting the motor. You don't have to do this in the software, allthough that would be a great feature to have off course. |
We have support of Xiaomi Aqara Smart Curtain Motor. But we need a "reverse" mode as well.
I have a problem. I have 3 motors. If all are physically closed, 2 of them reports that they are open and one closed.
How hard it is to implement reverse mode? Should it be done in zigbee2mqtt or in HomeAssistant?
Initial Xiaomi Aqara Smart Curtain Motor support was introduced in #294
The text was updated successfully, but these errors were encountered: