I have updated the Aqara Curtain Motor DTH to what should hopefully be a fully working beta.
The updated DTH code can be copied from here, and I’ll be adding comments / changelists on the GitHub Pull Request here.
The most important change was going from using capability switch
to Door control
, which seems to be the most appropriate device class to assign to a curtain motor device.
Also, the preference settings now include toggles for info
and debug
message output to Live Logging, and the info
messages will include more specific information regarding relevant attribute report messages received from the motor that still need interpreting. The default is for only info
logging to be output, which is because that will provide the most useful feedback. debug
logging can be used as a fallback to look at whats going on in far more detail.
Change List (click arrow to reveal)
• 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
- Door Control Capability Command
- Z-Wave Garage Door Opener DTH on GitHub/SmartThingsPublic
Since I don’t have the curtain motor, I had to assign the DTH to one of my Zigbee bulbs (which use the same Zigbee on/off commands.) Basic functionality seems to be working great, but I was unable to test the log output for any read attribute messages from cluser 000D / attribute ID 0055. So please let me know if that works for you or not.
On my Mac I use the Chrome browser when I need to keep a Live Logging window open, because Safari times out / logs out after a few hours.