I'm playing around with a Zigbee door lock, trying a couple of different drivers to see what happens, but I'm lost on what I suspect is blatantly obvious. Nonetheless, it has me confused.
Can anyone explain to me what all the different code segments are for?
Do you mean the commands with "code" in their name? Most are for adding or removing codes or related to that functionality. "Get Lock Codes" and "Set Code Length" are of the latter type. The first fetches code positions and codes from the lock and stores it in the lock codes attribute under "Current States" (that way, apps can use this data, which will normally include a usable name if you added the code from the hub, e.g., to see who unlocked the door). The second tells the driver what code length your lock supports (again so apps can work better with the lock).
But if your lock isn't using standard clusters, and a Tuya device very well may not, you'll probably need a custom driver to make them actually work.