You definitely need to start here:
That will help you with the basics of porting it over to Hubitat. After that I just took it error by error.