Libraries - kkossev/Hubitat GitHub Wiki
This is a list of Groovy libraries that I use in most of my new drivers. These libraries are work-in-progress, so at the current stage I do not recommend to be used as library files by other HE community developers, as there are often breaking changes.
In the published drivers, the used libraries code is included explicitly in the single driver code, thus ensuring that if it works on my hub, will work on the other users hubs as well .. :)
There are two typical custom driver compositions:
- customDriver code that includes commonLib and specific clusters libraries - used for single device drivers. The device-specific Zigbee messages are handled in the custom cluster handlers, which are defined in the custom driver code.
- customDriver code that includes commonLib + deviceProfileLib and specific clusters libraries - used for multi-profile device drivers. The device-specific Zigbee messages are handled in the deviceProfileLib, as defined in the DeviceProfileV3 static map.
commonLib.groovy
Every custom driver must obligatorily include the commonLib. It defines resources used by all devices, handles the standard ZCL messages, and performs basic Tuya 0xEF00 cluster processing.