-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Aqara Curtain Motor DTH (in beta) #116
base: master
Are you sure you want to change the base?
Conversation
Changes • changed capability `Switch` to `Door control` • changed `on`/`off` references to `open`/`close` where needed • added "open" and "close" app buttons which can be used in addition to pressing on the main tile (which works as a toggle) • added an 8 second countdown timer to update `opening` / `closing` status to `open` / `closed`, respectively (because a attribute report message that the motor has finished opening / closing hasn't been confirmed) • added `installed()`, `configure()`, and `updated()` routines to make sure health check interval is set either when the device is paired or preferences are set. These routines can be expanded later if anything else needs to be set up at the time of pairing or when preferences are saved. • added user-selectable preferences for "Info" and Debug message logging, along with `displayDebugLog()` and `displayInfoLog()` routines. • renamed `lastCheckin` custom event sent on every received message to `lastCheckinCoRE`, which now stores an Epoch Date/Time stamp that can be used in WebCoRE • renamed `parseCustomMessage` to `parseOpenCloseReport` • removed any code related to battery voltage / percentage • updated deprecated zigbee command code to currently accepted ST zigbee function calls • added lots of hopefully helpful comment lines • various reformatting and more logical reordering of function calls Sources for conversion to Door Control capability: • http://docs.smartthings.com/en/latest/capabilities-reference.html#door-control • https://community.smartthings.com/t/door-control-capability-command/8495 • https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/zwave-garage-door-opener.src/zwave-garage-door-opener.groovy
I have updated the DTH to what should hopefully be a fully working beta. The most important change was going from using capability Also, the preference settings now include toggles for Change List Sources for conversion to Door Control capability: |
Changes • (Hopefully) fixed info log message output of specific bytes of interest in any read attribute messages from Cluster `000D` / Attribute ID `0055` • Modified `parseReportAttributeMessage()` to handle motor finished opening/closing messages • Removed some unnecessary log output messages • Added traps in `open()` and `close()` to ignore redundant open/close requests • Changed automatic countdown to call `motorfinished()` routine to 15 seconds • Added trap in `motorfinished()` to prevent redundant `door open` or `door closed` events • Fixed log output in `refresh()` to use `displayInfoLog()` • Renamed `motorFinished()` to `motorFinishedCountdown()` • Added more helpful comments in the code
It turns out someone has finished a working SmartThings device handler for the curtain motor. I will leave this Pull Request open because I've asked the author if his code can be added to the repository here, and I've already seen a few ways that it could possibly be improved. |
I am starting work on a DTH for the Aqara Curtain Motor.