I want to add a new lock to HA using zigbee2mqtt but I can not write function to get state or control like fromZigbee.js file. How can I do step by step to write code to support my new device. This is my lock inf
{ "_id": 4, "type": "EndDevice", "ieeeAddr": "0x000d6ffffe81af24", "nwkAddr": 27311, "manufId": 0, "manufName": "_TYST12_b52wvotf", "powerSource": "Battery", "modelId": "TY0A01", "epList": [ 1 ], "status": "online", "joinTime": 1563873271, "endpoints": { "1": { "device": { "$ref": "$" }, "profId": 260, "epId": 1, "devId": 10, "inClusterList": [ 0, 3, 32, 257, 61184 ], "outClusterList": [ 3, 25 ], "clusters": { "61184": { "dir": { "cid": "61184", "sid": "dir", "value": 1 }, "attrs": { "0": 3, "1": 64, "2": 64, "3": 0, "4": "_TYST12_b52wvotf", "5": "TY0A01", "6": "20181115", "7": 3, "65533": 1, "cid": "61184", "sid": "attrs" } }, "zapp": null, "genBasic": { "dir": { "cid": "genBasic", "sid": "dir", "value": 1 }, "attrs": { "65533": 1, "cid": "genBasic", "sid": "attrs", "zclVersion": 3, "appVersion": 64, "stackVersion": 64, "hwVersion": 0, "manufacturerName": "_TYST12_b52wvotf", "modelId": "TY0A01", "dateCode": "20181115", "powerSource": 3 } }, "genIdentify": { "dir": { "cid": "genIdentify", "sid": "dir", "value": 3 }, "attrs": { "65533": 1, "cid": "genIdentify", "sid": "attrs", "identifyTime": 0 } }, "genOta": { "dir": { "cid": "genOta", "sid": "dir", "value": 2 }, "attrs": { "cid": "genOta", "sid": "attrs" } }, "genPollCtrl": { "dir": { "cid": "genPollCtrl", "sid": "dir", "value": 1 }, "attrs": { "65533": 1, "cid": "genPollCtrl", "sid": "attrs", "checkinInterval": 14400, "longPollInterval": 20, "shortPollInterval": 2, "fastPollTimeout": 40 } }, "closuresDoorLock": { "dir": { "cid": "closuresDoorLock", "sid": "dir", "value": 1 }, "attrs": { "1": 0, "65533": 1, "cid": "closuresDoorLock", "sid": "attrs", "lockState": 0, "actuatorEnabled": 0 } } }, "onAfDataConfirm": null, "onAfReflectError": null, "onAfIncomingMsg": null, "onAfIncomingMsgExt": null, "onZclFoundation": null, "onZclFunctional": null } } }