-
Notifications
You must be signed in to change notification settings - Fork 530
Add support for Aqara Wireless Remote Switch H1 (Double Rocker) WRS-R02 #5067
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
Conversation
manup
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some smaller questions in the comments.
The PR description should also mention that the multi-click attribute 0x0125 is configured for "86opcn01" (human readable switch name? ;) as well.
de_web_plugin.cpp
Outdated
| writeAttribute(sensor, 0x01, XIAOMI_CLUSTER_ID, attr, VENDOR_XIAOMI); | ||
|
|
||
| // Activate multiclick mode | ||
| DBG_Printf(DBG_INFO, "Write Aqara switch 0x%016llX multiclick mode attribute 0x0125 = 2\n", sensor->address().ext()); | ||
| deCONZ::ZclAttribute attr2(0x0125, deCONZ::Zcl8BitUint, QLatin1String("multiclick mode"), deCONZ::ZclReadWrite, false); | ||
| attr2.setValue(static_cast<quint64>(2)); | ||
| writeAttribute(sensor, 0x01, XIAOMI_CLUSTER_ID, attr2, VENDOR_XIAOMI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it safe to assume hard coded endpoint 0x01 here for "86opcn01" and "b28ac1", or is the formerly used sensor->fingerPrint().endpoint a better fit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, endpoint 0x01 should be save. I guess I can amend that.
The corresponding switch sensors should have been manually pinned to endpoint 1, so using `sensor->fingerPrint().endpoint` should be fine
Regression from v2.12.2-beta. Due the duplicated JSON key "xiaomiSwitchB1acn01Map", only the last one was properly loaded. Related PR: dresden-elektronik#5067 Issue: dresden-elektronik#5117
Regression from v2.12.2-beta. Due the duplicated JSON key "xiaomiSwitchB1acn01Map", only the last one was properly loaded. Related PR: dresden-elektronik#5067 Issue: dresden-elektronik#5117 Fix typo
See #4842.
This PR also adds writing the multi-click attribute
0x0125for Aqara Opple switches (lumi.remote.b686opcn01, lumi.remote.b486opcn01 and lumi.remote.b286opcn01).