Almost all ST Device Handlers are open source...
And you’re going to need these tips to port the code to Hubitat.