zigpy / zha-device-handlers

ZHA device handlers bridge the functionality gap created when manufacturers deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
Apache License 2.0
719 stars 664 forks source link

[Device Support Request] Smart Lock TY0A01 by _TYST12_snr3p274 #2045

Closed eduardobittencourt closed 1 year ago

eduardobittencourt commented 1 year ago

Describe the solution you'd like I'm trying to use my smart lock from Intelbras in Home Assistant but no entities are found. I tried to create a quirk for this scenario but the weird cluster 0xef00 does not exists on the actual described clusters in zigpy.

Device signature ```yaml { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=0, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000a", "0xef00" ], "out_clusters": [ "0x0019" ] } }, "manufacturer": "_TYST12_snr3p274", "model": "TY0A01", "class": "zigpy.device.Device" } ```
Diagnostic information ```yaml { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.12.8", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "America/Sao_Paulo", "os_name": "Linux", "os_version": "5.15.80", "supervisor": "2022.12.1", "host_os": "Home Assistant OS 9.4", "docker_version": "20.10.19", "chassis": "vm", "run_as_root": true }, "custom_components": { "smartthinq_sensors": { "version": "0.27.1", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "cchardet>=2.1.7" ] }, "hacs": { "version": "1.29.0", "requirements": [ "aiogithubapi>=22.10.1" ] }, "localtuya": { "version": "4.1.1", "requirements": [] } }, "integration_manifest": { "domain": "zha", "name": "Zigbee Home Automation", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows==0.34.5", "pyserial==3.5", "pyserial-asyncio==0.6", "zha-quirks==0.0.89", "zigpy-deconz==0.19.2", "zigpy==0.52.3", "zigpy-xbee==0.16.2", "zigpy-zigate==0.10.3", "zigpy-znp==0.9.2" ], "usb": [ { "vid": "10C4", "pid": "EA60", "description": "*2652*", "known_devices": [ "slae.sh cc2652rb stick" ] }, { "vid": "1A86", "pid": "55D4", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus v2" ] }, { "vid": "10C4", "pid": "EA60", "description": "*sonoff*plus*", "known_devices": [ "sonoff zigbee dongle plus" ] }, { "vid": "10C4", "pid": "EA60", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*tubeszb*", "known_devices": [ "TubesZB Coordinator" ] }, { "vid": "1A86", "pid": "7523", "description": "*zigstar*", "known_devices": [ "ZigStar Coordinators" ] }, { "vid": "1CF1", "pid": "0030", "description": "*conbee*", "known_devices": [ "Conbee II" ] }, { "vid": "10C4", "pid": "8A2A", "description": "*zigbee*", "known_devices": [ "Nortek HUSBZB-1" ] }, { "vid": "0403", "pid": "6015", "description": "*zigate*", "known_devices": [ "ZiGate+" ] }, { "vid": "10C4", "pid": "EA60", "description": "*zigate*", "known_devices": [ "ZiGate" ] }, { "vid": "10C4", "pid": "8B34", "description": "*bv 2010/10*", "known_devices": [ "Bitron Video AV2010/10" ] } ], "codeowners": [ "@dmulcahey", "@adminiuga", "@puddly" ], "zeroconf": [ { "type": "_esphomelib._tcp.local.", "name": "tube*" }, { "type": "_zigate-zigbee-gateway._tcp.local.", "name": "*zigate*" }, { "type": "_zigstar_gw._tcp.local.", "name": "*zigstar*" } ], "dependencies": [ "file_upload" ], "after_dependencies": [ "onboarding", "usb", "zeroconf" ], "iot_class": "local_polling", "loggers": [ "aiosqlite", "bellows", "crccheck", "pure_pcapy3", "zhaquirks", "zigpy", "zigpy_deconz", "zigpy_xbee", "zigpy_zigate", "zigpy_znp" ], "is_built_in": true }, "data": { "ieee": "**REDACTED**", "nwk": 9144, "manufacturer": "_TYST12_snr3p274", "model": "TY0A01", "name": "_TYST12_snr3p274 TY0A01", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 0, "power_source": "Battery or Unknown", "lqi": 128, "rssi": -68, "last_seen": "2022-12-30T14:10:38", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=0, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0x0051", "in_clusters": [ "0x0000", "0x0004", "0x0005", "0x000a", "0xef00" ], "out_clusters": [ "0x0019" ] } } }, "active_coordinator": false, "entities": [], "neighbors": [], "routes": [], "endpoint_names": [ { "name": "SMART_PLUG" } ], "user_given_name": null, "device_reg_id": "650e6edadd21419063a67665c84ce3c8", "area_id": null, "cluster_details": { "1": { "device_type": { "name": "SMART_PLUG", "id": 81 }, "profile_id": 260, "in_clusters": { "0x0000": { "endpoint_attribute": "basic", "attributes": { "0x0001": { "attribute_name": "app_version", "value": 88 }, "0x0004": { "attribute_name": "manufacturer", "value": "_TYST12_snr3p274" }, "0x0005": { "attribute_name": "model", "value": "TY0A01" } }, "unsupported_attributes": {} }, "0x000a": { "endpoint_attribute": "time", "attributes": {}, "unsupported_attributes": {} }, "0x0004": { "endpoint_attribute": "groups", "attributes": {}, "unsupported_attributes": {} }, "0x0005": { "endpoint_attribute": "scenes", "attributes": {}, "unsupported_attributes": {} }, "0xef00": { "endpoint_attribute": null, "attributes": {}, "unsupported_attributes": {} } }, "out_clusters": { "0x0019": { "endpoint_attribute": "ota", "attributes": {}, "unsupported_attributes": {} } } } } } } ```

Additional context

image
My actual Quirk try ``` """Tuya Smart Lock.""" from zigpy.profiles import zha from zigpy.quirks import CustomDevice from zigpy.zcl.clusters.general import Basic, Groups, Scenes, Time, Ota from zhaquirks.const import ( BUTTON_1, COMMAND, DEVICE_TYPE, DOUBLE_PRESS, ENDPOINT_ID, ENDPOINTS, INPUT_CLUSTERS, LONG_PRESS, MODEL, OUTPUT_CLUSTERS, PROFILE_ID, SHORT_PRESS, ) from zhaquirks.tuya import TuyaSmartRemoteOnOffCluster class TuyaSmartLock0A01(CustomDevice): """Tuya Smart Lock.""" signature = { # SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=0, device_version=1, input_clusters=[0, 10, 1, 6], output_clusters=[25])) MODEL: "TY0A01", ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.SMART_PLUG, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, Time.cluster_id, "0xef00" ], OUTPUT_CLUSTERS: [Ota.cluster_id], }, }, } replacement = { ENDPOINTS: { 1: { PROFILE_ID: zha.PROFILE_ID, DEVICE_TYPE: zha.DeviceType.DOOR_LOCK, INPUT_CLUSTERS: [ Basic.cluster_id, Groups.cluster_id, Scenes.cluster_id, Time.cluster_id, "0xef00" ], OUTPUT_CLUSTERS: [Ota.cluster_id], }, }, } # { # "node_descriptor": "NodeDescriptor(logical_type=, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=, mac_capability_flags=, manufacturer_code=0, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", # "endpoints": { # "1": { # "profile_id": 260, # "device_type": "0x0051", # "in_clusters": [ # "0x0000", # "0x0004", # "0x0005", # "0x000a", # "0xef00" # ], # "out_clusters": [ # "0x0019" # ] # } # }, # "manufacturer": "_TYST12_snr3p274", # "model": "TY0A01", # "class": "zigpy.device.Device" # } ```
TheJulianJES commented 1 year ago

You have "0xef00" in quotes in your custom quirk. It should just be 0xef00. However, even if the quirk applies, it won't do anything really.

0xef00 is the custom Tuya cluster, so more support would need to be added for the lock to work.

eduardobittencourt commented 1 year ago

Hey @TheJulianJES thanks for the reply!

Do you think we can figure out what is going on here? Your observation about my quirk was correct, now the quirk is applied when I pair the device. My ideia here is to just try some clusters and see what happens, since I'm not so handy in HA and ZHA.

If I can provide more information, please let me know :)

TheJulianJES commented 1 year ago

I'm not really familiar with Tuya. You can take a look at all current implementations for other Tuya devices here: https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ (also look at __init__.py which contains most custom Tuya clusters)

But as far as I can see, there's no "Tuya lock cluster" which you could just plug in as a replacement. It also looks like Zigbee2MQTT doesn't even have support for any Tuya locks.

eduardobittencourt commented 1 year ago

I don't know if it helps, but I got some information from Developer Tuya IoT Platform.

https://iot.tuya.com/micro-app/cloud/api/v1/project/pid/datapoint/descripiton ```json { "login": true, "result": [ { "schema": { "accessType": "ro", "code": "unlock_fingerprint", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Fingerprint Unlock", "remark": "unlock_fingerprint" }, "functionSet": { "accessType": "ro", "code": "unlock_fingerprint", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Fingerprint Unlock", "remark": "", "mainDP": "unlock_fingerprint" } }, { "schema": { "accessType": "ro", "code": "unlock_password", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Password", "remark": "unlock_password" }, "functionSet": { "accessType": "ro", "code": "unlock_password", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Password", "remark": "", "mainDP": "unlock_password" } }, { "schema": { "accessType": "ro", "code": "unlock_temporary", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Temporary Password", "remark": "unlock_temporary" }, "functionSet": { "accessType": "ro", "code": "unlock_temporary", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Temporary Password", "remark": "", "mainDP": "unlock_temporary" } }, { "schema": { "accessType": "ro", "code": "unlock_dynamic", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Dynamic Password", "remark": "unlock_dynamic" }, "functionSet": { "accessType": "ro", "code": "unlock_dynamic", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Dynamic Password", "remark": "", "mainDP": "unlock_dynamic" } }, { "schema": { "accessType": "ro", "code": "unlock_card", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Card", "remark": "unlock_card" }, "functionSet": { "accessType": "ro", "code": "unlock_card", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Card", "remark": "", "mainDP": "unlock_card" } }, { "schema": { "accessType": "ro", "code": "unlock_key", "valueDesc": "{\"unit\":\"\",\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Mechanical Unlock", "remark": "unlock_key" }, "functionSet": { "accessType": "ro", "code": "unlock_key", "valueDesc": "{\"unit\":\"\",\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Mechanical Unlock", "remark": "", "mainDP": "unlock_key" } }, { "schema": { "accessType": "ro", "code": "open_close", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "Closed", "true": "Opened" }, "name": "Open Or Close", "remark": "open_close" }, "functionSet": { "accessType": "ro", "code": "open_close", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "true": "Opened", "false": "Closed" }, "name": "Open Or Close", "remark": "", "mainDP": "open_close" } }, { "schema": { "accessType": "ro", "code": "alarm_lock", "valueDesc": "{\"range\":[\"wrong_finger\",\"wrong_password\",\"wrong_card\",\"wrong_face\",\"tongue_bad\",\"too_hot\",\"tongue_not_out\",\"pry\",\"key_in\",\"power_off\",\"shock\",\"unclosed_time\",\"low_battery\",\"defense\"]}", "valueType": "Enum", "langDict": { "unclosed_time": "Unclosed too long", "wrong_finger": "Wrong Fingers", "too_hot": "Lock Too Hot", "shock": "Shock", "tongue_not_out": "Tongue Not Out", "power_off": "Power Off", "tongue_bad": "Bad Tongue", "wrong_password": "Wrong Passwords", "wrong_face": "Wrong Face - Incompatible", "defense": "Door Defense", "pry": "Pry Alarm", "low_battery": "Low Battery", "wrong_card": "Wrong Cards", "key_in": "Key in" }, "name": "Alarm", "remark": "alarm_lock" }, "functionSet": { "accessType": "ro", "code": "alarm_lock", "valueDesc": "{\"range\":[\"wrong_finger\",\"wrong_password\",\"wrong_card\",\"wrong_face\",\"tongue_bad\",\"too_hot\",\"tongue_not_out\",\"pry\",\"key_in\",\"power_off\",\"shock\",\"unclosed_time\",\"low_battery\",\"defense\"]}", "valueType": "Enum", "langDict": { "unclosed_time": "Unclosed too long", "wrong_finger": "Wrong Fingers", "too_hot": "Lock Too Hot", "shock": "Shock", "tongue_not_out": "Tongue Not Out", "power_off": "Power Off", "tongue_bad": "Bad Tongue", "wrong_password": "Wrong Passwords", "wrong_face": "Wrong Face - Incompatible", "defense": "Door Defense", "pry": "Pry Alarm", "low_battery": "Low Battery", "wrong_card": "Wrong Cards", "key_in": "Key in" }, "name": "Alarm", "remark": "", "mainDP": "alarm_lock" } }, { "schema": { "accessType": "ro", "code": "residual_electricity", "valueDesc": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Battery", "remark": "residual_electricity" }, "functionSet": { "accessType": "ro", "code": "residual_electricity", "valueDesc": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "%" }, "name": "Battery", "remark": "", "mainDP": "residual_electricity" } }, { "schema": { "accessType": "rw", "code": "key_tone", "valueDesc": "{\"range\":[\"mute\",\"low\",\"normal\",\"high\"]}", "valueType": "Enum", "langDict": { "normal": "", "high": "", "low": "", "mute": "" }, "name": "Key Volume", "remark": "key_tone" }, "functionSet": { "accessType": "rw", "code": "key_tone", "valueDesc": "{\"range\":[\"mute\",\"low\",\"normal\",\"high\"]}", "valueType": "Enum", "langDict": { "normal": "", "high": "", "low": "", "mute": "" }, "name": "Key Volume", "remark": "", "mainDP": "key_tone" } }, { "schema": { "accessType": "ro", "code": "remote_result", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "Failed", "true": "Success" }, "name": "Answer App", "remark": "remote_result" }, "functionSet": { "accessType": "ro", "code": "remote_result", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "true": "Success", "false": "Failed" }, "name": "Answer App", "remark": "", "mainDP": "remote_result" } }, { "schema": { "accessType": "wr", "code": "remote_unlock_switch", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "Unforbidden", "true": "Forbidden" }, "name": "Forbidden App Unlock", "remark": "remote_unlock_switch" } }, { "schema": { "accessType": "wr", "code": "password_creat", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Creat Temporary Password", "remark": "password_creat" } }, { "schema": { "accessType": "wr", "code": "password_delete", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Delete Temporary Password", "remark": "password_delete" } }, { "schema": { "accessType": "wr", "code": "password_update", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Update Temporary Password", "remark": "password_update" } }, { "schema": { "accessType": "wr", "code": "password_disable", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Frozen Temporary Password", "remark": "password_disable" } }, { "schema": { "accessType": "wr", "code": "password_enable", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Unfreeze Temporary Password", "remark": "password_enable" } }, { "schema": { "accessType": "ro", "code": "hijack", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "1", "true": "Ligado " }, "name": "Alarme de pânico", "remark": "hijack" }, "functionSet": { "accessType": "ro", "code": "hijack", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "true": "Ligado ", "false": "1" }, "name": "Alarme de pânico", "remark": "", "mainDP": "hijack" } }, { "schema": { "accessType": "ro", "code": "door_opened", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "1", "true": "Door Unlocked" }, "name": "Unlocked", "remark": "door_opened" }, "functionSet": { "accessType": "ro", "code": "door_opened", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "true": "Door Unlocked", "false": "1" }, "name": "Unlocked", "remark": "", "mainDP": "door_opened" } }, { "schema": { "accessType": "rw", "code": "password_reset", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Reset Temporary Password", "remark": "password_reset" } }, { "schema": { "accessType": "ro", "code": "unlock_remote", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "App Unlock", "remark": "unlock_remote" }, "functionSet": { "accessType": "ro", "code": "unlock_remote", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "App Unlock", "remark": "", "mainDP": "unlock_remote" } }, { "schema": { "accessType": "ro", "code": "closed_opened", "valueDesc": "{\"range\":[\"open\",\"closed\",\"unknown\"]}", "valueType": "Enum", "langDict": { "closed": "Closed", "open": "Opened", "unknown": "Unknow" }, "name": "Door Status", "remark": "closed_opened" }, "functionSet": { "accessType": "ro", "code": "closed_opened", "valueDesc": "{\"range\":[\"open\",\"closed\",\"unknown\"]}", "valueType": "Enum", "langDict": { "closed": "Closed", "open": "Opened", "unknown": "Unknow" }, "name": "Door Status", "remark": "", "mainDP": "closed_opened" } }, { "schema": { "accessType": "rw", "code": "remote_no_pd_setkey", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "New remote unlock without password - set key", "remark": "remote_no_pd_setkey" }, "functionSet": { "accessType": "rw", "code": "remote_no_pd_setkey", "valueDesc": "{}", "valueType": "Raw", "langDict": { "unit": "" }, "name": "New remote unlock without password - set key", "remark": "", "mainDP": "remote_no_pd_setkey" } }, { "schema": { "accessType": "rw", "code": "remote_no_dp_key", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "New remote unlock without password - Safe Solution", "remark": "remote_no_dp_key" }, "functionSet": { "accessType": "rw", "code": "remote_no_dp_key", "valueDesc": "{}", "valueType": "Raw", "langDict": { "unit": "" }, "name": "New remote unlock without password - Safe Solution", "remark": "", "mainDP": "remote_no_dp_key" } }, { "schema": { "accessType": "rw", "code": "unlock_method_create", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Create unlock methods from App", "remark": "unlock_method_create" }, "functionSet": { "accessType": "rw", "code": "unlock_method_create", "valueDesc": "{}", "valueType": "Raw", "langDict": { "unit": "" }, "name": "Create unlock methods from App", "remark": "", "mainDP": "unlock_method_create" } }, { "schema": { "accessType": "rw", "code": "unlock_method_delete", "valueDesc": "{}", "valueType": "Raw", "langDict": {}, "name": "Delete unlock methods from App", "remark": "unlock_method_delete" }, "functionSet": { "accessType": "rw", "code": "unlock_method_delete", "valueDesc": "{}", "valueType": "Raw", "langDict": { "unit": "" }, "name": "Delete unlock methods from App", "remark": "", "mainDP": "unlock_method_delete" } }, { "schema": { "accessType": "rw", "code": "lock_motor_state", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "Off", "true": "On" }, "name": "Lock motor state", "remark": "lock_motor_state" }, "functionSet": { "accessType": "rw", "code": "lock_motor_state", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "true": "On", "false": "Off" }, "name": "Lock motor state", "remark": "", "mainDP": "lock_motor_state" } }, { "schema": { "accessType": "rw", "code": "single_use_password", "valueDesc": "{}", "valueType": "Boolean", "langDict": { "false": "", "true": "" }, "name": "Single Use Password", "remark": "single_use_password" } }, { "schema": { "accessType": "rw", "code": "unlock_voice_remote", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Remote unlock by voice box", "remark": "unlock_voice_remote" }, "functionSet": { "accessType": "rw", "code": "unlock_voice_remote", "valueDesc": "{\"min\":0,\"max\":999,\"scale\":0,\"step\":1}", "valueType": "Integer", "langDict": { "unit": "" }, "name": "Remote unlock by voice box", "remark": "", "mainDP": "unlock_voice_remote" } } ], "t": 1673029716063, "success": true, "status": "ok" }, "status": { "result": [ { "code": "unlock_fingerprint", "value": 1 }, { "code": "unlock_password", "value": 0 }, { "code": "unlock_temporary", "value": 0 }, { "code": "unlock_dynamic", "value": 0 }, { "code": "unlock_card", "value": 1 }, { "code": "unlock_key", "value": 0 }, { "code": "open_close", "value": true }, { "code": "alarm_lock", "value": "wrong_finger" }, { "code": "residual_electricity", "value": 65 }, { "code": "key_tone", "value": "mute" }, { "code": "remote_result", "value": false }, { "code": "hijack", "value": false }, { "code": "door_opened", "value": false }, { "code": "unlock_remote", "value": 0 }, { "code": "closed_opened", "value": "open" }, { "code": "remote_no_pd_setkey", "value": "AAAB" }, { "code": "remote_no_dp_key", "value": "" }, { "code": "unlock_method_create", "value": "A/8BAAIABAMA" }, { "code": "unlock_method_delete", "value": "" }, { "code": "lock_motor_state", "value": true }, { "code": "unlock_voice_remote", "value": 0 } ], "success": true, "t": 1673029862385, "tid": "45f1abf08df011ed84dc2ecc4f005cec" } ```
https://us.iot.tuya.com/micro-app/cloud/api/v10/device/log/list ```json { "result": [ { "dpName": "Fingerprint Unlock", "dpId": 1 }, { "dpName": "Password", "dpId": 2 }, { "dpName": "Temporary Password", "dpId": 3 }, { "dpName": "Dynamic Password", "dpId": 4 }, { "dpName": "Card", "dpId": 5 }, { "dpName": "Mechanical Unlock", "dpId": 7 }, { "dpName": "Open Or Close", "dpId": 8 }, { "dpName": "Alarm", "dpId": 9 }, { "dpName": "Battery", "dpId": 10 }, { "dpName": "Key Volume", "dpId": 19 }, { "dpName": "Answer App", "dpId": 22 }, { "dpName": "Forbidden App Unlock", "dpId": 23 }, { "dpName": "Creat Temporary Password", "dpId": 24 }, { "dpName": "Delete Temporary Password", "dpId": 25 }, { "dpName": "Update Temporary Password", "dpId": 26 }, { "dpName": "Frozen Temporary Password", "dpId": 27 }, { "dpName": "Unfreeze Temporary Password", "dpId": 28 }, { "dpName": "Alarme de pânico", "dpId": 35 }, { "dpName": "Unlocked", "dpId": 38 }, { "dpName": "Reset Temporary Password", "dpId": 39 }, { "dpName": "App Unlock", "dpId": 41 }, { "dpName": "Door Status", "dpId": 47 }, { "dpName": "New remote unlock without password - set key", "dpId": 48 }, { "dpName": "New remote unlock without password - Safe Solution", "dpId": 49 }, { "dpName": "Create unlock methods from App", "dpId": 54 }, { "dpName": "Delete unlock methods from App", "dpId": 55 }, { "dpName": "Lock motor state", "dpId": 57 }, { "dpName": "Single Use Password", "dpId": 61 }, { "dpName": "Remote unlock by voice box", "dpId": 62 } ], "t": 1673029922968, "success": true, "status": "ok" } ```
https://us.iot.tuya.com/micro-app/cloud/api/v9/device/log/type ```json { "result": [ { "code": "EVENT_TYPE_ONLINE", "name": "EVENT_TYPE_ONLINE", "id": 1, "desc": "上线" }, { "code": "EVENT_TYPE_OFFLINE", "name": "EVENT_TYPE_OFFLINE", "id": 2, "desc": "离线" }, { "code": "EVENT_TYPE_ACTIVATION", "name": "EVENT_TYPE_ACTIVATION", "id": 3, "desc": "设备激活" }, { "code": "EVENT_TYPE_RESET", "name": "EVENT_TYPE_RESET", "id": 4, "desc": "设备重置" }, { "code": "EVENT_TYPE_PUBLISH", "name": "EVENT_TYPE_PUBLISH", "id": 5, "desc": "指令下发" }, { "code": "EVENT_TYPE_OTA", "name": "EVENT_TYPE_OTA", "id": 6, "desc": "固件升级" }, { "code": "EVENT_TYPE_REPORT", "name": "EVENT_TYPE_REPORT", "id": 7, "desc": "数据上报" }, { "code": "EVENT_TYPE_SEMAPHORE", "name": "EVENT_TYPE_SEMAPHORE", "id": 8, "desc": "设备信号量" }, { "code": "EVENT_TYPE_RESTART", "name": "EVENT_TYPE_RESTART", "id": 9, "desc": "设备重启" }, { "code": "EVENT_TYPE_TIMING", "name": "EVENT_TYPE_TIMING", "id": 10, "desc": "定时信息" }, { "code": "EVENT_TYPE_DELETE_DEVICES", "name": "EVENT_TYPE_DELETE_DEVICES", "id": 31, "desc": "设备api删除设备" }, { "code": "EVENT_TYPE_DEVICES_TOKEN", "name": "EVENT_TYPE_DEVICES_TOKEN", "id": 32, "desc": "设备api请求配网" }, { "code": "EVENT_TYPE_PAIRING_TOKEN", "name": "EVENT_TYPE_PAIRING_TOKEN", "id": 33, "desc": "设备api获取配网结果" }, { "code": "EVENT_TYPE_DATAPOINT_PUBLISH_API", "name": "EVENT_TYPE_DATAPOINT_PUBLISH_API", "id": 34, "desc": "设备api指令下发" }, { "code": "EVENT_TYPE_CONFIRM_UPGRADE", "name": "EVENT_TYPE_CONFIRM_UPGRADE", "id": 35, "desc": "设备api确认升级" }, { "code": "EVENT_TYPE_TYLINK_PROPERTY_REPORT", "name": "EVENT_TYPE_TYLINK_PROPERTY_REPORT", "id": 38, "desc": "设备属性上报" }, { "code": "EVENT_TYPE_TYLINK_EVENT_REPORT", "name": "EVENT_TYPE_TYLINK_EVENT_REPORT", "id": 39, "desc": "设备事件上报" }, { "code": "EVENT_TYPE_TYLINK_PROPERTY_PUBLISH", "name": "EVENT_TYPE_TYLINK_PROPERTY_PUBLISH", "id": 40, "desc": "设备属性下发" }, { "code": "EVENT_TYPE_TYLINK_ACTION_REPORT", "name": "EVENT_TYPE_TYLINK_ACTION_REPORT", "id": 41, "desc": "设备动作上报" }, { "code": "EVENT_TYPE_TYLINK_ACTION_PUBLISH", "name": "EVENT_TYPE_TYLINK_ACTION_PUBLISH", "id": 42, "desc": "设备动作下发" } ], "t": 1673029922938, "success": true, "status": "ok" } ```
github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

zeduperes commented 11 months ago

@eduardobittencourt i have this same door lock, did you find a solution?

Oliv3rDog commented 9 months ago

Hi there, @eduardobittencourt did you get any working solution to integrate this lock to HA?

pheliperocha commented 9 months ago

Hey @eduardobittencourt did you find any solution?

eduardobittencourt commented 9 months ago

Hi guys. Unfortunately I have no updates on this case. I tried to contact Tuya and Intelbras (the company who sells the locks in Brazil) looking for further documentation, but got no response.

pheliperocha commented 9 months ago

@eduardobittencourt I see,

My lock is from a brazilian company as well, called fortezza, yet it actually uses the Tuya TY0A01. I came across this Tuya documentation, and I'm currently trying to decipher the commands outlined there . If I can't figure it out, I might resort to analyzing Zigbee traffic as a last option.

Oliv3rDog commented 9 months ago

I have just received an Aliexpress door lock called Tropernic and it is alwesome, beautifull and cheap as well. It shows TY0A01 por _TYST12_bfejtdig when trying ZHA, but the lock do not understant as a connection, and gives FAIL repport. Did you find any Lock custom quirk to manke a reverse try? Can we find clusters names or types from Tuya Hub Smart Life connection?

adam-zlatniczki commented 1 month ago

I've received my lock a few days ago and going to start working on a Tuya specific lock cluster that can be used in quirks soon. While my lock comes from a different manufacturer (_TYST12_bfejtdig), when the custom cluster is done, it should be easy to create new quirks for different Tuya locks based on that. The lock clusters have quite a long list of commands and attributes so I expect it to take quite some time. I plan to create a sort-of roadmap with "releases", starting with the most important minimum feature set (like lock-unlock), then extend it with additional functionality. As far as I see it, some dashboard will be necessary as well, because locks have features which are very inconvenient to do manually via cluster commands (like handling onboarded PIN codes and such).